]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Goodbye ap_send_http_header
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 28 Feb 2001 15:24:09 +0000 (15:24 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 28 Feb 2001 15:24:09 +0000 (15:24 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88390 13f79535-47bb-0310-9956-ffa450edef68

17 files changed:
include/ap_compat.h
modules/cache/mod_file_cache.c
modules/dav/main/mod_dav.c
modules/experimental/mod_example.c
modules/generators/mod_asis.c
modules/generators/mod_autoindex.c
modules/generators/mod_cgi.c
modules/generators/mod_cgid.c
modules/generators/mod_info.c
modules/generators/mod_status.c
modules/http/http_protocol.c
modules/http/mod_core.h
modules/mappers/mod_imap.c
modules/test/mod_autoindex.c
modules/test/mod_rndchunk.c
modules/test/mod_test_util_uri.c
support/httpd.exp

index 2614b167e7cd50b185e2fadf6b36414d269f5aec..facc2561a2411a675f79ff842373fd3ea925bf0d 100644 (file)
@@ -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 */
index 3e4f7a01df85a511195d46198df162aed804c90d..697f67653307b097249429e8833d558c645ffdf1 100644 (file)
@@ -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)
index 3c7ab332d5823b9d8e57a44216ffb898b0631fee..e5e09fd7201be1c23a2f548768d681e3b3041fa4 100644 (file)
@@ -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)
index 5b309f89384f6a3ceac76265e1b7ce514e3eb6e4..5d8de3877713f915f80d7f69aad052f0a0053bb0 100644 (file)
@@ -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.
index aa3567a844a358decd3198899887abf1e49f09ed..63594236d57ab72093dd512fd266fdcc9ea11843 100644 (file)
@@ -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);
     }
index 36584efe1104274ea4f00d6a8daa8f37b81f7449..8ede1533439e5c35ff59586a4d3bc8bb2701ca8b 100644 (file)
@@ -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;
index a3f907b62ce27cadce4948f44ec9020116d89389..3431936985098d335f35cbf50290ed74dfd5dd98 100644 (file)
@@ -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);
index 03be51eb97aebec84d73efee283caaa7cf5bc99b..ceae66af0c60c991792728934af1735b260bf731 100644 (file)
@@ -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);
index bdfe2a7fd37b87bdc497b04fa317c878df824720..f5287daa6e36bcc0aaef0f119f6c9ce8be2fa0e2 100644 (file)
@@ -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;
     }
index 8e86f43ef14b4c19e4b05287700e3eb0d20c50dd..18ae03f3ae9738d20ebdb50037fed146896b60db 100644 (file)
@@ -309,8 +309,6 @@ static int status_handler(request_rec *r)
        }
     }
 
-    ap_send_http_header(r);
-
     if (r->header_only)
        return 0;
 
index 8eca28f82962e70ca7da181165e4a7f9fa265b7d..e7f76d949403688793a62fd5e80054f842d0bf84 100644 (file)
@@ -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;
index 63e9fad1634eaa80a309751c24c07dff7f690cab..e9ff827ed1ad96f2bce8e829ce14d14f02e1d69c 100644 (file)
@@ -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);
 
index 6f200ab4e360272a554c558ea6570c965522bfad..c29567e90fbf620f68ced714c18a3be846314259 100644 (file)
@@ -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);
index fe601e814d92daf643120012c4f5b45d3f70c32c..d875082a85dcb43c990c622168c27f954ec6f40e 100644 (file)
@@ -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;
index c0d323ff467fd26c40daa7c102216018801236f5..6eeae175ac2f702acdc3ddf1815c11c123f088d7 100644 (file)
@@ -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;
     }
index ff6bead1eaeca403ada8696a5f2101fa7624d611..5472243568bce88d16548ccef6616e900abaa4a6 100644 (file)
@@ -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;
     }
index 1dd12d881067e3ff3b5e702b0719ad5fea868ce0..76d89d0755784f561cb2d3bf5baa0d4c8ef12707 100644 (file)
@@ -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