mirror of
git://develop.git.wordpress.org/
synced 2025-04-21 04:31:55 +02:00
HTTP API: All non-GET/HEAD requests should put the arguments in the form body.
Requests defaults to _GET/query for HEAD/GET/DELETE and _POST/body for POST/PUT/OPTIONS/PATCH. For backward compatibility `WP_HTTP` needs to force `data_format` to 'body' for all non-GET/HEAD requests. Props dd32. Fixes #37456. git-svn-id: https://develop.svn.wordpress.org/trunk@38165 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
24f890045c
commit
2db9d7bee7
@ -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.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user