Skip to content

[Question] Dealing with request body #5

@guites

Description

@guites

I know this doesn't support POST requests, but I'm playing around with the source code and I'm stuck as dealing with the body of a request, as it doesn't end in a CRLF, so the while read loop running in _tsws_response hangs.

If I get a second request, I can verify that the last line from the body is appended to the beginning of a new request, like so:

POST / HTTP/1.1
Host: localhost:18000
User-Agent: curl/7.68.0
Accept: */*
Content-Length: 7
Content-Type: application/x-www-form-urlencoded

test=okPOST / HTTP/1.1 # <!--- beginning of the second request

I'm using the netcat with named pipes variant.

I couldn't find a way to avoid this issue using named pipes, anyone know any alternatives?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions