mnot / redbot
- Source
- Commits
- Network (4)
- Issues (23)
- Graphs
-
Branch:
master
-
Unable to submit request when using custom headers
2 comments Created about 1 month ago by solarissmokeHi,
This issue is with the public instance of RED.
I'm finding that if I try to use a custom header (either a completely new header or a customised string for one of the existing header options) with the "add headers" feature, then hitting return doesn't submit the form (and there doesn't appear to be any other way to do it). It works fine with the pre-defined headers. This is on Firefox 3.5.4 on WinXP.
Incidentally, I tried using IE8 to see if it works there, and the entire "add headers" feature is broken in IE! The second input field (where you choose the specific header) never appears.
Comments
-
new tooltip style pop scrolbar; difficult to view
2 comments Created 2 months ago by cburroughsThe new tooltip messages will pop the scrollbar if they are long, but their is no reasonable way to scroll down without moving the mouse... which causes the tooltip to go away.
Comments
-
Comments in headers can be nested according to the RFC2616 definition. RED does not recognise such nested comments and can therefore give spurious warnings for headers that are in fact valid.
For example, the RED results for www.velocix.com show a warning "The Via header's syntax isn't valid" for the following header which is actually valid:
Via: 1.1 velocix.com:80 (pcd/26.1.10.31395 (2009-09-11 08:50:08 UTC))RED's inability to cope with nested comments appears to be a known issue (without an actual issue to record it until now). See the comment in the RED source. Probably not fixed yet due to the difficulty of coping with parenthesis nesting in a regex.
Comments
-
Traceback (most recent call last): File "/tmp/cool/cool-stuff/red/webui.py", line 652, in RedWebUi(test_uri, base_uri, output, descend) File "/tmp/cool/cool-stuff/red/webui.py", line 106, in __init__ body_procs=[link_parser.feed], File "/tmp/cool/cool-stuff/red/red.py", line 74, in __init__ status_cb, body_procs, req_type=method) File "/tmp/cool/cool-stuff/red/red_fetcher.py", line 117, in __init__ self._makeRequest() File "/tmp/cool/cool-stuff/red/red_fetcher.py", line 147, in _makeRequest nbhttp.run() File "/tmp/cool/cool-stuff/nbhttp/push_tcp.py", line 476, in run what() File "/tmp/cool/cool-stuff/nbhttp/push_tcp.py", line 495, in cb callback(*args) File "/tmp/cool/cool-stuff/red/webui.py", line 203, in timeoutError self.output("***", conn.uri.encode('utf-8', 'replace')) TypeError: output() takes exactly 1 argument (2 given)Comments
Should be fixed in
http://github.com/mnot/redbot/commit/9bf99d4ebc7f2d4fc562d4294f7f0b021b5aeb5bthanks!
-
Potentially incorrect detection of HTTP compression if server-side UA filtering is used
5 comments Created 4 months ago by MortyEUIt is debatable whether this is a bug and whether it should be fixed or not...
While playing around with redbot.org I noticed that it listed jQuery hosted on Google's CDN as not using HTTP compression. This made me wonder, as I'm pretty sure this CDN uses compression.
Upon examination with http://www.rexswain.com/httpview.html it seems that Googles CDN uses the "User-Agent" request string. If Google recognizes the browser as a 'whitelisted' browser, say Firefox or MSIE 7, then they'll return a compressed response. If I enter some garbage in the User-Agent string, they'll return un-compressed content.
Now, arguably what redbot does now (sending its own user-agent string / a framework default string) is perfectly standards compliant. At the same time, the whitelisting of known-to-work browsers is very common, as there have been many browser bugs around HTTP compression (Netscape 4, MSIE 6, many mobile phone browsers).
I noticed this around HTTP compression, but of course the issue is more general, as User-Agent matching could be done to several kinds of HTTP responses / payloads.
Perhaps redbot should masquerade as a Firefox 3 or a similar modern browser? Or have it as an option?
Comments
I should clarify: If I send a request with a valid "accept-encoding: gzip" header AND a nonsensical "User-Agent" header, then Google does not compress the response, despite the presence of a valid "accept-encoding" header.
I think it's worthwhile considering this as an option, but I'd note that the practice isn't good; to make it kosher you have to Vary: Accept-Encoding, User-Agent, and that's going to pollute caches quite a bit.
Additionally, it cheats UAs that are well-implemented but not on the whitelist out of compressed responses.
All of that said, one of the planned directions for RED is to allow more control over the request; e.g., allowing different methods, custom headers, request bodies. This would definitely fall into that.
I completely agree with you on the 'badness' of this practice. But as noted, some people are doing this in production on larger sites today.
Thank you for the consideration, and for RED! :-)
-
I'm serving an incorrect Date header at tomayko.com when the Age is > 0 (refresh the following until you get a Age value > 5 or so to see RED detect this):
http://redbot.org/?uri=http%3A%2F%2Ftomayko.com%2F
RED detects the skew but displays the message "The server's clock is none." instead of "The server's clock is ahead.".
The issue is caused by Nginx overwriting the Date header set by downstream servers. In this case, Rack::Cache is setting the Date header to the time when the response was last validated with the origin and the Age header to the number of seconds since last validation (correct per my reading of RFC 2616) but the Date value is then being overwritten as it passes through Nginx.
I'm able to get the message to display "The server's clock is ahead." by commenting out lines 988/999 here:
http://github.com/mnot/redbot/blob/8b861f08e327019c45ee10f38edd45159ed779a3/src/red.py#L988
I assume this will cause issues elsewhere, however.
Comments
Okay, I think I may have found it (ageskew branch):
http://github.com/rtomayko/redbot/commit/c957caaaa782ae69dfcf5c4b118ef6b3b9c1242a
We check for skew using the response timestamp plus the value of the age header but report it based on the date header alone.
Also, the more I look at this, the more I wonder if my reading of RFC 2616 is wrong. You're using the locally generated response timestamp plus the Age header to calculate the current server time instead of using the Date header plus the Age header. My understanding is that the Date is when the message was generated (or last validated) at the origin. The Date + Age should be the best approximation of the nearest server/intermediary's current time.
-
RED would like some pretty icons for bullet items (GOOD, INFO, BAD). Maybe a favico too.
Comments





Both should be fixed. Some browsers won't submit a form upon 'enter' if there's more than one field on the screen; I've fixed this by listening for a keypress (although I may add an actual 'submit' button in the future, once I figure out how it should look).
The IE8 issue was because of lack of support for 'change' in jQuery live events; while it worked on other browsers, it didn't work for IE (as advertised in the jQuery docs).
Pleae reopen if you find any more problems, and thanks for reporting the issue!
Works fine now, thanks!