Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

'Connection' header expects 'disconnect' instead 'close' ? #13

Closed
@spdi

Description

@spdi

Hi,
I'm using your library to connect to me-no-dev ESPAsyncWebServer to make a POST request with body.
I had some troubles to make it work beacuse ESPAsyncWebServer accepted only first call but second was not sent because requestState returns 1.
Reading the source code I found that the Connection header is compared to have 'disconnect' value to disconnect TCP connection. So I fixed it to 'close' string and it started to work.
As https://tools.ietf.org/html/rfc2616#page-117 Connection should have 'close' value.
Could you explain why do you use 'disconnect'?
If this is bug could you fix it?

fixed line by me:
if (connectionHdr && (strcasecmp_P(connectionHdr, PSTR("close")) == 0))

Second discovered problem is debugging received data.
Data debug does not pass buffer data length to debug macro and data Vbuf is not null terminated so I read on screen the received body response and some garbage.

BTW I like your library because it support POST and other not GET methods. Thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions