Mercurial > hg > orthanc
comparison OrthancFramework/Sources/HttpServer/IHttpHandler.cpp @ 5119:bdec57f3cbf2
New configuration KeepAliveTimeout with a default value of 1 second
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 14 Dec 2022 11:50:43 +0100 |
parents | 43e613a7756b |
children | 0ea402b4d901 |
comparison
equal
deleted
inserted
replaced
5118:030cd210845e | 5119:bdec57f3cbf2 |
---|---|
43 UriComponents curi; | 43 UriComponents curi; |
44 HttpToolbox::GetArguments getArguments; | 44 HttpToolbox::GetArguments getArguments; |
45 HttpToolbox::ParseGetQuery(curi, getArguments, uri.c_str()); | 45 HttpToolbox::ParseGetQuery(curi, getArguments, uri.c_str()); |
46 | 46 |
47 StringHttpOutput stream; | 47 StringHttpOutput stream; |
48 HttpOutput http(stream, false /* no keep alive */); | 48 HttpOutput http(stream, false /* assume no keep-alive */, 0); |
49 | 49 |
50 if (handler.Handle(http, origin, LOCALHOST, "", HttpMethod_Get, curi, | 50 if (handler.Handle(http, origin, LOCALHOST, "", HttpMethod_Get, curi, |
51 httpHeaders, getArguments, NULL /* no body for GET */, 0)) | 51 httpHeaders, getArguments, NULL /* no body for GET */, 0)) |
52 { | 52 { |
53 stream.GetBody(answerBody); | 53 stream.GetBody(answerBody); |
80 | 80 |
81 UriComponents curi; | 81 UriComponents curi; |
82 Toolbox::SplitUriComponents(curi, uri); | 82 Toolbox::SplitUriComponents(curi, uri); |
83 | 83 |
84 StringHttpOutput stream; | 84 StringHttpOutput stream; |
85 HttpOutput http(stream, false /* no keep alive */); | 85 HttpOutput http(stream, false /* assume no keep-alive */, 0); |
86 | 86 |
87 if (handler.Handle(http, origin, LOCALHOST, "", method, curi, | 87 if (handler.Handle(http, origin, LOCALHOST, "", method, curi, |
88 httpHeaders, getArguments, bodyData, bodySize)) | 88 httpHeaders, getArguments, bodyData, bodySize)) |
89 { | 89 { |
90 stream.GetBody(answerBody); | 90 stream.GetBody(answerBody); |
139 Toolbox::SplitUriComponents(curi, uri); | 139 Toolbox::SplitUriComponents(curi, uri); |
140 | 140 |
141 HttpToolbox::GetArguments getArguments; // No GET argument for DELETE | 141 HttpToolbox::GetArguments getArguments; // No GET argument for DELETE |
142 | 142 |
143 StringHttpOutput stream; | 143 StringHttpOutput stream; |
144 HttpOutput http(stream, false /* no keep alive */); | 144 HttpOutput http(stream, false /* assume no keep-alive */, 0); |
145 | 145 |
146 if (handler.Handle(http, origin, LOCALHOST, "", HttpMethod_Delete, curi, | 146 if (handler.Handle(http, origin, LOCALHOST, "", HttpMethod_Delete, curi, |
147 httpHeaders, getArguments, NULL /* no body for DELETE */, 0)) | 147 httpHeaders, getArguments, NULL /* no body for DELETE */, 0)) |
148 { | 148 { |
149 if (answerHeaders != NULL) | 149 if (answerHeaders != NULL) |