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

"Connection: Close" disconnect bug #1426

Closed
SmorkalovG opened this issue Feb 14, 2016 · 0 comments
Closed

"Connection: Close" disconnect bug #1426

SmorkalovG opened this issue Feb 14, 2016 · 0 comments

Comments

@SmorkalovG
Copy link

If there is a "Connection: Close" header, client does not receive body.
Here is the test case:

shared static this()
{
requestHTTP("http://127.0.0.1:80",
(scope req) {},
(scope res) {
assert(res.bodyReader.readAllUTF8() == "qwerty");
}
);
listenTCP(80, (TCPConnection c){
c.write("HTTP/1.1 200 OK\r\nConnection: Close\r\n\r\nqwerty");
}, "127.0.0.1");
}

Assertion fails, body is empty. Client closes connection right after parsing headers. It does not wait for body. Everything is ok if Content-Length is set. Bug can be reproduced using both 0.7.27 and 0.7.26. Just in case, section 5 in https://tools.ietf.org/html/rfc2616#section-4.4

s-ludwig added a commit that referenced this issue Feb 14, 2016
s-ludwig added a commit that referenced this issue Feb 20, 2016
(cherry picked from commit 0521008)
s-ludwig added a commit that referenced this issue Feb 20, 2016
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