[ 
https://issues.apache.org/jira/browse/SYNAPSE-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602411#action_12602411
 ] 

Oleg Kalnichevski commented on SYNAPSE-341:
-------------------------------------------

Asankha,

This is a bit of a grey area in the HTTP spec. It is not quite clear if the 
origin server really MUST read the entire request body before sending a 
response. 

Anyways, lots of HTTP servers out there in the wild do send a response and 
immediately drop the connection before the request body is fully read. 
HttpClient, for instance, can't handle such cases gracefully, but Synapse due 
to the asynchronous nature of its HTTP transport implementation should be able 
to.

Oleg

> System unstable when HTTP response returned before request fully written
> ------------------------------------------------------------------------
>
>                 Key: SYNAPSE-341
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-341
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 1.2-beta1
>         Environment: All environments
>            Reporter: Jake Lambert
>            Assignee: Asankha C. Perera
>            Priority: Critical
>             Fix For: 1.3
>
>         Attachments: ClientSideReqResp.txt
>
>
> When using a proxy service and HTTP-NIO the following error is repeatedly 
> generated when a remote WS returns its response before the request is fully 
> written (i.e. when AXIOM is being used by the target service to parse the 
> request XML and the request includes unprocessed attachment(s) or a fault 
> occurs before fully reading the request):
> I/O dispatcher 12: System may be unstable: IOReactor encountered a runtime 
> exception : null
> java.lang.NullPointerException
>       at 
> org.apache.synapse.transport.nhttp.ClientHandler.outputReady(ClientHandler.java:353)
>       at 
> org.apache.http.impl.nio.DefaultNHttpClientConnection.produceOutput(DefaultNHttpClientConnection.java:170)
>       at 
> org.apache.http.impl.nio.DefaultClientIOEventDispatch.outputReady(DefaultClientIOEventDispatch.java:105)
>       at 
> org.apache.http.impl.nio.reactor.BaseIOReactor.writable(BaseIOReactor.java:114)
>       at 
> org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:198)
>       at 
> org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:180)
>       at 
> org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:142)
>       at 
> org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:70)
>       at 
> org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:318)
>       at java.lang.Thread.run(Unknown Source)
> The actual cause is the ConnectionPool 'cleanConnectionReferences()' method, 
> which clears the REQUEST_SOURCE_BUFFER upon completion of the response HTTP 
> decoding, rather than on completion of both the request AND response 
> processing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to