aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server/httpd_example.erl
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2018-08-27 15:56:19 +0200
committerPéter Dimitrov <[email protected]>2018-08-27 15:56:19 +0200
commit30b5899883282b746b55fbf59b73211bbd071ddd (patch)
treef15195c299ff08d1578c90599952191eb96e1f16 /lib/inets/src/http_server/httpd_example.erl
parent8bb0d5d4049b6b2ec41f6cc3e154e9f688029bef (diff)
parentc492a313ce2893fdb8d5f1215b95d437a00c92de (diff)
downloadotp-30b5899883282b746b55fbf59b73211bbd071ddd.tar.gz
otp-30b5899883282b746b55fbf59b73211bbd071ddd.tar.bz2
otp-30b5899883282b746b55fbf59b73211bbd071ddd.zip
Merge branch 'peterdmv/inets/fix_http_server/OTP-15241' into maint-20
* peterdmv/inets/fix_http_server/OTP-15241: inets: Do not use chunked encoding with 1xx, 204, 304 Change-Id: I4dc1cb6dc62cc5a090d49248c5fbfbb23f33004f
Diffstat (limited to 'lib/inets/src/http_server/httpd_example.erl')
-rw-r--r--lib/inets/src/http_server/httpd_example.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/inets/src/http_server/httpd_example.erl b/lib/inets/src/http_server/httpd_example.erl
index 47a8c48d01..dbf7c44ad3 100644
--- a/lib/inets/src/http_server/httpd_example.erl
+++ b/lib/inets/src/http_server/httpd_example.erl
@@ -22,7 +22,7 @@
-export([print/1]).
-export([get/2, put/2, post/2, yahoo/2, test1/2, get_bin/2, peer/2,new_status_and_location/2]).
--export([newformat/3, post_chunked/3]).
+-export([newformat/3, post_chunked/3, post_204/3]).
%% These are used by the inets test-suite
-export([delay/1, chunk_timeout/3]).
@@ -151,6 +151,12 @@ post_chunked(SessionID, _Env, {last, _Body, undefined} = _Bodychunk) ->
post_chunked(_, _, _Body) ->
exit(body_not_chunked).
+post_204(SessionID, _Env, _Input) ->
+ mod_esi:deliver(SessionID,
+ ["Status: 204 No Content" ++ "\r\n\r\n"]),
+ mod_esi:deliver(SessionID, []).
+
+
newformat(SessionID,_,_) ->
mod_esi:deliver(SessionID, "Content-Type:text/html\r\n\r\n"),
mod_esi:deliver(SessionID, top("new esi format test")),