[wp-trac] [WordPress Trac] #28982: Improper HTTP headers generated within WP_Http_Streams->request() method for URI's specifying port
WordPress Trac
noreply at wordpress.org
Wed Jul 23 12:59:20 UTC 2014
#28982: Improper HTTP headers generated within WP_Http_Streams->request() method
for URI's specifying port
--------------------------+------------------------------
Reporter: kamelkev | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP API | Version: 3.9.1
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+------------------------------
Changes (by dd32):
* keywords: => needs-patch
Comment:
This is correct, The port must be included in the Host header, unless it's
the default for the protocol, in which case it's optional.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23 describes
that for HTTP/1.1, which is almost the same as 1.0.
Although we should be able to send the default port in 100% of cases, We
should probably only send it when it's optional to avoid any unexpected
servers.
The logic needed would be:
- If proxy enabled, always include port
- If ( (http == scheme and port == 80 ) or (https == scheme and port ==
443 ) ) drop port
- else: Include port
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28982#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list