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

Fix for "Transfer-Encoding" header occasionally returned in lower-case #63

Merged
merged 1 commit into from Apr 22, 2014

Conversation

Projects
None yet
7 participants
@fubar

fubar commented Apr 22, 2014

Relatively rarely, connecting to the Streaming API at https://stream.twitter.com/1.1/statuses/filter returns the "Transfer-Encoding" header in lower-case: "transfer-encoding: chunked". This currently triggers the Exception "Twitter did not send a chunking header. Is this really HTTP/1.1? (...)" (line 745).

I've opened a discussion on the Twitter dev site for this bug (currently awaiting moderation): https://dev.twitter.com/discussions/27837

Whether they can resolve it or not, it doesn't hurt to tolerate the lower-case version.

DarrenCook added a commit that referenced this pull request Apr 22, 2014

Merge pull request #63 from fubar/master
Fix for "Transfer-Encoding" header occasionally returned in lower-case

@DarrenCook DarrenCook merged commit 408d782 into fennb:master Apr 22, 2014

@andyyoung

This comment has been minimized.

andyyoung commented Apr 22, 2014

👍 fix speedily taken advantage of by https://github.com/andyyoung/Selective-Tweets, cheers!

@joetek

This comment has been minimized.

joetek commented Apr 23, 2014

Thanks for the quick fix!

@fennb

This comment has been minimized.

Owner

fennb commented Apr 23, 2014

Yup, thanks heaps for the very fast fix!

@AndresJ551

This comment has been minimized.

AndresJ551 commented on 1558e18 Apr 24, 2014

Thanks for fixing this!

This comment has been minimized.

Owner

fennb replied Apr 25, 2014

Yes, thank you!

This reminds me that the HTTP spec does not require case-sensitivity for headers, so we probably should use strtolower() in all cases when reading headers from HTTP responses.

This comment has been minimized.

rickumali replied Apr 25, 2014

Thanks @fennb ! This fix helped me out.

This comment has been minimized.

Owner

fennb replied Apr 28, 2014

@rickumali Don't thank me, thank @hootphil !

This comment has been minimized.

rickumali replied Apr 28, 2014

Hi @hootphil, thanks for this fix! 👍

@fubar

This comment has been minimized.

fubar commented Apr 26, 2014

You're right @fennb, HTTP header field names are case-insensitive indeed. See https://dev.twitter.com/discussions/27837#comment-63086

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment