mirror of
https://github.com/jnunemaker/httparty
synced 2023-03-27 23:23:07 -04:00
fix digest response bug
This commit is contained in:
parent
ab65829f1e
commit
fc77a6ce50
1 changed files with 2 additions and 9 deletions
|
@ -60,15 +60,8 @@ def add_digest_authentication_to(handler)
|
|||
end
|
||||
|
||||
def process_with_digest_authentication(request, response)
|
||||
if authorized?(request)
|
||||
process_without_digest_authentication(request, response)
|
||||
#does not work. At this point response.body_sent is nil and
|
||||
#response.body.string is set to the correct value
|
||||
# -> it's not a stream issue
|
||||
#The else close is never called after this point, yet the result is whatever I put in the else statement
|
||||
# -> don't get it
|
||||
else
|
||||
reply_with(response, 401, "Incorrect. You have 20 seconds to comply.")
|
||||
if authorized?(request) then process_without_digest_authentication(request, response)
|
||||
else reply_with(response, 401, "Incorrect. You have 20 seconds to comply.")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue