Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data coming out in wrong request #137

Open
faassen opened this issue Aug 13, 2014 · 1 comment
Open

data coming out in wrong request #137

faassen opened this issue Aug 13, 2014 · 1 comment

Comments

@faassen
Copy link
Contributor

faassen commented Aug 13, 2014

I have a very spammy question that sends lots of requests. It appears to use wininet to make these request, which I think, from what I read, means no pipelined requests.

I'm using the restkit WSGI proxy.

During a particular case where there's a large response being written onto the socket and another request being made in parallel, I'm getting an error in http-parser; the amount of data parsed is 0 while the amount received is the size of the chunk.

This error occurs when construction headers to get the location (used in get_response), but when I
change it so that location is not being read), I still get the same error in the response tee.

This error occurs because the second request gets part of the response from the first one, and this is not valid HTTP.

When I change the connection pool to have a max size of 1, the error seems to go away.

I only seem to get this error when I run the restkit-based code in Windows environment, not when I run it in Linux. I also don't get this error when I access the server using a normal web browser.

May be related to benoitc/http-parser#44

May be a bug in socketpool on Windows, I don't know.

@faassen
Copy link
Contributor Author

faassen commented Aug 13, 2014

Concerning the use of pipelining and such: of course the WSGI proxy talks to the backend using whatever restkit uses, so if that uses pipelining, then of course pipelining can be the cause of the error. The backend is a waitress based server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant