It is clear that the inclusion of the port is optional specially for the default ports.
There is a customer running Microsoft IIS 7.5 on some web-servers that serve several virtual hosts that complain when making HTTP requests with the port 80 at the end of the host header, returning an HTTP Error 500.
This prevents the proper usage of the PSM on this scenario, and tracking the source of the problem at IIS side is really hard. Removing the port 80 from the host header is the solution to avoid problems with IIS.
This removal is consistent with the standard, and should not represent any problem with other web-servers. So, the idea is to verify if the port is 80 (HTTP) or 443 (HTTPS) and avoid adding the port to the host header in any of those cases; otherwise, the port will be added (for example, when using a non-standard port like 8000 or 8080).
Environment
Microsoft IIS 7.5
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Show:
Alejandro Galue September 25, 2014 at 4:30 PM
On HttpClient 4.3.x, the Host header will always be generated no matter what. So, in order to control the content of the Host header on the PSM, the virtual-host parameter must be provided and the solution is going to work after applying the following patch:
For broken web servers like Microsoft IIS, the virtual-host parameter on the PSM is mandatory. If it is not specified, the solution won't work for IIS.
Alejandro Galue September 25, 2014 at 3:37 PM
After upgrading HttpCore to 4.3.2 and HttpClient to 4.3.4 in order to be able to upgrade the Selenium library, this functionality is broken in 1.12.
Alejandro Galue May 22, 2013 at 4:42 AM
Fixed on revision 569bddbad9419b9edc82983f3ff2fc28e3c1006d for 1.10, and merged into 1.12
Here is the relevant section of the standard related with the host header:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
It is clear that the inclusion of the port is optional specially for the default ports.
There is a customer running Microsoft IIS 7.5 on some web-servers that serve several virtual hosts that complain when making HTTP requests with the port 80 at the end of the host header, returning an HTTP Error 500.
This prevents the proper usage of the PSM on this scenario, and tracking the source of the problem at IIS side is really hard. Removing the port 80 from the host header is the solution to avoid problems with IIS.
This removal is consistent with the standard, and should not represent any problem with other web-servers. So, the idea is to verify if the port is 80 (HTTP) or 443 (HTTPS) and avoid adding the port to the host header in any of those cases; otherwise, the port will be added (for example, when using a non-standard port like 8000 or 8080).