| 193 | } |
| 194 | |
| 195 | static 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 | |
| 211 | static apr_status_t req_create(md_http_request_t **preq, md_http_t *http, |
| 212 | const char *method, const char *url, |
no test coverage detected