diff options
author | Zandra Hird <[email protected]> | 2015-05-18 10:52:01 +0200 |
---|---|---|
committer | Zandra Hird <[email protected]> | 2015-05-18 10:52:01 +0200 |
commit | bcc5248a76ee692ede18367a1f3d6cd9acd6cde7 (patch) | |
tree | aef5714d1f5caa9292e5891ab9c580a2d53d7e14 /lib/inets/src/http_server/httpd_request.erl | |
parent | 40732b962a7bf6300f82f5662a68df2f940b2026 (diff) | |
parent | 10e8677c632df5f9433eb771076d1ff71c7ed75d (diff) | |
download | otp-bcc5248a76ee692ede18367a1f3d6cd9acd6cde7.tar.gz otp-bcc5248a76ee692ede18367a1f3d6cd9acd6cde7.tar.bz2 otp-bcc5248a76ee692ede18367a1f3d6cd9acd6cde7.zip |
Merge branch 'maint'
Conflicts:
OTP_VERSION
lib/ssh/doc/src/ssh.xml
lib/ssh/vsn.mk
Diffstat (limited to 'lib/inets/src/http_server/httpd_request.erl')
-rw-r--r-- | lib/inets/src/http_server/httpd_request.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/inets/src/http_server/httpd_request.erl b/lib/inets/src/http_server/httpd_request.erl index 6985065c3e..3ff07616f9 100644 --- a/lib/inets/src/http_server/httpd_request.erl +++ b/lib/inets/src/http_server/httpd_request.erl @@ -417,8 +417,12 @@ check_header({"content-length", Value}, Maxsizes) -> case length(Value) =< MaxLen of true -> try - _ = list_to_integer(Value), - ok + list_to_integer(Value) + of + I when I>= 0 -> + ok; + _ -> + {error, {size_error, Max, 411, "negative content-length"}} catch _:_ -> {error, {size_error, Max, 411, "content-length not an integer"}} end; |