Permalink
Browse files

Fix for requests that doesn't contain an HTTP_USER_AGENT

Some APIs like Paypal IPN send back POST requests to your application which doesn't contain an HTTP_USER_AGENT, causing this gem to crash. This little fix avoids this issue.
  • Loading branch information...
1 parent 382514f commit 65209b12109fb41f5c6a6d97ba0241a257547819 @javiertoledo javiertoledo committed May 20, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rack/iframe.rb
View
@@ -38,7 +38,7 @@ def call(env)
protected
def user_agent(env)
- env['HTTP_USER_AGENT']
+ env['HTTP_USER_AGENT'] || []
end
def set_invalid_etag!(env)

0 comments on commit 65209b1

Please sign in to comment.