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

411 responses are delivered twice #2811

Closed
kenballus opened this issue Jun 30, 2024 · 1 comment · Fixed by #2813
Closed

411 responses are delivered twice #2811

kenballus opened this issue Jun 30, 2024 · 1 comment · Fixed by #2813
Assignees

Comments

@kenballus
Copy link

When Mongoose receives an HTTP/1.1 POST request with no Content-Length or Transfer-Encoding header, it responds with two 411 responses instead of 1.

To see this for yourself,

  • Clone and build the current master branch (bdfa0b3)
  • Start the http-server example under tutorials/http/http-server
  • Send it a POST request with no headers:
POST / HTTP/1.1\r\n
\r\n
  • Observe that you receive two responses:
HTTP/1.1 411 Length Required
Content-Length: 0

HTTP/1.1 411 Length Required
Content-Length: 0

@scaprile scaprile self-assigned this Jun 30, 2024
@scaprile
Copy link
Collaborator

scaprile commented Jul 1, 2024

Thank you.
They are not delivered twice, they are delivered again and again as long as the connection is kept open, every time the event manager runs. It is a consequence of #2806.
We'll work on it.

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.

2 participants