1
0
Fork 0
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:
gilles 2010-04-26 19:05:02 -07:00 committed by Sandro Turriate
parent ab65829f1e
commit fc77a6ce50

View file

@ -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