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

Function req_set_body_data

modules/md/md_http.c:195–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)
197{
198 apr_bucket_brigade *bbody = NULL;
199 apr_status_t rv;
200
201 if (body && body->len > 0) {
202 bbody = apr_brigade_create(req->pool, req->http->bucket_alloc);
203 rv = apr_brigade_write(bbody, NULL, NULL, body->data, body->len);
204 if (rv != APR_SUCCESS) {
205 return rv;
206 }
207 }
208 return req_set_body(req, content_type, bbody, body? (apr_off_t)body->len : 0, 0);
209}
210
211static apr_status_t req_create(md_http_request_t **preq, md_http_t *http,
212 const char *method, const char *url,

Callers 1

md_http_POSTd_createFunction · 0.85

Calls 1

req_set_bodyFunction · 0.85

Tested by

no test coverage detected