Permalink
Browse files

Fix callbacks in easy perform

Callbacks where only sets when the easy
was enqueued in multi.
  • Loading branch information...
1 parent 87daf7b commit 398122f00afd1f001d4726e9916b5c6ce9b62129 @gravis gravis committed Jun 8, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/typhoeus/easy.rb
View
@@ -242,7 +242,9 @@ def set_option(option, value)
def perform
set_headers()
easy_perform()
- response_code()
+ resp_code = response_code()
+ (resp_code >= 200 and resp_code <= 299) ? success : failure
+ resp_code
end
def set_headers

0 comments on commit 398122f

Please sign in to comment.