Netflix-Skunkworks/sketchy

BUG: "accept-encoding: foo" in capture.js

westurner opened this issue · 4 comments

Hello,

Mozilla uses title case for Http Headers. Here is an example:

GET / HTTP/1.1
Host: ec2-xxx-xxx-xxx-xxx.amazonaws.com:7001
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Firefox/31.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Cookie: foo=bar
Connection: keep-alive

Also the documentation in PhantomJS to set custom headers shows title case: http://phantomjs.org/api/webpage/property/custom-headers.html

Can you point out why this would be a bug? I also checked Chrome and they use title case for http headers.

The capitalization is not the bug (I suppose most servers do (lower-)case normalization anyway).

I think the 'bug' is the extra (invalid) 'accept-encoding' header. (coverage)

Hi Wes,

I'm setting an invalid accept-encoding header due to a bug in PhantomJS with compression (see ariya/phantomjs#10930). I was having an issue sketching specific sites and only until I nullified the accept-encoding header the issue was still present.

As an alternative, I can simply remove the 'foo' and just set Accept-Encoding to nothing which would accomplish the same goal (disabling compression).

Thanks for clarifying!

Wes Turner

On Fri, Aug 29, 2014 at 10:34 AM, Scott Behrens notifications@github.com
wrote:

Closed #2 #2 via 886803e
886803e
.


Reply to this email directly or view it on GitHub
#2 (comment).