WP_HTTP: When requesting a document with HTTP/1.1 include the 'Connection: Close' header (unless a Connection header is already specified) to prevent the connection being held open and hanging the request process. See #23463
git-svn-id: https://develop.svn.wordpress.org/trunk@25150 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4f410dc9f3
commit
7f0891c1a1
@ -172,6 +172,10 @@ class WP_Http {
|
|||||||
unset( $r['headers']['user-agent'] );
|
unset( $r['headers']['user-agent'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( '1.1' == $r['httpversion'] && !isset( $r['headers']['connection'] ) ) {
|
||||||
|
$r['headers']['connection'] = 'close';
|
||||||
|
}
|
||||||
|
|
||||||
// Construct Cookie: header if any cookies are set
|
// Construct Cookie: header if any cookies are set
|
||||||
WP_Http::buildCookieHeader( $r );
|
WP_Http::buildCookieHeader( $r );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user