diff --git a/src/wp-includes/class-http.php b/src/wp-includes/class-http.php index 173566d464..e9ff205142 100644 --- a/src/wp-includes/class-http.php +++ b/src/wp-includes/class-http.php @@ -315,8 +315,7 @@ class WP_Http { } if ( empty( $r['redirection'] ) ) { $options['follow_redirects'] = false; - } - else { + } else { $options['redirects'] = $r['redirection']; } @@ -333,11 +332,15 @@ class WP_Http { // SSL certificate handling if ( ! $r['sslverify'] ) { $options['verify'] = false; - } - else { + } else { $options['verify'] = $r['sslcertificates']; } + // All non-GET/HEAD requests should put the arguments in the form body. + if ( 'HEAD' !== $type && 'GET' !== $type ) { + $options['data_format'] = 'body'; + } + /** * Filters whether SSL should be verified for non-local requests. *