Respect the Content-Type header developers pass to WP_HTTP. Fixes #18982
git-svn-id: http://svn.automattic.com/wordpress/trunk@19000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ec7afa90a1
commit
ee71b2eb88
|
@ -180,6 +180,7 @@ class WP_Http {
|
|||
} else {
|
||||
if ( is_array( $r['body'] ) || is_object( $r['body'] ) ) {
|
||||
$r['body'] = http_build_query( $r['body'], null, '&' );
|
||||
if ( ! isset( $r['headers']['Content-Type'] ) )
|
||||
$r['headers']['Content-Type'] = 'application/x-www-form-urlencoded; charset=' . get_option( 'blog_charset' );
|
||||
$r['headers']['Content-Length'] = strlen( $r['body'] );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue