Permalink
Browse files

NotModified Exception should contain the response so that clients can…

… have access to the response HTTP headers
  • Loading branch information...
1 parent 109ad55 commit 785ca179daeca205a711fa03908050ba9f7a8e6e Cyril Rohr committed with Feb 2, 2009
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/restclient/exceptions.rb
  2. +1 −1 lib/restclient/request.rb
@@ -30,7 +30,7 @@ def initialize(url)
end
end
- class NotModified < Exception
+ class NotModified < ExceptionWithResponse
ErrorMessage = 'NotModified'
end
@@ -135,7 +135,7 @@ def process_result(res)
raise Redirect, url
elsif res.code == "304"
- raise NotModified
+ raise NotModified, res
elsif res.code == "401"
raise Unauthorized, res
elsif res.code == "404"

0 comments on commit 785ca17

Please sign in to comment.