phax / as2-lib

A generic Java AS2 library, servlet and server
107 stars 43 forks source link

HttpHelper readFully fails when talking with last version of Oxalis. #64

Closed mathieu-stennier closed 6 years ago

mathieu-stennier commented 6 years ago

Hello Philip,

We encountered an error using your code in Babelway while talking with Oxalis 4.0.2 and above.

We replaced HttpHelper call to read the chuncked payload by new ChunkedInputStream(is) provided by commons-httpclient 3.1 library.

Mathieu Stennier. Dev @ Babelway.

phax commented 6 years ago

Hi Mathieu, thanks for your input. You may not have noticed, but there will be a version 4.2.0 which supports large files, which implies, that HTTPClient will be used. So what was the issue? That you MUST used chunked encoding? Or is it an Oxalis bug? If this is too sensitive, we can also talk on Slack. // Philip

mathieu-stennier commented 6 years ago

We encountered an EOFException in the readFully method. Most probably the calculation of the chunkLength was not working well.

I don't think it is an Oxalis bug because everything worked well by using the ChunkedInputStream of the commons library.

We integrated your changes first for support of large files but still encountered the error so we decided to remove the call to readPayload and just extract the bytes by doing:

new ChunkedInputStream(httpRequest.getInputStream());

Hope this helps,

Mathieu Stennier.

phax commented 6 years ago

Was tested successfully.