Support for servers with broken line endings
See original GitHub issueI’m informed that some allegedly-HTTP servers use \r
or \n
for line endings, and that robust clients need to support this too.
Sigh.
Maybe the thing to do is to watch for \r\r
or \n\n
in the headers block and then go into a special case mode if we see it?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:12 (11 by maintainers)
Top Results From Across the Web
Fixing misaligned Linux and Windows line endings
Specifically, I am running Microsoft SQL Server in a container in a Kubernetes cluster—okay, it's Red Hat OpenShift, but it's still Kubernetes.
Read more >Can we support CR line endings as well as LF and CRLF?
VSCode supports LF line endings, and CRLF line endings, but it doesn't support CR line endings. Any chance of support for this?
Read more >Unix-style line endings on Windows servers - Stack Overflow
Windows servers work fine with Unix line-endings. The problem would be if you are planning to use the files on the Windows servers...
Read more >CR/LF Issues and Text Line-endings - Perforce
On Windows, line-endings are terminated with a combination of a carriage return (ASCII 0x0d or \r) and a newline(\n), also referred to as...
Read more >Why are text file line breaks wrong, after the file is ... - WinSCP
After transferring or editing a file, it may happen that line breaks are wrong, what may manifest as: Line breaks are lost.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh, so have I. But I am a strong advocate of telling implementations that haven’t read RFCs to go take a long walk off a short pier.
It’s definitely possible and we should do it. Just, no one has written the code yet 😃
It’ll be a bit hacky because of how our buffering works. Right now we search for
\r\n\r\n
and track how much of the string we’ve searched. For this I think the fastest approach will be to use a regex to search for\n\r?\n
, and also track how much we’ve searched.