What steps will reproduce the problem? 1. Send a request that requires a large response e.g. multiple <ask>s
What is the expected output? A well formed xml reposonse
What do you see instead? A badly formed response with the begining of the xml repeated part way though the response instead of the end
What version of the product are you using? 1.1.8
On what operating system? Various
Please provide any additional information below. The loop sending chunks back was not including the offset of what had been sent.
I've also included http1.1 support which by default doesn't close the connection. Error for http1.1 from java client is: "java.net.SocketException: Connection reset" as it tries to reuse the connection. This also gives me a significant speed up on our heavily firewalled network.
See attached which fixes both. I personally would pull out the main loop but I went for the minimal change.
- http1-1.patch 5.32KB
Comment #1
Posted on Oct 4, 2007 by Quick PandaHi,
thanks for the fix. I did some refactoring of the code and incorporate it to the latest version. Can you please confirm that the problem is fixed in 1.1.9.
Comment #2
Posted on Oct 9, 2007 by Helpful KangarooI've not seen any more badly formed xml in my tests so far but...
Sadly part of the problem still exists in 1.1.9 The problem is the closing of connections for each http post.
We are sending quite a lot of data to the server and it's dropping of the connection causes both a slow down and in the newer jdk 1.5 and up causes the entire communication to break down. We are unable to send a complete set of data with the current implementation.
The key is not having a "singleTransaction" but supporting multiple messages on the connection without dropping it.
i.e.
loop forever accept connection loop until remote client drops connection read reqest send response end loop end loop
What's missing is the inner loop.
Existing code causes intermittent exceptions of the form: java.net.SocketException: Connection reset
Thanks, M
Comment #3
Posted on Oct 9, 2007 by Quick PandaI see the problem now, thanks for the explanation.
Does the following patch help?
Best, Dmitry
- http11.patch 1.66KB
Comment #4
Posted on Oct 9, 2007 by Helpful KangarooWow that was quick! It's almost identical to the changes I made to the current code. I'm testing it now and it looks good.
Comment #5
Posted on Oct 9, 2007 by Quick PandaWell, I manage to have all the infrastructure ready and now I just use it properly. Thanks for enlighten me.
Status: Fixed
Labels:
Type-Defect
Priority-Medium