Skip to content

Commit 93fc942

Browse files
committed
dav_xml_get_cdata() is an exported function, so mark it as such with
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
1 parent 3e9899c commit 93fc942

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

modules/dav/main/mod_dav.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ int dav_validate_root(const ap_xml_doc *doc, const char *tagname);
526526
ap_xml_elem *dav_find_child(const ap_xml_elem *elem, const char *tagname);
527527

528528
/* gather up all the CDATA into a single string */
529-
const char *dav_xml_get_cdata(const ap_xml_elem *elem, apr_pool_t *pool,
529+
DAV_DECLARE(const char *) dav_xml_get_cdata(const ap_xml_elem *elem, apr_pool_t *pool,
530530
int strip_white);
531531

532532
/*

modules/dav/main/util.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,11 @@ dav_lookup_result dav_lookup_uri(const char *uri, request_rec * r,
239239
request. the port must match our port.
240240
*/
241241
apr_sockaddr_port_get(&port, r->connection->local_addr);
242-
if (strcasecmp(comp.scheme, scheme) != 0 ||
243-
comp.port != port) {
242+
if (strcasecmp(comp.scheme, scheme) != 0
243+
#ifdef APACHE_PORT_HANDLING_IS_BUSTED
244+
|| comp.port != port
245+
#endif
246+
) {
244247
result.err.status = HTTP_BAD_GATEWAY;
245248
result.err.desc = apr_psprintf(r->pool,
246249
"Destination URI refers to "
@@ -277,12 +280,14 @@ dav_lookup_result dav_lookup_uri(const char *uri, request_rec * r,
277280
/* now, if a hostname was provided, then verify that it represents the
278281
same server as the current connection. note that we just use our
279282
port, since we've verified the URI matches ours */
283+
#ifdef APACHE_PORT_HANDLING_IS_BUSTED
280284
if (comp.hostname != NULL &&
281285
!ap_matches_request_vhost(r, comp.hostname, port)) {
282286
result.err.status = HTTP_BAD_GATEWAY;
283287
result.err.desc = "Destination URI refers to a different server.";
284288
return result;
285289
}
290+
#endif
286291

287292
/* we have verified that the requested URI denotes the same server as
288293
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)
325330
}
326331

327332
/* gather up all the CDATA into a single string */
328-
const char *dav_xml_get_cdata(const ap_xml_elem *elem, apr_pool_t *pool,
333+
DAV_DECLARE(const char *) dav_xml_get_cdata(const ap_xml_elem *elem, apr_pool_t *pool,
329334
int strip_white)
330335
{
331336
apr_size_t len = 0;

0 commit comments

Comments
 (0)