Warning emited in Header parsing when server does not specify a response "Message"
|Reported by:||dd32||Owned by:||dd32|
Description (last modified by dd32)
As reported in #16855 by cogmios, the HTTP API class can emit a warning in the case that a server does not specify the response message.
One example of a URL which causes this is: http://wallpapers.protonet.ru/section/foto/O/ which has a response of:
HTTP/1.1 404 Server: nginx/0.6.32
Undefined offset: 2 in \wp-includes\class-http.php on line <i>442</i>
One potential patch would be:
$p = explode(' ', $tempheader, 3); array_shift($p); $response['code'] = array_shift($p); $response['message'] = array_shift($p);
Change History (18)
comment:12 @dd32 — 4 years ago
- Component changed from Warnings/Notices to HTTP
- Type changed from enhancement to defect (bug)
comment:13 follow-up: ↓ 14 @azizur — 4 years ago
- Cc azizur added