Opened 15 years ago
Closed 15 years ago
#7224 closed enhancement (duplicate)
wp_get_http, discover_pingback_server_uri does not consider HTTP chuck format
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | major | Version: | 2.6 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
wp_get_http() at wp-includes/functions.php, discover_pingback_server_uri() at wp-includes/comment.php speaks HTTP with fcoskopen(), fputs(), fgets(), fread(). But, thease codes does not consider HTTP chunk format.
If the server returns chunk format, received data will be malformed.
The chunk format is described in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html
To handle chunk format, check Transfer-Encoding field in HTTP header, and read chunk-size and the content.
Attachments (2)
Change History (11)
#1
@
15 years ago
HTTP/1.0 does not understand chunked-encoding, therefore, should not accept the header and ignore it. If it is received, then the standard states that we must send a 501 response back.
#3
@
15 years ago
HTTP/1.0 does not understand chunked-encoding
The function in question should be set to use 1.0, I believe the function in question uses HTTP/1.1, which is probably the reason the server is returning that content type.
Patch for discover_pingback_server_uri()