[
http://issues.apache.org/jira/browse/AXISCPP-609?page=comments#action_12315544
]
Bernd Weber commented on AXISCPP-609:
-------------------------------------
Hi Fred,
the reason to append my changes to this JIRA bug was that I had
problems with chunked HTTP resonse, too, and with the wish of
Arcangelo as written in the bug description:
"Splitting the getBytes method in more methods should be a
nice to have."
Back to my problem: I received an HTTP 1.1 message
containing two headers - one "100 Continue" and one "200 Ok"
followed by the expected body. Both headers were received with
a single call of *m_pActiveChannel >> m_pszRxBuffer;
The 100-header is recognized, but only to receive more bytes:
if( m_iResponseHTTPStatusCode == 100)
{
// Samisa: We found Continue. Keep on reading and processing headers
// till we get a HTTP code other than 100
// Here it is assumed that the whole of the request is already sent
m_pszRxBuffer [0] = '\0';
*m_pActiveChannel >> m_pszRxBuffer;
m_strReceived = m_pszRxBuffer;
}
So the case having the second header already contained in
the same buffer is not handled, and the second call to
*m_pActiveChannel >> m_pszRxBuffer;
causes a timeout, since there is nothing left to receive.
When I looked to the implementation of HTTPTransport::getBytes,
I decided to rewrite the whole method according to Arcangelo,
since another specialized handling would have made it more
complicated than it was before. The rewriting became a bit
more than excepted, because I extracted some code parts into
new classes.
I made my changes on the base of Axis-c 1.5, so the
Ascii character defines which came into in the meantime are not
contained. This has to be fixed before further steps.
Regards,
Bernd Weber
> Multi chunked http responses miss some bytes randomly
> -----------------------------------------------------
>
> Key: AXISCPP-609
> URL: http://issues.apache.org/jira/browse/AXISCPP-609
> Project: Axis-C++
> Type: Bug
> Components: Transport (axis3)
> Versions: unspecified
> Environment: The issue is not specific of a particular environment
> Reporter: Arcangelo Di Balsamo
> Attachments: HTTPTransport.cpp, HTTPTransport.cpp, HTTPTransport.cpp,
> HTTPTransport.cpp, HTTPTransport.cpp, HTTPTransport.dll, HTTPTransport.hpp,
> HTTPTransport.zip, axis-c-1-5_transport.zip
>
> Multi chunked http responses miss some bytes randomly.
> The issue is partially related to the AXISCPP-518 reported by myself too.
> The bug is in the getBytes method of HTTPTransport class.
> I made a tentative fix, that I've deeply tested.
> In the fix I did, I've changed a little bit the implementation logic.
> Splitting the getBytes method in more methods should be a nice to have.
> I'm attaching the modified file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira