title: Why html2text generates HTTP/1.0 400 Bad Request?
body: <p>On OS X I've installed <code>html2text</code> via Homebrew, however I've got the following error on run:</p>
  
  <pre><code>$ html2text http://www.example.com/
  </code></pre>
  
  <blockquote>
    <p>HTTP/1.0 400 Bad Request Content-Type: text/html Content-Length: 349</p>
    
    <p>Connection: close Date: Wed, 13 Apr 2016 17:21:22 GMT Server: ECSF (iad/18CC)</p>
    
    <p><code>&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;</code></p>
    
    <p>`****** 400 - Bad Request ******</p>
  </blockquote>
  
  <p>Although this syntax works:</p>
  
  <pre><code>curl http://www.example.com/ | html2text
  </code></pre>
  
  <p>It also works (plain html is returned) when using <code>curl</code>, so I'm not sure what XML code is doing when calling URL directly?</p>
  
  <p>What's happening here? Or how do I force fetching HTML using <code>html2text</code> command providing the URL directly?</p>
  
  <hr>
  
  <p>This is html2text, version 1.3.2a.</p>
  
  <p>Here is additional info:</p>
  
  <pre><code>$ html2text -check http://www.example.com/
  &lt;HTML xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
  &lt;HEAD&gt;
  &lt;TITLE&gt;
  400 - Bad Request
  &lt;/TITLE&gt;
  &lt;/HEAD&gt;
  &lt;BODY&gt;
  &lt;P&gt;
  HTTP/1.0 400 Bad Request Content-Type: text/html Content-Length: 349 Connection: close Date: Wed, 13 Apr 2016 17:48:20 GMT Server: ECSF (iad/18CD) &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;iso-8859-1&amp;quot;?&amp;gt; 
  &lt;/P&gt;
  &lt;H1&gt;
  400 - Bad Request
  &lt;/H1&gt;
  &lt;/BODY&gt;
  &lt;/HTML&gt;
  
  $ curl -I http://www.example.com/
  HTTP/1.1 200 OK
  Accept-Ranges: bytes
  Cache-Control: max-age=604800
  Content-Type: text/html
  Date: Wed, 13 Apr 2016 17:57:56 GMT
  Etag: "359670651+gzip"
  Expires: Wed, 20 Apr 2016 17:57:56 GMT
  Last-Modified: Fri, 09 Aug 2013 23:54:35 GMT
  Server: ECS (iad/182A)
  X-Cache: HIT
  x-ec-custom-error: 1
  Content-Length: 1270
  
  $ curl -0 http://www.example.com/
  &lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
      ...  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div&gt;
      &lt;h1&gt;Example Domain&lt;/h1&gt;
      ...
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>