BUG: No compression header data when making request using: Accept-Encoding: deflate

  • 2
  • Problem
  • Updated 6 years ago
Heya!

I've run into a small problem when making requests against your API.

As near as I can make out it looks like your server is compressing its response data without the compression header.

To reproduce:

curl -H "accept-encoding: deflate" http://api.wunderground.com/api/cef30... > 1.z

python -c "import zlib,sys;print repr(zlib.decompress(sys.stdin.read()))" < 1.z

Gives:

Traceback (most recent call last):
File "", line 1, in
zlib.error: Error -3 while decompressing data: incorrect header check

Contrasted with:

curl -H "accept-encoding: deflate" "http://search.twitter.com/search.json..." > 2.z

python -c "import zlib,sys;print repr(zlib.decompress(sys.stdin.read()))" < 2.z

Which decompresses the request without problems.

One workaround might be to use "accept-encoding: gzip" but this is unfortunately not an option for me as I'm making the request via http://ql.io :-(

Thank you!

- antoine
Photo of antoinevg

antoinevg

  • 1 Post
  • 0 Reply Likes
  • bemused

Posted 6 years ago

  • 2

Be the first to post a reply!