Skip to content

Commit

Permalink
Referer is spelled "Referer" by the HTTP specification:
Browse files Browse the repository at this point in the history
http://en.wikipedia.org/wiki/HTTP_referer

Pulling the header from "Referrer" means that the code to parse the referer header will never be triggered by a real browser.
  • Loading branch information
jsight authored and bstansberry committed Apr 25, 2012
1 parent 691edf4 commit 9d5d2a1
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -52,7 +52,7 @@ public void handle(HttpExchange exchange) throws IOException {
boolean opera = userAgent != null && userAgent.contains("Opera"); boolean opera = userAgent != null && userAgent.contains("Opera");
boolean win = !opera && userAgent != null && userAgent.contains("MSIE"); boolean win = !opera && userAgent != null && userAgent.contains("MSIE");


String referrer = responseHeaders.getFirst("Referrer"); String referrer = responseHeaders.getFirst("Referer");


// Calculate location URL // Calculate location URL
String protocol = "http"; String protocol = "http";
Expand Down

0 comments on commit 9d5d2a1

Please sign in to comment.