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

Zheng Feng commented on CAMEL-14069:
------------------------------------

I just take a look at the HttpClientChannelHandler.java and it could be better 
to check the status with

{code:java}
if (response.status().equals(HttpResponseStatus.CONTINUE)) {
   ...
}
{code}

Also from the HTTP RFC defined "Continue - 100"

{panel:title=100 Continue}
The HTTP 100 Continue informational status response code indicates that 
everything so far is OK and that the client should continue with the request or 
ignore it if it is already finished.

To have a server check the request's headers, a client must send Expect: 
100-continue as a header in its initial request and receive a 100 Continue 
status code in response before sending the body.
{panel}

I think it also needs to check the http request header "Expect" ?



> netty4-http - Add logic to handle http 100-Continue
> ---------------------------------------------------
>
>                 Key: CAMEL-14069
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14069
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-netty4, camel-netty4-http
>    Affects Versions: 2.24.0
>            Reporter: Göran Erkstam
>            Priority: Major
>             Fix For: 3.0.0, 2.25.0
>
>         Attachments: ClientChannelHandler.java, HttpClientChannelHandler.java
>
>
> When using netty4-http as a client we have a problem when the server side 
> answers with a http 100-Continue. We expected the client to handle that 
> internally and continue the call but it's actually returning http 100.
> This is handled by Nettys own channel handlers but since the Camel 
> HttpClientChannelHandler/ClientChannelHandler stop waiting when a http 
> 100-Continue arrives it doesn't help.
> In the project I'm working with we made a custom ClientInitilizer and made 
> some small changes in the HttpClientChannelHandler and ClientChannelHandler 
> that just "ignores" the http 100-Continue when it arrives to solve this issue.
> See the attached files to see our solution
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to