]> granicus.if.org Git - apache/commitdiff
dav_xml_get_cdata() is an exported function, so mark it as such with
authorGreg Stein <gstein@apache.org>
Tue, 22 Jan 2002 19:00:22 +0000 (19:00 +0000)
committerGreg Stein <gstein@apache.org>
Tue, 22 Jan 2002 19:00:22 +0000 (19:00 +0000)
the DAV_DECLARE macro. [ Barry Pederson <barryp@yahoo.com> ]

Apache's handling of ports is broken. Temporarily disable the port
checking in the Destination: header. [ Greg Stein ]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92971 13f79535-47bb-0310-9956-ffa450edef68

modules/dav/main/mod_dav.h
modules/dav/main/util.c

index 2d47ca9224faec88df53497218007eca8878c27f..92b7c5f05fd508c57c7c224f189140746120c5c1 100644 (file)
@@ -526,7 +526,7 @@ int dav_validate_root(const ap_xml_doc *doc, const char *tagname);
 ap_xml_elem *dav_find_child(const ap_xml_elem *elem, const char *tagname);
 
 /* gather up all the CDATA into a single string */
-const char *dav_xml_get_cdata(const ap_xml_elem *elem, apr_pool_t *pool,
+DAV_DECLARE(const char *) dav_xml_get_cdata(const ap_xml_elem *elem, apr_pool_t *pool,
                               int strip_white);
 
 /*
index 80224d9950aea0e915dff50fc4e6e78de52682fc..b191bc09c7a78163c4cdcbc76d5a16f5cbc18fba 100644 (file)
@@ -239,8 +239,11 @@ dav_lookup_result dav_lookup_uri(const char *uri, request_rec * r,
            request. the port must match our port.
         */
         apr_sockaddr_port_get(&port, r->connection->local_addr);
-        if (strcasecmp(comp.scheme, scheme) != 0 ||
-            comp.port != port) {
+        if (strcasecmp(comp.scheme, scheme) != 0
+#ifdef APACHE_PORT_HANDLING_IS_BUSTED
+            || comp.port != port
+#endif
+            ) {
             result.err.status = HTTP_BAD_GATEWAY;
             result.err.desc = apr_psprintf(r->pool,
                                            "Destination URI refers to "
@@ -277,12 +280,14 @@ dav_lookup_result dav_lookup_uri(const char *uri, request_rec * r,
     /* now, if a hostname was provided, then verify that it represents the
        same server as the current connection. note that we just use our
        port, since we've verified the URI matches ours */
+#ifdef APACHE_PORT_HANDLING_IS_BUSTED
     if (comp.hostname != NULL &&
        !ap_matches_request_vhost(r, comp.hostname, port)) {
        result.err.status = HTTP_BAD_GATEWAY;
        result.err.desc = "Destination URI refers to a different server.";
        return result;
     }
+#endif
 
     /* we have verified that the requested URI denotes the same server as
        the current request. Therefore, we can use ap_sub_req_lookup_uri() */
@@ -325,7 +330,7 @@ ap_xml_elem *dav_find_child(const ap_xml_elem *elem, const char *tagname)
 }
 
 /* gather up all the CDATA into a single string */
-const char *dav_xml_get_cdata(const ap_xml_elem *elem, apr_pool_t *pool,
+DAV_DECLARE(const char *) dav_xml_get_cdata(const ap_xml_elem *elem, apr_pool_t *pool,
                               int strip_white)
 {
     apr_size_t len = 0;