aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test/httpd_test_lib.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2015-12-01 10:01:16 +0100
committerIngela Anderton Andin <[email protected]>2015-12-01 10:01:16 +0100
commit552818fd16f1a842e5d206d43bb442de685356da (patch)
tree24f9bbb61dd8bc1700b49fc6dcbf8b381f04d04c /lib/inets/test/httpd_test_lib.erl
parent16801311ad52b6d50b4c462da26b3d34f0736e48 (diff)
parentebbbd714ad2398858b09065bce82830d8affe2a4 (diff)
downloadotp-552818fd16f1a842e5d206d43bb442de685356da.tar.gz
otp-552818fd16f1a842e5d206d43bb442de685356da.tar.bz2
otp-552818fd16f1a842e5d206d43bb442de685356da.zip
Merge branch 'ia/inets/esi-timeout/OTP-13110' into maint
* ia/inets/esi-timeout/OTP-13110: inets: Add warning header in "chunk trailer" when mod_esi callback times out or fails inets: Remove exit that generates an incorrect internal server error
Diffstat (limited to 'lib/inets/test/httpd_test_lib.erl')
-rw-r--r--lib/inets/test/httpd_test_lib.erl16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/inets/test/httpd_test_lib.erl b/lib/inets/test/httpd_test_lib.erl
index a5b836f651..c58966ce10 100644
--- a/lib/inets/test/httpd_test_lib.erl
+++ b/lib/inets/test/httpd_test_lib.erl
@@ -235,11 +235,17 @@ validate(RequestStr, #state{status_line = {Version, StatusCode, _},
_ ->
ok
end,
- do_validate(http_response:header_list(Headers), Options, N, P),
- check_body(RequestStr, StatusCode,
- Headers#http_response_h.'content-type',
- list_to_integer(Headers#http_response_h.'content-length'),
- Body).
+ HList = http_response:header_list(Headers),
+ do_validate(HList, Options, N, P),
+ case lists:keysearch("warning", 1, HList) of
+ {value, _} ->
+ ok;
+ _ ->
+ check_body(RequestStr, StatusCode,
+ Headers#http_response_h.'content-type',
+ list_to_integer(Headers#http_response_h.'content-length'),
+ Body)
+ end.
%--------------------------------------------------------------------
%% Internal functions