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

examples/poll_http_server is wrong #46

Open
L-jasmine opened this issue Mar 30, 2022 · 0 comments · May be fixed by #48
Open

examples/poll_http_server is wrong #46

L-jasmine opened this issue Mar 30, 2022 · 0 comments · May be fixed by #48

Comments

@L-jasmine
Copy link
Contributor

If I Send a http request.like

GET /id=1 HTTP/1.1
Host: 127.0.0.1:8000
User-Agent: curl/7.64.1
Accept: */*
Accept-Encoding: gzip

when I send

GET /id=1 HTTP/1.1
Host: 127.0.0.1:8000

and sleep some time.
then send

User-Agent: curl/7.64.1
Accept: */*
Accept-Encoding: gzip

when client sleep.
poll_http_server go there L109

let req = match parsed::http::parse_http_request(&mut bs) {
Some(req) => req,
None => {
break;
}
};
.

break will return and drop bs.
just drop

GET /id=1 HTTP/1.1
Host: 127.0.0.1:8000
@KernelErr KernelErr linked a pull request Mar 30, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant