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

Content-Length not updated between request #58

Closed
gabrielf opened this issue Nov 23, 2012 · 2 comments
Closed

Content-Length not updated between request #58

gabrielf opened this issue Nov 23, 2012 · 2 comments

Comments

@gabrielf
Copy link
Contributor

It seems the Content Length for requests are set to the same value between requests. This makes requests fail when sending subsequent requests with more data if the server respects the Content-Length since the input will be truncated.

Example

First request

POST / HTTP/1.1
Content-Length: 12
Content-Type: application/x-www-form-urlencoded
Host: localhost:3001
Connection: keep-alive

param=short

Second request

POST / HTTP/1.1
Content-Length: 12        <=== Still 12! Should be 14 since param is now longer
Content-Type: application/x-www-form-urlencoded
Host: localhost:3001
Connection: keep-alive

param=longer
@gabrielf
Copy link
Contributor Author

This issue is fixed by pull request 59 but for some reason I cannot paste the link since github is converting it to a link to issue 59 instead of pull request 59...

mansilladev added a commit that referenced this issue Mar 28, 2014
Issue #58 fixed. Using clone on options.headers.
@phairow
Copy link
Contributor

phairow commented Oct 10, 2014

closing since this was fixed in #59

@phairow phairow closed this as completed Oct 10, 2014
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

2 participants