title: Sending a file via POST using raw HTTP (PuTTY)
body: <p>If I set up an HTML page with the following form:</p>
  
  <pre><code>&lt;html&gt;
  
      &lt;body&gt;
          &lt;form action="upload_file.php"
                method="post"
                enctype="multipart/form-data"&gt;
  
              &lt;label for="file"&gt;Filename:&lt;/label&gt;
              &lt;input type="file" name="file" id="file" /&gt;
              &lt;br /&gt;
              &lt;input type="submit" name="submit" value="Submit" /&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>I can upload a file to upload_file.php where I can handle it using a PHP script.</p>
  
  <p>For testing purposes, I need to do the same using raw HTTP via a <a href="http://en.wikipedia.org/wiki/PuTTY" rel="nofollow noreferrer">PuTTY</a> session.</p>
  
  <p>I can do a normal POST (just sending text data) this way:</p>
  
  <pre><code>POST /test_post.php HTTP/1.1
  Host: example.com
  User-Agent: Mozilla/5.0
  Connection: keep-alive
  Content-Type: application/x-www-form-urlencoded
  Content-Length: 11
  
  name=myname
  </code></pre>
  
  <p>How can I send a file this way?</p>