Fix for shutdown bug in http scripts.

- The bug was introduced with the recent 1xx update.

- I updated some tests that seemed be written wrong.
This commit is contained in:
Seth Hall 2011-09-29 21:25:00 -04:00
parent 36dbaa5b92
commit 012d8cfc5f
3 changed files with 5 additions and 4 deletions

View file

@ -172,11 +172,12 @@ event http_reply(c: connection, version: string, code: count, reason: string) &p
local s: State;
c$http_state = s;
}
# If the last response was an informational 1xx, we're still expecting
# the real response to the request, so don't create a new Info record yet.
if ( c$http_state$current_response !in c$http_state$pending ||
! code_in_range(c$http_state$pending[c$http_state$current_response]$status_code, 100, 199) )
(c$http_state$pending[c$http_state$current_response]?$status_code &&
! code_in_range(c$http_state$pending[c$http_state$current_response]$status_code, 100, 199)) )
++c$http_state$current_response;
set_state(c, F, F);