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

Function ap_proxy_http_request

modules/proxy/mod_proxy_http.c:670–707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

668}
669
670static int ap_proxy_http_request(proxy_http_req_t *req)
671{
672 int rv;
673 request_rec *r = req->r;
674
675 /* send the request header/body, if any. */
676 switch (req->rb_method) {
677 case RB_SPOOL_CL:
678 case RB_STREAM_CL:
679 case RB_STREAM_CHUNKED:
680 if (req->do_100_continue) {
681 rv = ap_proxy_pass_brigade(req->bucket_alloc, r, req->backend,
682 req->origin, req->header_brigade, 1);
683 }
684 else {
685 rv = stream_reqbody(req);
686 }
687 break;
688
689 default:
690 /* shouldn't be possible */
691 rv = HTTP_INTERNAL_SERVER_ERROR;
692 break;
693 }
694
695 if (rv != OK) {
696 conn_rec *c = r->connection;
697 /* apr_status_t value has been logged in lower level method */
698 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01097)
699 "pass request body failed to %pI (%s) from %s (%s)",
700 req->backend->addr,
701 req->backend->hostname ? req->backend->hostname: "",
702 c->client_ip, c->remote_host ? c->remote_host: "");
703 return rv;
704 }
705
706 return OK;
707}
708
709/*
710 * If the date is a valid RFC 850 date or asctime() date, then it

Callers 1

proxy_http_handlerFunction · 0.85

Calls 2

ap_proxy_pass_brigadeFunction · 0.85
stream_reqbodyFunction · 0.85

Tested by

no test coverage detected