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

Server-Hang when Headers '\r' is the last char in buffer #178

Open
mdeichsel opened this issue Jan 6, 2024 · 1 comment
Open

Server-Hang when Headers '\r' is the last char in buffer #178

mdeichsel opened this issue Jan 6, 2024 · 1 comment

Comments

@mdeichsel
Copy link

Describe the bug
The readLine-Function in HTTPConnection.cpp leads to end endless-loop, when the newChar is the last char in the buffer.
Then (_bufferProcessed+1 < _bufferUnusedIdx) is never true and the server loops.

How To Reproduce
with luck I got it with chrome.

Expected Behavior
Server hangs in loop without beeing responsive.

Actual Behavior
Handle Headers over buffer-borders

ESP32 Module
Please provide specifications of your module

  • RAM/PSRAM: ?
  • Flash Size: 4MB
  • Other special properties: ESP32-D0WDQ6 (revision 1) (ESP-DevKit)

Software (please complete the following information if applicable)

Additional context
I prepared a fix, try to submit a PR

@mdeichsel
Copy link
Author

I created a branch but am not allowed to push it in this repo.

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

No branches or pull requests

1 participant