Engineers here at Twitter are always looking for ways to increase efficiency and simplify our codebase. To that end, we’re deprecating HTTP 1.0 support for all streaming API endpoints. While our streaming API continues to grow, this version of the protocol is rarely used. Also, its successor (HTTP 1.1, introduced in 1999) offers features that are useful for streamed responses.
One of the biggest advantages HTTP 1.1 offers over 1.0 with regard to streamed data is its introduction of the Transfer-Encoding: chunked header. Use of chunked transfer encoding allows applications to more effectively manage read buffers, as chunk sizes are interleaved with data as Tweets are written to the stream.
Currently about 2 - 3% of streaming requests are HTTP 1.0. Despite the low volume, these requests are spaced out across a large number of user agents, so there’s a long tail of clients using 1.0. We’re reaching out to a few of the biggest sources of requests, but you should make sure that your streaming code is compatible with this change:
To identify a HTTP 1.0 response, look for the version in the response header line, as well as a Connection: close response header:
HTTP/1.0 200 OK Content-Type: application/json Connection: close
An HTTP 1.1 response will contain a Transfer-Encoding: chunked header:
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked
We will continue to evaluate the impact of this change before setting a date for when to remove HTTP 1.0 support, and we’ll share that date as soon as we know it. Please note that if you are a consumer of the REST API, you will be unaffected by this change. Also note that despite the version numbers being identical, this change is unrelated to Twitter’s API v1 retirement.
Please use this discussion thread to report any questions or feedback.
HTTP 1.0 will be deprecated on November 6, 2013 for User & Site Streams, and on January 13, 2014 for all other streaming endpoints.