From 710eb1ccd45219d7bc8068e304f9e3b194a504f2 Mon Sep 17 00:00:00 2001 From: Greg Stein Date: Tue, 22 Jan 2002 19:00:22 +0000 Subject: [PATCH] dav_xml_get_cdata() is an exported function, so mark it as such with the DAV_DECLARE macro. [ Barry Pederson ] 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 | 2 +- modules/dav/main/util.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/dav/main/mod_dav.h b/modules/dav/main/mod_dav.h index 2d47ca9224..92b7c5f05f 100644 --- a/modules/dav/main/mod_dav.h +++ b/modules/dav/main/mod_dav.h @@ -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); /* diff --git a/modules/dav/main/util.c b/modules/dav/main/util.c index 80224d9950..b191bc09c7 100644 --- a/modules/dav/main/util.c +++ b/modules/dav/main/util.c @@ -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; -- 2.40.0