comparison OrthancFramework/Sources/RestApi/RestApi.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
180 if (resource.HasHandler(HttpMethod_Get)) 180 if (resource.HasHandler(HttpMethod_Get))
181 { 181 {
182 totalPathsCount_ ++; 182 totalPathsCount_ ++;
183 183
184 StringHttpOutput o1; 184 StringHttpOutput o1;
185 HttpOutput o2(o1, false); 185 HttpOutput o2(o1, false /* assume no keep-alive */, 0);
186 RestApiOutput o3(o2, HttpMethod_Get); 186 RestApiOutput o3(o2, HttpMethod_Get);
187 RestApiGetCall call(o3, restApi_, RequestOrigin_Documentation, "" /* remote IP */, 187 RestApiGetCall call(o3, restApi_, RequestOrigin_Documentation, "" /* remote IP */,
188 "" /* username */, HttpToolbox::Arguments() /* HTTP headers */, 188 "" /* username */, HttpToolbox::Arguments() /* HTTP headers */,
189 uriArguments, UriComponents() /* trailing */, 189 uriArguments, UriComponents() /* trailing */,
190 uri, HttpToolbox::Arguments() /* GET arguments */); 190 uri, HttpToolbox::Arguments() /* GET arguments */);
218 if (resource.HasHandler(HttpMethod_Post)) 218 if (resource.HasHandler(HttpMethod_Post))
219 { 219 {
220 totalPathsCount_ ++; 220 totalPathsCount_ ++;
221 221
222 StringHttpOutput o1; 222 StringHttpOutput o1;
223 HttpOutput o2(o1, false); 223 HttpOutput o2(o1, false /* assume no keep-alive */, 0);
224 RestApiOutput o3(o2, HttpMethod_Post); 224 RestApiOutput o3(o2, HttpMethod_Post);
225 RestApiPostCall call(o3, restApi_, RequestOrigin_Documentation, "" /* remote IP */, 225 RestApiPostCall call(o3, restApi_, RequestOrigin_Documentation, "" /* remote IP */,
226 "" /* username */, HttpToolbox::Arguments() /* HTTP headers */, 226 "" /* username */, HttpToolbox::Arguments() /* HTTP headers */,
227 uriArguments, UriComponents() /* trailing */, 227 uriArguments, UriComponents() /* trailing */,
228 uri, NULL /* body */, 0 /* body size */); 228 uri, NULL /* body */, 0 /* body size */);
256 if (resource.HasHandler(HttpMethod_Delete)) 256 if (resource.HasHandler(HttpMethod_Delete))
257 { 257 {
258 totalPathsCount_ ++; 258 totalPathsCount_ ++;
259 259
260 StringHttpOutput o1; 260 StringHttpOutput o1;
261 HttpOutput o2(o1, false); 261 HttpOutput o2(o1, false /* assume no keep-alive */, 0);
262 RestApiOutput o3(o2, HttpMethod_Delete); 262 RestApiOutput o3(o2, HttpMethod_Delete);
263 RestApiDeleteCall call(o3, restApi_, RequestOrigin_Documentation, "" /* remote IP */, 263 RestApiDeleteCall call(o3, restApi_, RequestOrigin_Documentation, "" /* remote IP */,
264 "" /* username */, HttpToolbox::Arguments() /* HTTP headers */, 264 "" /* username */, HttpToolbox::Arguments() /* HTTP headers */,
265 uriArguments, UriComponents() /* trailing */, uri); 265 uriArguments, UriComponents() /* trailing */, uri);
266 266
293 if (resource.HasHandler(HttpMethod_Put)) 293 if (resource.HasHandler(HttpMethod_Put))
294 { 294 {
295 totalPathsCount_ ++; 295 totalPathsCount_ ++;
296 296
297 StringHttpOutput o1; 297 StringHttpOutput o1;
298 HttpOutput o2(o1, false); 298 HttpOutput o2(o1, false /* assume no keep-alive */, 0);
299 RestApiOutput o3(o2, HttpMethod_Put); 299 RestApiOutput o3(o2, HttpMethod_Put);
300 RestApiPutCall call(o3, restApi_, RequestOrigin_Documentation, "" /* remote IP */, 300 RestApiPutCall call(o3, restApi_, RequestOrigin_Documentation, "" /* remote IP */,
301 "" /* username */, HttpToolbox::Arguments() /* HTTP headers */, 301 "" /* username */, HttpToolbox::Arguments() /* HTTP headers */,
302 uriArguments, UriComponents() /* trailing */, uri, 302 uriArguments, UriComponents() /* trailing */, uri,
303 NULL /* body */, 0 /* body size */); 303 NULL /* body */, 0 /* body size */);