Changeset 10313
- Timestamp:
- 01/05/2009 09:32:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-IXR.php
r8403 r10313 496 496 var $path; 497 497 var $useragent; 498 var $headers; 498 499 var $response; 499 500 var $message = false; … … 529 530 $r = "\r\n"; 530 531 $request = "POST {$this->path} HTTP/1.0$r"; 531 $request .= "Host: {$this->server}$r"; 532 $request .= "Content-Type: text/xml$r"; 533 $request .= "User-Agent: {$this->useragent}$r"; 534 $request .= "Content-length: {$length}$r$r"; 532 533 $this->headers['Host'] = $this->server; 534 $this->headers['Content-Type'] = 'text/xml'; 535 $this->headers['User-Agent'] = $this->useragent; 536 $this->headers['Content-Length']= $length; 537 538 foreach( $this->headers as $header => $value ) { 539 $request .= "{$header}: {$value}{$r}"; 540 } 541 $request .= $r; 542 535 543 $request .= $xml; 536 544 // Now send the request … … 556 564 // Check line for '200' 557 565 if (strstr($line, '200') === false) { 558 $this->error = new IXR_Error(-3230 0, 'transport error - HTTP status code was not 200');566 $this->error = new IXR_Error(-32301, 'transport error - HTTP status code was not 200'); 559 567 return false; 560 568 }
Note: See TracChangeset
for help on using the changeset viewer.