title: commons-httpclient removed port 80 from the Host header after executeMethod
body: <p>I created a GET HTTPMethod with a specified host and port and execute that from Httpclient.executeMethod(). However, by the time the host receive it, the port is truncated from the Host Header in the HTTP request. </p>
  
  <p>The Host header information in the HttpMethod prior to executing  is the following:
  User-Agent: Me
  Host: stackoverflow.com:80 </p>
  
  <p>at the time received by the host: </p>
  
  <p>User-Agent: Jakarta Commons-HttpClient/3.1
  Host: stackoverflow.com</p>
  
  <p>I have seen posting where I can set the User-Agent in the HTTPClient prior to executing. But, I've tried that with the host via HostConfiguration, and no luck. Anyone has seen this problem before and resolved it such that the host will not change? </p>
  
  <p>This does not happened when I used the other httpclient package, or when I hit different port.</p>
  
  <p>Found the answer: <a href="https://stackoverflow.com/questions/6045911/how-can-i-override-the-host-header-in-the-request-when-using-apache-commons-htt">How can I override the &quot;Host&quot; header in the request when using Apache commons HttpClient</a></p>