]> granicus.if.org Git - apache/blobdiff - server/protocol.c
Catch up to apr_dbm projects
[apache] / server / protocol.c
index 0098111aca5c49c0287eefe67d1c52f0bdc69ed5..fa7aecffb1b522a9081c8512e0663726456a1ede 100644 (file)
@@ -94,7 +94,7 @@ AP_DECLARE(void) ap_setup_make_content_type(apr_pool_t *pool)
 /*
  * Builds the content-type that should be sent to the client from the
  * content-type specified.  The following rules are followed:
- *    - if type is NULL, type is set to ap_default_type(r)
+ *    - if type is NULL or "", return NULL (do not set content-type).
  *    - if charset adding is disabled, stop processing and return type.
  *    - then, if there are no parameters on type, add the default charset
  *    - return type
@@ -108,8 +108,8 @@ AP_DECLARE(const char *)ap_make_content_type(request_rec *r, const char *type)
     core_request_config *request_conf;
     apr_size_t type_len;
 
-    if (!type) {
-        type = ap_default_type(r);
+    if (!type || *type == '\0') {
+        return NULL;
     }
 
     if (conf->add_default_charset != ADD_DEFAULT_CHARSET_ON) {
@@ -529,8 +529,8 @@ AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri)
         r->uri = r->parsed_uri.path ? r->parsed_uri.path
                  : apr_pstrdup(r->pool, "/");
 
-#if defined(OS2) || defined(WIN32)
-        /* Handle path translations for OS/2 and plug security hole.
+#if defined(WIN32)
+        /* Handle path translations and plug security hole.
          * This will prevent "http://www.wherever.com/..\..\/" from
          * returning a directory for the root drive.
          */
@@ -540,7 +540,7 @@ AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri)
             for (x = r->uri; (x = strchr(x, '\\')) != NULL; )
                 *x = '/';
         }
-#endif /* OS2 || WIN32 */
+#endif /* WIN32 */
     }
     else {
         r->args = NULL;
@@ -1677,7 +1677,7 @@ AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers)
         apr_table_do(send_header, &x, r->headers_out, NULL);
         apr_table_clear(r->headers_out);
     }
-    ap_fputs(x.f, x.bb, CRLF);
+    ap_fputs(x.f, x.bb, CRLF_ASCII);
     ap_fflush(x.f, x.bb);
     apr_brigade_destroy(x.bb);
 }