Set Content-Length to 0 for null body requests. Props Jalada. see #8605
git-svn-id: https://develop.svn.wordpress.org/trunk@10211 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f3c2413d46
commit
fcc53e993b
@ -242,6 +242,7 @@ class WP_Http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( is_null($r['body']) ) {
|
if ( is_null($r['body']) ) {
|
||||||
|
$r['headers']['Content-Length'] = 0;
|
||||||
$transports = WP_Http::_getTransport($r);
|
$transports = WP_Http::_getTransport($r);
|
||||||
} else {
|
} else {
|
||||||
if ( is_array( $r['body'] ) || is_object( $r['body'] ) ) {
|
if ( is_array( $r['body'] ) || is_object( $r['body'] ) ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user