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

git-svn-id: http://svn.automattic.com/wordpress/trunk@9741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-11-17 21:21:35 +00:00
parent f6c2de0141
commit b32aa16ec3
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);
}