diff options
-rw-r--r-- | include/ap_compat.h | 1 | ||||
-rw-r--r-- | modules/cache/mod_file_cache.c | 2 | ||||
-rw-r--r-- | modules/dav/main/mod_dav.c | 30 | ||||
-rw-r--r-- | modules/experimental/mod_example.c | 1 | ||||
-rw-r--r-- | modules/generators/mod_asis.c | 1 | ||||
-rw-r--r-- | modules/generators/mod_autoindex.c | 2 | ||||
-rw-r--r-- | modules/generators/mod_cgi.c | 1 | ||||
-rw-r--r-- | modules/generators/mod_cgid.c | 2 | ||||
-rw-r--r-- | modules/generators/mod_info.c | 1 | ||||
-rw-r--r-- | modules/generators/mod_status.c | 2 | ||||
-rw-r--r-- | modules/http/http_protocol.c | 8 | ||||
-rw-r--r-- | modules/http/mod_core.h | 11 | ||||
-rw-r--r-- | modules/mappers/mod_imap.c | 2 | ||||
-rw-r--r-- | modules/test/mod_autoindex.c | 2 | ||||
-rw-r--r-- | modules/test/mod_rndchunk.c | 1 | ||||
-rw-r--r-- | modules/test/mod_test_util_uri.c | 1 | ||||
-rw-r--r-- | support/httpd.exp | 1 |
17 files changed, 7 insertions, 62 deletions
diff --git a/include/ap_compat.h b/include/ap_compat.h index 2614b167e7..facc2561a2 100644 --- a/include/ap_compat.h +++ b/include/ap_compat.h @@ -7,5 +7,6 @@ /* redefine 1.3.x symbols to the new symbol names */ #define MODULE_VAR_EXPORT AP_MODULE_DECLARE_DATA +#define ap_send_http_header(r) ; #endif /* APR_COMPAT_H */ diff --git a/modules/cache/mod_file_cache.c b/modules/cache/mod_file_cache.c index 3e4f7a01df..697f676533 100644 --- a/modules/cache/mod_file_cache.c +++ b/modules/cache/mod_file_cache.c @@ -468,8 +468,6 @@ static int file_cache_handler(request_rec *r) r->clength = match->finfo.size; apr_table_setn(r->headers_out, "Content-Length", match->sizestr); - ap_send_http_header(r); - /* Call appropriate handler */ if (!r->header_only) { if (match->is_mmapped == TRUE) diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c index 3c7ab332d5..e5e09fd720 100644 --- a/modules/dav/main/mod_dav.c +++ b/modules/dav/main/mod_dav.c @@ -364,8 +364,6 @@ static int dav_error_response(request_rec *r, int status, const char *body) (void) ap_discard_request_body(r); /* begin the response now... */ - ap_send_http_header(r); - ap_rvputs(r, DAV_RESPONSE_BODY_1, r->status_line, @@ -416,10 +414,7 @@ static void dav_send_multistatus(request_rec *r, int status, r->status = status; r->content_type = DAV_XML_CONTENT_TYPE; - /* Send all of the headers now */ - ap_send_http_header(r); - - /* Send the actual multistatus response now... */ + /* Send the headers and actual multistatus response now... */ ap_rputs(DAV_XML_HEADER DEBUG_CR "<D:multistatus xmlns:D=\"DAV:\"", r); @@ -847,7 +842,6 @@ static int dav_method_get(request_rec *r) } if (r->header_only) { - ap_send_http_header(r); return DONE; } @@ -871,9 +865,6 @@ static int dav_method_get(request_rec *r) return dav_handle_err(r, err, NULL); } - /* all set. send the headers now. */ - ap_send_http_header(r); - buffer = apr_palloc(r->pool, DAV_READ_BLOCKSIZE); while (1) { apr_size_t amt; @@ -1739,8 +1730,7 @@ static int dav_method_options(request_rec *r) if (doc == NULL) { ap_set_content_length(r, 0); - /* ### this will send a Content-Type. the default OPTIONS does not. */ - ap_send_http_header(r); + /* ### this sends a Content-Type. the default OPTIONS does not. */ /* ### the default (ap_send_http_options) returns OK, but I believe * ### that is because it is the default handler and nothing else @@ -1785,10 +1775,7 @@ static int dav_method_options(request_rec *r) r->status = HTTP_OK; r->content_type = DAV_XML_CONTENT_TYPE; - /* send the headers */ - ap_send_http_header(r); - - /* send the response body */ + /* send the headers and response body */ ap_rputs(DAV_XML_HEADER DEBUG_CR "<D:options-response xmlns:D=\"DAV:\">" DEBUG_CR, r); @@ -2976,8 +2963,6 @@ static int dav_method_lock(request_rec *r) r->status = HTTP_OK; r->content_type = DAV_XML_CONTENT_TYPE; - ap_send_http_header(r); - ap_rputs(DAV_XML_HEADER DEBUG_CR "<D:prop xmlns:D=\"DAV:\">" DEBUG_CR, r); if (lock == NULL) ap_rputs("<D:lockdiscovery/>" DEBUG_CR, r); @@ -3201,7 +3186,6 @@ static int dav_method_vsn_control(request_rec *r) /* no body */ ap_set_content_length(r, 0); - ap_send_http_header(r); return DONE; } @@ -3478,7 +3462,6 @@ static int dav_method_uncheckout(request_rec *r) /* no body */ ap_set_content_length(r, 0); - ap_send_http_header(r); return DONE; } @@ -3708,7 +3691,6 @@ static int dav_method_set_target(request_rec *r) /* no body */ ap_set_content_length(r, 0); - ap_send_http_header(r); return DONE; } @@ -3893,7 +3875,6 @@ static int dav_method_label(request_rec *r) /* no body */ ap_set_content_length(r, 0); - ap_send_http_header(r); return DONE; } @@ -3948,10 +3929,7 @@ static int dav_method_report(request_rec *r) r->status = HTTP_OK; r->content_type = DAV_XML_CONTENT_TYPE; - /* send the headers and start a timeout */ - ap_send_http_header(r); - - /* send the response body */ + /* send the headers and response body */ ap_rputs(DAV_XML_HEADER DEBUG_CR, r); for (t = hdr.first; t != NULL; t = t->next) diff --git a/modules/experimental/mod_example.c b/modules/experimental/mod_example.c index 5b309f8938..5d8de38777 100644 --- a/modules/experimental/mod_example.c +++ b/modules/experimental/mod_example.c @@ -514,7 +514,6 @@ static int example_handler(request_rec *r) * is broken. */ r->content_type = "text/html"; - ap_send_http_header(r); /* * If we're only supposed to send header information (HEAD request), we're * already there. diff --git a/modules/generators/mod_asis.c b/modules/generators/mod_asis.c index aa3567a844..63594236d5 100644 --- a/modules/generators/mod_asis.c +++ b/modules/generators/mod_asis.c @@ -117,7 +117,6 @@ static int asis_handler(request_rec *r) return OK; } - ap_send_http_header(r); if (!r->header_only) { ap_send_fd(f, r, 0, r->finfo.size, &nbytes); } diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 36584efe11..8ede153343 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -1568,8 +1568,6 @@ static int index_directory(request_rec *r, ap_set_last_modified(r); ap_set_etag(r); - ap_send_http_header(r); - if (r->header_only) { apr_dir_close(thedir); return 0; diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index a3f907b62c..3431936985 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -767,7 +767,6 @@ static int cgi_handler(request_rec *r) return HTTP_MOVED_TEMPORARILY; } - ap_send_http_header(r); if (!r->header_only) { bb = apr_brigade_create(r->pool); b = apr_bucket_pipe_create(script_in); diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 03be51eb97..ceae66af0c 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -999,7 +999,6 @@ static int cgid_handler(request_rec *r) return HTTP_MOVED_TEMPORARILY; } - ap_send_http_header(r); if (!r->header_only) { bb = apr_brigade_create(r->pool); b = apr_bucket_pipe_create(tempsock); @@ -1198,7 +1197,6 @@ static int include_cmd(include_ctx_t *ctx, apr_bucket_brigade **bb, char *comman return HTTP_MOVED_TEMPORARILY; } - ap_send_http_header(r); if (!r->header_only) { bcgi = apr_brigade_create(r->pool); b = apr_bucket_pipe_create(tempsock); diff --git a/modules/generators/mod_info.c b/modules/generators/mod_info.c index bdfe2a7fd3..f5287daa6e 100644 --- a/modules/generators/mod_info.c +++ b/modules/generators/mod_info.c @@ -285,7 +285,6 @@ static int display_info(request_rec *r) return DECLINED; r->content_type = "text/html"; - ap_send_http_header(r); if (r->header_only) { return 0; } diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index 8e86f43ef1..18ae03f3ae 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -309,8 +309,6 @@ static int status_handler(request_rec *r) } } - ap_send_http_header(r); - if (r->header_only) return 0; diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 8eca28f829..e7f76d9494 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -1081,7 +1081,6 @@ AP_DECLARE(int) ap_send_http_trace(request_rec *r) return rv; r->content_type = "message/http"; - ap_send_http_header(r); /* Now we recreate the request, and echo it back */ @@ -1201,10 +1200,6 @@ static void fixup_vary(request_rec *r) } } -AP_DECLARE(void) ap_send_http_header(request_rec *r) -{ -} - typedef struct header_filter_cts { int headers_sent; } header_filter_ctx; @@ -1944,7 +1939,6 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) } if (status == HTTP_NO_CONTENT) { - ap_send_http_header(r); ap_finalize_request_protocol(r); return; } @@ -1981,8 +1975,6 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) apr_table_setn(r->headers_out, "Allow", make_allow(r)); } - ap_send_http_header(r); - if (r->header_only) { ap_finalize_request_protocol(r); return; diff --git a/modules/http/mod_core.h b/modules/http/mod_core.h index 63e9fad163..e9ff827ed1 100644 --- a/modules/http/mod_core.h +++ b/modules/http/mod_core.h @@ -83,19 +83,12 @@ char *ap_response_code_string(request_rec *r, int error_index); * @param r The current request * @param bb The brigade to add the header to. * @warning Modules should be very careful about using this, and should - * prefer ap_send_http_header(). Much of the HTTP/1.1 implementation - * correctness depends on code in ap_send_http_header(). + * the default behavior. Much of the HTTP/1.1 implementation + * correctness depends on the full headers. * @deffunc void ap_basic_http_header(request_rec *r, apr_bucket_brigade *bb) */ AP_DECLARE(void) ap_basic_http_header(request_rec *r, apr_bucket_brigade *bb); -/** - * Send the Status-Line and header fields for HTTP response - * @param r The current request - * @deffunc void ap_send_http_header(request_rec *r) - */ -AP_DECLARE(void) ap_send_http_header(request_rec *r); - AP_DECLARE(int) ap_send_http_trace(request_rec *r); int ap_send_http_options(request_rec *r); diff --git a/modules/mappers/mod_imap.c b/modules/mappers/mod_imap.c index 6f200ab4e3..c29567e90f 100644 --- a/modules/mappers/mod_imap.c +++ b/modules/mappers/mod_imap.c @@ -522,8 +522,6 @@ static int imap_reply(request_rec *r, char *redirect) static void menu_header(request_rec *r, char *menu) { r->content_type = "text/html"; - ap_send_http_header(r); - ap_rvputs(r, DOCTYPE_HTML_3_2, "<html><head>\n<title>Menu for ", r->uri, "</title>\n</head><body>\n", NULL); diff --git a/modules/test/mod_autoindex.c b/modules/test/mod_autoindex.c index fe601e814d..d875082a85 100644 --- a/modules/test/mod_autoindex.c +++ b/modules/test/mod_autoindex.c @@ -1566,8 +1566,6 @@ static int index_directory(request_rec *r, ap_set_last_modified(r); ap_set_etag(r); - ap_send_http_header(r); - if (r->header_only) { apr_dir_close(thedir); return 0; diff --git a/modules/test/mod_rndchunk.c b/modules/test/mod_rndchunk.c index c0d323ff46..6eeae175ac 100644 --- a/modules/test/mod_rndchunk.c +++ b/modules/test/mod_rndchunk.c @@ -105,7 +105,6 @@ static int send_rndchunk(request_rec *r) return DECLINED; r->content_type = "text/html"; - ap_send_http_header(r); if(r->header_only) { return 0; } diff --git a/modules/test/mod_test_util_uri.c b/modules/test/mod_test_util_uri.c index ff6bead1ea..5472243568 100644 --- a/modules/test/mod_test_util_uri.c +++ b/modules/test/mod_test_util_uri.c @@ -270,7 +270,6 @@ static int test_util_uri(request_rec *r) return DECLINED; r->content_type = "text/html"; - ap_send_http_header(r); if(r->header_only) { return 0; } diff --git a/support/httpd.exp b/support/httpd.exp index 1dd12d8810..76d89d0755 100644 --- a/support/httpd.exp +++ b/support/httpd.exp @@ -282,7 +282,6 @@ ap_scoreboard_fname ap_scoreboard_image ap_send_error_response ap_send_fd -ap_send_http_header ap_send_http_options ap_send_http_trace ap_send_mmap |