You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2018/02/28 10:54:00 UTC

[jira] [Comment Edited] (HTTPCORE-516) Reason phrase in HttpStatus constants are not needed due to changes in RFC 7230

    [ https://issues.apache.org/jira/browse/HTTPCORE-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16380117#comment-16380117 ] 

Oleg Kalnichevski edited comment on HTTPCORE-516 at 2/28/18 10:53 AM:
----------------------------------------------------------------------

I am not sure I understand. HttpCore 4.4.x is conformant with RFC 2616, not RFC 723x. HttpCore 5.x is. HttpCore 4.4.x is perfectly correct in sending status {{HTTP/1.1 200 OK}} and any RFC 723x conformant agent should be able to handle those. HttpCore of all versions should be perfectly capable of handling status lines without a reason phrase. See [this test case |https://github.com/apache/httpcomponents-core/blob/4.4.x/httpcore/src/test/java/org/apache/http/message/TestBasicLineParser.java#L140]. I am not sure I understand what we are expected to do.

Oleg


was (Author: olegk):
I am not sure I understand. HttpCore 4.4.x is conformant with RFC 2616, not RFC 723x. HttpCore 5.x is. HttpCore 4.4.x is perfectly correct in sending status {{HTTP/1.1 200 OK}} and any RFC 723x should be able to handle those. HttpCore of all versions should be perfectly capable of handling status lines without a reason phrase. See [this test case |https://github.com/apache/httpcomponents-core/blob/4.4.x/httpcore/src/test/java/org/apache/http/message/TestBasicLineParser.java#L140]. I am not sure I understand what we are expected to do.

Oleg

> Reason phrase in HttpStatus constants are not needed due to changes in RFC 7230
> -------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-516
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-516
>             Project: HttpComponents HttpCore
>          Issue Type: Task
>          Components: HttpCore
>            Reporter: Viktor Chmel
>            Priority: Major
>
> *Introduction*
> After updating one (Serivce-A) of our Web services to Tomcat 8.5 we realised that HTTP Status header changed according to RFC 7230 
> _RFC 7230 states that clients should ignore reason phrases in HTTP/1.1 response messages. Since the reason phrase is optional, Tomcat no longer sends it. As a result the system property org.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER is no longer used and has been removed._ "
> Some temporary workaround exists (set [deprecated option sendReasonPhrase to true|https://tomcat.apache.org/migration-85.html#HTTP_connector_changes]), but it will be impossible in tomcat 9.
> *Problem*
> Ok, what about HttpCore?
> Another our service (Service-B) use [HttpStatus |https://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/HttpStatus.html]lib and its constants like SC_OK to assert response from Service-A. And after updating to tomcat 8.5 it became to fail assertion every time. Why? Now SC_OK = "200 OK", but according to RFC 7230 must be just "200". The same issue with another status constans.
> I`m not expert in you library, but smth must be done to support new standard from one hand and to support legacy http servers from another.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org