question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for servers with broken line endings

See original GitHub issue

I’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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
Lukasacommented, Jun 4, 2016

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.

1reaction
njsmithcommented, Nov 5, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found