Dmitry Potapov created HTTPCORE-347:
---------------------------------------
Summary: BasicHttpResponse.setStatusCode() doesn't update reason
phrase
Key: HTTPCORE-347
URL: https://issues.apache.org/jira/browse/HTTPCORE-347
Project: HttpComponents HttpCore
Issue Type: Bug
Components: HttpCore
Affects Versions: 4.3
Reporter: Dmitry Potapov
Steps to reproduce:
1. Download ElementalHttpServer.java from
http://hc.apache.org/httpcomponents-core-4.3.x/examples.html
2. Compile
3. Run with '/tmp' as command-line argument
4. curl -v localhost:8080/non-existing-file
Expected result: Status line is 'HTTP/1.1 404 Not Found'
Actual Result on HttpCore 4.3.x: Status line is 'HTTP/1.1 404 OK'
Actual Result on HttpCore 4.2.x: Status line is 'HTTP/1.1 404 Not Found'
The root cause for this difference is that BasicHttpResponse.setStatusCode() in
HttpCore 4.3.x doesn't change reason phrase, despite of javadoc, which declares
that reason phrase will be update according to the status code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]