apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44044] New: - apr_uri_unparse adds scheme to URI asked not to with APR_URI_UNP_OMITSITEPART flag
Date Sat, 08 Dec 2007 09:14:50 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44044>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44044

           Summary: apr_uri_unparse adds scheme to URI asked not to with
                    APR_URI_UNP_OMITSITEPART flag
           Product: APR
           Version: HEAD
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: APR-util
        AssignedTo: bugs@apr.apache.org
        ReportedBy: michael@metaparadigm.com


I was trying to track down a strange bug that affected mod_dav in httpd trunk.

When doing a MOVE I was consistently getting this error:

[error] [client 127.0.0.1] Could not MOVE/COPY /uploads/test.  [207, #0]
[error] [client 127.0.0.1] (2)No such file or directory: Error(s) occurred on
some resources during the COPY/MOVE process.  [207, #0]

I instrumented the code and found out that the "Destination:" absolute URI was
getting mis-parsed by apr-util.

modules/dav/main/util.c:dav_lookup_uri calls apr_uri_unparse with the
APR_URI_UNP_OMITSITEPART flag during translation to local filesystem paths.

Instrumenting the mod_dav code showed it was returning paths like this:
"http:/uploads/test2" resulting in broken translated paths like this:
"/usr/local/apache2/uploads/http:/uploads/test2"

apr_uri_unparse is incorrectly adding the scheme when documented not to:
/* If suppressing the site part, omit both user name & scheme://hostname */

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message