Changeset 52962
- Timestamp:
- 03/20/2022 03:48:26 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-http-streams.php
r52961 r52962 212 212 } 213 213 214 $ strHeaders = strtoupper( $parsed_args['method'] ) . ' ' . $request_path . ' HTTP/' . $parsed_args['httpversion'] . "\r\n";214 $headers = strtoupper( $parsed_args['method'] ) . ' ' . $request_path . ' HTTP/' . $parsed_args['httpversion'] . "\r\n"; 215 215 216 216 $include_port_in_host_header = ( … … 221 221 222 222 if ( $include_port_in_host_header ) { 223 $ strHeaders .= 'Host: ' . $parsed_url['host'] . ':' . $parsed_url['port'] . "\r\n";223 $headers .= 'Host: ' . $parsed_url['host'] . ':' . $parsed_url['port'] . "\r\n"; 224 224 } else { 225 $ strHeaders .= 'Host: ' . $parsed_url['host'] . "\r\n";225 $headers .= 'Host: ' . $parsed_url['host'] . "\r\n"; 226 226 } 227 227 228 228 if ( isset( $parsed_args['user-agent'] ) ) { 229 $ strHeaders .= 'User-agent: ' . $parsed_args['user-agent'] . "\r\n";229 $headers .= 'User-agent: ' . $parsed_args['user-agent'] . "\r\n"; 230 230 } 231 231 232 232 if ( is_array( $parsed_args['headers'] ) ) { 233 233 foreach ( (array) $parsed_args['headers'] as $header => $headerValue ) { 234 $ strHeaders .= $header . ': ' . $headerValue . "\r\n";234 $headers .= $header . ': ' . $headerValue . "\r\n"; 235 235 } 236 236 } else { 237 $ strHeaders .= $parsed_args['headers'];237 $headers .= $parsed_args['headers']; 238 238 } 239 239 240 240 if ( $proxy->use_authentication() ) { 241 $ strHeaders .= $proxy->authentication_header() . "\r\n";242 } 243 244 $ strHeaders .= "\r\n";241 $headers .= $proxy->authentication_header() . "\r\n"; 242 } 243 244 $headers .= "\r\n"; 245 245 246 246 if ( ! is_null( $parsed_args['body'] ) ) { 247 $ strHeaders .= $parsed_args['body'];248 } 249 250 fwrite( $handle, $ strHeaders );247 $headers .= $parsed_args['body']; 248 } 249 250 fwrite( $handle, $headers ); 251 251 252 252 if ( ! $parsed_args['blocking'] ) {
Note: See TracChangeset
for help on using the changeset viewer.