Skip to content

examples/poll_http_server is wrong #46

@L-jasmine

Description

@L-jasmine

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions