Created
January 28, 2011 20:41
-
-
Save fallwith/800906 to your computer and use it in GitHub Desktop.
Rails controller code to dump raw HTTP headers from a request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logger.warn "*** BEGIN RAW REQUEST HEADERS ***" | |
self.request.env.each do |header| | |
logger.warn "HEADER KEY: #{header[0]}" | |
logger.warn "HEADER VAL: #{header[1]}" | |
end | |
logger.warn "*** END RAW REQUEST HEADERS ***" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@neilsy The
HTTP_
prefix gets added for all request headers by rails / rack AFAIK, it does not come from the actual client request.