MCPcopy Create free account
hub / github.com/apache/httpd / send_request_body

Function send_request_body

modules/proxy/mod_proxy_scgi.c:334–357  ·  view source on GitHub ↗

* Send request body (if any) */

Source from the content-addressed store, hash-verified

332 * Send request body (if any)
333 */
334static int send_request_body(request_rec *r, proxy_conn_rec *conn)
335{
336 if (ap_should_client_block(r)) {
337 char *buf = apr_palloc(r->pool, AP_IOBUFSIZE);
338 int status;
339 long readlen;
340
341 readlen = ap_get_client_block(r, buf, AP_IOBUFSIZE);
342 while (readlen > 0) {
343 status = sendall(conn, buf, (apr_size_t)readlen, r);
344 if (status != OK) {
345 return HTTP_SERVICE_UNAVAILABLE;
346 }
347 readlen = ap_get_client_block(r, buf, AP_IOBUFSIZE);
348 }
349 if (readlen == -1) {
350 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00859)
351 "receiving request body failed");
352 return HTTP_INTERNAL_SERVER_ERROR;
353 }
354 }
355
356 return OK;
357}
358
359
360/*

Callers 1

scgi_handlerFunction · 0.85

Calls 3

ap_should_client_blockFunction · 0.85
ap_get_client_blockFunction · 0.85
sendallFunction · 0.85

Tested by

no test coverage detected