From fc77a6ce50b8a43591da1b1efb5a621441ea0dc6 Mon Sep 17 00:00:00 2001 From: gilles Date: Mon, 26 Apr 2010 19:05:02 -0700 Subject: [PATCH] fix digest response bug --- features/steps/mongrel_helper.rb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/features/steps/mongrel_helper.rb b/features/steps/mongrel_helper.rb index 4fc3508..24d98d6 100644 --- a/features/steps/mongrel_helper.rb +++ b/features/steps/mongrel_helper.rb @@ -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