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

Apple Safari 18 - Error: „cannot parse response“ (NSURLErrorDomain:-1.017) #42

Open
andi07x opened this issue Sep 20, 2024 · 1 comment

Comments

@andi07x
Copy link

andi07x commented Sep 20, 2024

Hi there,

since Safari 18 all responses with Transfer-Encoding: chunked throw the error: „cannot parse response“ (NSURLErrorDomain:-1.017).
To fix this you need to change line 320 of WebResponses.cpp to:
outLen = sprintf((char*)buf+headLen, "%04x", readLen) + headLen;
and delete line 321.
Even though the comment above says that spaces are allowed, I couldn't find that in the RFC. With the leading 0 it works with Safari 18 and Firefox, Curl and Chrome.
Hope this helps and would be happy if this gets into the code.

Best regards
Andreas

@mathieucarbou
Copy link

FYI A PR was opened more than a year ago about that: me-no-dev#1301

Which is included in the fork we maintain, which is more up to date than this one: https://github.com/mathieucarbou/ESPAsyncWebServer

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

2 participants