synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <>
Subject [jira] Commented: (SYNAPSE-479) Failure in REST test case
Date Tue, 23 Dec 2008 20:46:44 GMT


Andreas Veithen commented on SYNAPSE-479:

What happens here is that Synapse hangs in ContentInputStream#close(), called from ServerWorker#run().
The close method looks as follows:

    public void close() throws IOException {
        // read and discard the remainder of the message
        byte tmp[] = new byte[1024];
        while (, 0, tmp.length) >= 0) {

This method has been added in r636863 to "[fix] handling of requests with partially consumed
content". Note that in the present case the transport is processing a GET request which by
definition has no content. It appears that ServerHandler#requestReceived always creates an
input buffer and a ContentInputStream independently of the type of request. The solution is
to check the type of request and only create the input buffer and ContentInputStream if necessary
and of course only use ContentInputStream#close() if the input stream is not null.

> Failure in REST test case
> -------------------------
>                 Key: SYNAPSE-479
>                 URL:
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: NIGHTLY
>         Environment: - Hudson
> - Mac OS X
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>         Attachments: 01-debug.log
> The following test case systematically fails:
> org.apache.synapse.transport.nhttp.HttpCoreNIOListenerTest.0076:test=REST,,endpoint=axis
> This test case uses a URLConnection to send a GET request to HttpCoreNIOListener. The
test case logs show that the transport sends back the status line and the headers, but fails
to write the (empty) body. After 60 seconds it times out and closes the connection, causing
a "Premature EOF" error in URLConnection.
> This seems to be a regression caused by the recent upgrade to httpcore 4.0-beta3.

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:
For additional commands, e-mail:

View raw message