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

Function req_set_body

modules/md/md_http.c:171–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171static apr_status_t req_set_body(md_http_request_t *req, const char *content_type,
172 apr_bucket_brigade *body, apr_off_t body_len,
173 int detect_len)
174{
175 apr_status_t rv = APR_SUCCESS;
176
177 if (body && detect_len) {
178 rv = apr_brigade_length(body, 1, &body_len);
179 if (rv != APR_SUCCESS) {
180 return rv;
181 }
182 }
183
184 req->body = body;
185 req->body_len = body? body_len : 0;
186 if (content_type) {
187 apr_table_set(req->headers, "Content-Type", content_type);
188 }
189 else {
190 apr_table_unset(req->headers, "Content-Type");
191 }
192 return rv;
193}
194
195static apr_status_t req_set_body_data(md_http_request_t *req, const char *content_type,
196 const md_data_t *body)

Callers 2

req_set_body_dataFunction · 0.85
md_http_POST_createFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected