Home » HTTP » HTTP_Request » Bug #1165
Bad request to Win2003 IIS6 server
Details
| Submitted | 2004-04-08 19:10 UTC |
|---|---|
| From | ronattrick at hotmail dot com |
| Status | Bogus |
| Package | HTTP_Request |
| PHP Version | 4.3.4 |
| OS | Various |
| Roadmaps | (Not assigned) |
Comments
[2004-04-08 19:10 UTC] ronattrick at hotmail dot com
Description:
------------
When sending a request to a W2k3 server wit IIS6 installed, the result returning = "400 Bad Request".
After searching at MS website, the following Q&A was found:
Q. I have a Web application that worked fine with IIS 5.0, but after upgrading to IIS 6.0, I am getting "400 Bad Request" errors. What is causing this?
A. The Web application might be generating requests that end with a carriage return/linefeed (\n). According to RFC2616, such requests are malformed. IIS 5.0 ignored the carriage return/linefeed and processed requests ending with \n successfully. IIS 6.0, however, follows RFC 2616 strictly, generating an error if a request ends with \n. To stop receiving 400 errors, modify our application so that requests do not contain \n.
(http://www.microsoft.com/windows2000/community/centers/iis/iis6_faq.mspx)
Hope you can fix this bug soon!!!
Reproduce code:
---------------
$username = "test";
$password = "test";
$code = $this->HTClient->post('http://www10.hattrick.org/Common/default.asp', array('loginname' => $username, 'password' => $password, 'action' => 'login'));
Expected result:
----------------
returncode 200
Actual result:
--------------
Returncode 400