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

Function dav_begin_multistatus

modules/dav/main/mod_dav.c:548–570  ·  view source on GitHub ↗

Factorized helper function: prep request_rec R for a multistatus response and write tag into BB, destined for R->output_filters. Use xml NAMESPACES in initial tag, if non-NULL. */

Source from the content-addressed store, hash-verified

546 R->output_filters. Use xml NAMESPACES in initial tag, if
547 non-NULL. */
548DAV_DECLARE(void) dav_begin_multistatus(apr_bucket_brigade *bb,
549 request_rec *r, int status,
550 apr_array_header_t *namespaces)
551{
552 /* Set the correct status and Content-Type */
553 r->status = status;
554 ap_set_content_type_ex(r, DAV_XML_CONTENT_TYPE, 1);
555
556 /* Send the headers and actual multistatus response now... */
557 ap_fputs(r->output_filters, bb, DAV_XML_HEADER DEBUG_CR
558 "<D:multistatus xmlns:D=\"DAV:\"");
559
560 if (namespaces != NULL) {
561 int i;
562
563 for (i = namespaces->nelts; i--; ) {
564 ap_fprintf(r->output_filters, bb, " xmlns:ns%d=\"%s\"", i,
565 APR_XML_GET_URI_ITEM(namespaces, i));
566 }
567 }
568
569 ap_fputs(r->output_filters, bb, ">" DEBUG_CR);
570}
571
572/* Finish a multistatus response started by dav_begin_multistatus: */
573DAV_DECLARE(apr_status_t) dav_finish_multistatus(request_rec *r,

Callers 2

dav_send_multistatusFunction · 0.85
dav_method_propfindFunction · 0.85

Calls 2

ap_set_content_type_exFunction · 0.85
ap_fprintfFunction · 0.85

Tested by

no test coverage detected