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

Chunked Response broken on Safar/iOS #1436

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dl9rdz
Copy link

@dl9rdz dl9rdz commented Oct 2, 2024

Chunked responses cause Safari on iOS 18 to display "Safari can't open the page. The error was "cannot parse response"".

The reason is that the handling of chunked response is not standard conforming in the current implementation. In contrast to a comment in the source code, the standard (RFC2616) does not allow spaces between the chunk size and the crlf. Most other browsers are more tolerant in this regard, but not Safari on iOS.

There is an easy fix: As also stated in the existing comment, leading zeros are standard compliant. So it is possible to generate an equivalent, standard compliant chunked encoding that is also correctly handled by iOS by extending the size prefix not with spaces at the end, but with leading zeros.

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 this pull request may close these issues.

2 participants