Auto set content-length. Props jacobsantos. fixes #8249

git-svn-id: https://develop.svn.wordpress.org/trunk@9741 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-11-17 21:21:35 +00:00
parent 0aba3305b3
commit f5ec38f222
1 changed files with 3 additions and 0 deletions

View File

@ -250,6 +250,9 @@ class WP_Http {
$r['headers']['Content-Length'] = strlen($r['body']);
}
if ( ! isset( $r['headers']['Content-Length'] ) && ! isset( $r['headers']['content-length'] ) )
$r['headers']['Content-Length'] = strlen($r['body']);
$transports = WP_Http::_postTransport($r);
}