Skip to content

unix new-lines in headers possible #8

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

Closed
wants to merge 1 commit into from

Conversation

dr-diesel
Copy link

"\n" caused E_NOTICE with undefined offset 1

@milo
Copy link
Owner

milo commented Feb 6, 2015

The \r\n is by HTTP specification, should be platform independent. Could you provide all $line dumps?

@dr-diesel
Copy link
Author

It was yesterday on some github api requests, closing headers by "\n" . Unable to reproduce today, maybe some temporary bug. Anyway, cURL recognizes it as header and sends $line into closure, causing setting empty header in array and issuing E_NOTICE "Undefined index 1" . It's matter of opinion if silently ignore invalid headers or issue E_USER_NOTICE or exception. "Undefined index 1" is neither of them.

@milo
Copy link
Owner

milo commented Feb 8, 2015

I think it was due to long header splitted on multiple lines (f8dc2d4).

@milo milo closed this Mar 28, 2015
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