Permalink
Browse files

Even if we don't send Content-Length, we should send final CRLF

git-svn-id: http://svn.php.net/repository/pear/packages/HTTP_Request/trunk@267178 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent a39a647 commit d0efa5a10ed9422f53cce5f685ae6bf7bbb3da49 @sad-spirit sad-spirit committed Oct 11, 2008
Showing with 5 additions and 2 deletions.
  1. +5 −2 Request.php
View
@@ -1013,9 +1013,12 @@ function _buildRequest()
// No body: send a Content-Length header nonetheless (request #12900),
// but do that only for methods that require a body (bug #14740)
- } elseif (in_array($this->_method, $this->_bodyRequired)) {
+ } else {
- $request .= "Content-Length: 0\r\n\r\n";
+ if (in_array($this->_method, $this->_bodyRequired)) {
+ $request .= "Content-Length: 0\r\n";
+ }
+ $request .= "\r\n";
}
return $request;

0 comments on commit d0efa5a

Please sign in to comment.