You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2007/02/25 21:36:55 UTC

DO NOT REPLY [Bug 41698] New: - If Apache is used as the reverse proxy for the DAV-enabled server (for example, SVN or GIT repository), it will not rewrite the 'Destination' header using the information from the ProxyPass directives. This will break DAV COPY and MOVE requests (and probably some other ones). This is rather well-known problem: see http://silmor.de/49 and http://svn.haxx.se/users/archive-2005-03/1452.html. The Apache's HEAD can cure the problem by the rewriting via RequestHeader, but the cleaner way to go is to enable mod_proxy_http to handle the 'Destination' header. The patch provided by the URL does this. I've tested it with the HTTPS Apache reverse proxy and the DAV backend served by Apache's native DAV via HTTP.

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=41698>.
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=41698

           Summary: If Apache is used as the reverse proxy for the DAV-
                    enabled server (for example, SVN or GIT repository), it
                    will not rewrite the 'Destination' header using the
                    information from the ProxyPass directives. This will
                    break DAV COPY and MOVE requests (and probably some
                    other ones). This is rather well-known problem: see
                    http://silmor.de/49 and
                    http://svn.haxx.se/users/archive-2005-03/1452.html. The
                    Apache's HEAD can cure the problem by the rewriting via
                    RequestHeader, but the cleaner way to go is to enable
                    mod_proxy_http to handle the 'Destination' header. The
                    patch provided by the URL does this. I've tested it with
                    the HTTPS Apache reverse proxy and the DAV backend
                    served by Apache's native DAV via HTTP.
           Product: Apache httpd-2
           Version: 2.2.4
          Platform: All
               URL: http://codelabs.ru/patches/apache/patch-
                    mod_proxy_http.c-destination
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: rea-asf@codelabs.ru


 

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698





------- Additional Comments From rpluem@apache.org  2007-03-29 13:26 -------
(In reply to comment #11)
> Ruediger,
> 
> (In reply to comment #10)
> > As said most of them are done in the translate_name hook and some in the fixup
> > hook, but in the general I think this can happen in other hooks as well
> > (possibly due to other 3rd party modules). That said I currently have no good
> > starting point how to do this properly. The only option that might open a
> > possibility would be subrequests.
> 
> I've done some hacking on the mod_rewrite and the Destination header. The full
> patch is attached, please, have a look. I've tested it, and it works for me as
> expected.

Many thanks for your continued work on this. Sorry, I guess it is my fault that
I did not explain the problem clearly enough. To be honest I have not looked at
your patch in detail now, but however perfect it may be for the mod_rewrite case
it will not fix the problem, because mod_rewrite is only *one* module that could
break. The final solution needs to deal with *any* module that adjusts the
original uri during request processing, so even third party modules and modules
that have not been written yet.
But digging somewhat deeper I noticed that since 2.2.x the Destination header
gets rewritten in the same way as the Location header. So you can configure this
properly via ProxyPassReverse (which you need to do anyway to get the redirects
fixed). Of course there is still a documentation bug as the documentaion of
ProxyPassReverse fails to document this behaviour.

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698





------- Additional Comments From rpluem@apache.org  2007-02-27 13:08 -------
(In reply to comment #5)
> Ruediger,
> 
> (In reply to comment #4)
> > Your patch does not work with mod_rewrite (RewriteRules with the P flag). Thus
> > it cannot be applied to the codebase. Currently I see no way to fix this, so
> > Nicks proposal is the only possibility currently. But maybe I am wrong and you
> > can come up with something that also works with mod_rewrite. Thus leaving this
> > report open as an Enhancement.
> 
> Could you please give the Apache configuration exempt for which my patch will
> break mod_rewrite: I will try to see if it can be fixed.

It does not break mod_rewrite, but it does not work with mod_rewrite, as after
applying your patch things will behave differently when you do proxying via
ProxyPass or mod_rewrite

To give you a simple example:

RewriteRule ^/(.*) http://backend.org/$1 [P]

does the same as

ProxyPass / http://backend.org/

But using the RewriteRule instead of ProxyPass will leave the Destination header
unchanged with your patch. The basic shortcoming of your patch is that it does
not apply all the transformations done to the original request URL to the
Destination header URL, so they get out of sync. You only apply the
transformations caused by ProxyPass. Most of these transformations are done
during the translate_name hook, but some of them are also done during the fixup
phase (mod_rewrite in directory context).

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698


rea-asf@codelabs.ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #19832|0                           |1
        is obsolete|                            |




------- Additional Comments From rea-asf@codelabs.ru  2007-03-29 02:29 -------
Created an attachment (id=19837)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19837&action=view)
Corrected version for the 'Destination' header patch.

Rewrited the patch a bit. Still not sure that I am using the right source of
the 'dirpath' argument in the mod_rewrite part. Can someone enlight me: I just
want to get the URL prefix of the RewriteRule location. I mean that if
DocumentRoot = /www
<Directory /www/path>
RewriteRule whatever
</Directory>
then I want the 'dirpath' to be '/path/' for the mentioned RewriteRule.

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698





------- Additional Comments From rea-asf@codelabs.ru  2007-03-28 08:22 -------
Ruediger,

(In reply to comment #10)
> As said most of them are done in the translate_name hook and some in the fixup
> hook, but in the general I think this can happen in other hooks as well
> (possibly due to other 3rd party modules). That said I currently have no good
> starting point how to do this properly. The only option that might open a
> possibility would be subrequests.

I've done some hacking on the mod_rewrite and the Destination header. The full
patch is attached, please, have a look. I've tested it, and it works for me as
expected.

> > And if we will turn this into the documentation issue, I will vote that
> > mod_dav's documentation should note that the 'Destination' should be rewritten
> > if we're living with the proxy. It is not obvious for the administrator when the
> > proxied DAV is refusing to to PUT and MOVE.
> > 
> 
> This is definitely a good idea. Could you provide a documentation patch?

I will provide it, but I need to understand if the current patch will be
accepted, because different documentation patches should be done in the case it
will be accepted and otherwise.

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698





------- Additional Comments From rpluem@apache.org  2007-03-31 12:05 -------
(In reply to comment #15)
> Ruediger, good day.
> 
> (In reply to comment #14)
> > Many thanks for your continued work on this. Sorry, I guess it is my fault that
> > I did not explain the problem clearly enough. To be honest I have not looked at
> > your patch in detail now, but however perfect it may be for the mod_rewrite case
> > it will not fix the problem, because mod_rewrite is only *one* module that could
> > break. The final solution needs to deal with *any* module that adjusts the
> > original uri during request processing, so even third party modules and modules
> > that have not been written yet.
> 
> The problem is that the modules are rewriting the URLs differently. And there is
> no generic way to tell how. For example, ap_proxy_http_request can rewrite the
> 'Destination' header for the mod_proxy's own rewriting, but it will completely
> fail to do it for the mod_rewrite's rewriting: it has no knowledge about the
> rewriting rule that were used. And in the case of *any* module that uses
> mod_proxy rewriting hooks, there is absolutely no way to get the proper
> rewriting of the 'Destination' header. And, I think, it is the module's matter
> to rewrite all headers properly. Why should mod_proxy care of mod_rewrite's (or
> whatever module's) internals?

It shouldn't. But it needs to be ensured that the URL of the Destination header
gets rewritten in the same way as a request for this URL would be rewritten by
whatever module does this.

> 
> > But digging somewhat deeper I noticed that since 2.2.x the Destination header
> > gets rewritten in the same way as the Location header. So you can configure this
> > properly via ProxyPassReverse (which you need to do anyway to get the redirects
> > fixed). Of course there is still a documentation bug as the documentaion of
> > ProxyPassReverse fails to document this behaviour.
> 
> Yes, but it is rewritten when the request is passed from the backend server to
> the main one, that is the ProxyPassReverse is about, isn't it? And I am talking
> about the header rewriting on the 'main server' -> 'backend server' path.

You are correct. I was on the wrong track here. You need the rewrite in the
forward (request) case not in the response case where ProxyPassReverse gets into
the game.

> 
> Any comments?

In order to have a broader audience for this discussion it should be moved to
the dev list. Mind to post a summary to dev@httpd.apache.org?

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698


nick@webthing.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From nick@webthing.com  2007-02-27 00:23 -------
(In reply to comment #4)
> Your patch does not work with mod_rewrite (RewriteRules with the P flag).

I would say rather: the patch has side-effects that make it unacceptable for us.
 You just named one of them.

I changed it to "documentation" because the actual problem is fixed.  I see
Sander recently updated the 2.2.x docs in r511293, so I'll just close this PR.


-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698





------- Additional Comments From rea-asf@codelabs.ru  2007-03-30 01:08 -------
Ruediger, good day.

(In reply to comment #14)
> Many thanks for your continued work on this. Sorry, I guess it is my fault that
> I did not explain the problem clearly enough. To be honest I have not looked at
> your patch in detail now, but however perfect it may be for the mod_rewrite case
> it will not fix the problem, because mod_rewrite is only *one* module that could
> break. The final solution needs to deal with *any* module that adjusts the
> original uri during request processing, so even third party modules and modules
> that have not been written yet.

The problem is that the modules are rewriting the URLs differently. And there is
no generic way to tell how. For example, ap_proxy_http_request can rewrite the
'Destination' header for the mod_proxy's own rewriting, but it will completely
fail to do it for the mod_rewrite's rewriting: it has no knowledge about the
rewriting rule that were used. And in the case of *any* module that uses
mod_proxy rewriting hooks, there is absolutely no way to get the proper
rewriting of the 'Destination' header. And, I think, it is the module's matter
to rewrite all headers properly. Why should mod_proxy care of mod_rewrite's (or
whatever module's) internals?

> But digging somewhat deeper I noticed that since 2.2.x the Destination header
> gets rewritten in the same way as the Location header. So you can configure this
> properly via ProxyPassReverse (which you need to do anyway to get the redirects
> fixed). Of course there is still a documentation bug as the documentaion of
> ProxyPassReverse fails to document this behaviour.

Yes, but it is rewritten when the request is passed from the backend server to
the main one, that is the ProxyPassReverse is about, isn't it? And I am talking
about the header rewriting on the 'main server' -> 'backend server' path.
Because if the backend DAV server sees the wrong 'Destination' header, it just
refuses to serve the request. And the funny thing: the 'Destination' rewriting
for the ProxyPassReverse is implemented just for the mod_proxy as well. Why it
will be worse to implement the 'Destination' rewriting only for two major
modules dealing with proxying, mod_proxy and mod_rewrite just now, and leave
other consumers of rewriting routines in mod_proxy to get it rewritten by
themselves or say that they are failing in the case of DAV proxying?

Talking about DAV checks: currently, the Apache's mod_dav checks
(/modules/dav/main/util.c:204 from the snapshot httpd_20070330041747.tar.gz)
only for schema and port coincidence, so we can do the generic rewrite and this
can help for some easy cases. But is the backend DAV server is not Apache, or if
we're rewriting not only the host, port and protocol, but some path components,
then we're lost. So I see not way to implement the rewriting in a generic way,
and, to be honest, I see no reason for it: it is up to the module's author.

Any comments?

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698





------- Additional Comments From rea-asf@codelabs.ru  2007-02-27 00:57 -------
Nick,

(In reply to comment #6)
> (In reply to comment #4)
> > Your patch does not work with mod_rewrite (RewriteRules with the P flag).
> 
> I would say rather: the patch has side-effects that make it unacceptable for us.
>  You just named one of them.

Could you please name the other ones? I still do think that it is the
mod_proxy's job to rewrite the headers it should rewrite by itself.

Thank you!

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698


rea-asf@codelabs.ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW




-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698


rea-asf@codelabs.ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698





------- Additional Comments From rpluem@apache.org  2007-03-01 13:37 -------
(In reply to comment #9)

> 
> OK, if I will enable mod_rewrite to do the same Destination rewriting and will
> apply 'all the transformations done to the original request URL' -- will it have
> a chance to be committed? To tell the truth, just now I have no idea what are
> those 'all transformations' but will try to understand. May be you will be so
> kind to point me to the relevant code locations?

As said most of them are done in the translate_name hook and some in the fixup
hook, but in the general I think this can happen in other hooks as well
(possibly due to other 3rd party modules). That said I currently have no good
starting point how to do this properly. The only option that might open a
possibility would be subrequests.
Anyway some documentation references:

http://httpd.apache.org/docs/2.2/en/developer/hooks.html
http://httpd.apache.org/docs/2.2/en/developer/request.html
http://www.apachetutor.org/dev/

> 
> And if we will turn this into the documentation issue, I will vote that
> mod_dav's documentation should note that the 'Destination' should be rewritten
> if we're living with the proxy. It is not obvious for the administrator when the
> proxied DAV is refusing to to PUT and MOVE.
> 

This is definitely a good idea. Could you provide a documentation patch?

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698


rea-asf@codelabs.ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Documentation               |mod_proxy




------- Additional Comments From rea-asf@codelabs.ru  2007-02-25 21:44 -------
(In reply to comment #2)
Nick,

> Please see http://httpd.apache.org/docs/2.3/mod/mod_headers.html#header
> 
> I don't know why the documentation of this fix hasn't made it through to 2.2. 
> The fix itself is in 2.2.4.

This is great that mod_headers has this workaround in 2.2.4. But it will be
better to fix mod_proxy_http -- the fix really belongs to this module: people
should not bother themselves to dig through the DAV, proxying and mod_headers.

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698





------- Additional Comments From rea-asf@codelabs.ru  2007-02-28 21:51 -------
Ruediger,
(In reply to comment #8)
> (In reply to comment #5)
> > Could you please give the Apache configuration exempt for which my patch will
> > break mod_rewrite: I will try to see if it can be fixed.
> 
> It does not break mod_rewrite, but it does not work with mod_rewrite, as after
> applying your patch things will behave differently when you do proxying via
> ProxyPass or mod_rewrite
> 
> To give you a simple example:
> 
> RewriteRule ^/(.*) http://backend.org/$1 [P]
> 
> does the same as
> 
> ProxyPass / http://backend.org/
> 
> But using the RewriteRule instead of ProxyPass will leave the Destination header
> unchanged with your patch. The basic shortcoming of your patch is that it does
> not apply all the transformations done to the original request URL to the
> Destination header URL, so they get out of sync. You only apply the
> transformations caused by ProxyPass. Most of these transformations are done
> during the translate_name hook, but some of them are also done during the fixup
> phase (mod_rewrite in directory context).

OK, if I will enable mod_rewrite to do the same Destination rewriting and will
apply 'all the transformations done to the original request URL' -- will it have
a chance to be committed? To tell the truth, just now I have no idea what are
those 'all transformations' but will try to understand. May be you will be so
kind to point me to the relevant code locations?

And if we will turn this into the documentation issue, I will vote that
mod_dav's documentation should note that the 'Destination' should be rewritten
if we're living with the proxy. It is not obvious for the administrator when the
proxied DAV is refusing to to PUT and MOVE.


-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698





------- Additional Comments From rea-asf@codelabs.ru  2007-02-26 23:57 -------
Ruediger,

(In reply to comment #4)
> Your patch does not work with mod_rewrite (RewriteRules with the P flag). Thus
> it cannot be applied to the codebase. Currently I see no way to fix this, so
> Nicks proposal is the only possibility currently. But maybe I am wrong and you
> can come up with something that also works with mod_rewrite. Thus leaving this
> report open as an Enhancement.

Could you please give the Apache configuration exempt for which my patch will
break mod_rewrite: I will try to see if it can be fixed.

Thanks!

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698


rpluem@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement




------- Additional Comments From rpluem@apache.org  2007-02-26 22:15 -------
Your patch does not work with mod_rewrite (RewriteRules with the P flag). Thus
it cannot be applied to the codebase. Currently I see no way to fix this, so
Nicks proposal is the only possibility currently. But maybe I am wrong and you
can come up with something that also works with mod_rewrite. Thus leaving this
report open as an Enhancement.

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698


nick@webthing.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|mod_proxy                   |Documentation
            Summary|If Apache is used as the    |Site documentation of Header
                   |reverse proxy for the DAV-  |edit is missing
                   |enabled server (for example,|
                   |SVN or GIT repository)      |
            Summary|it will not rewrite the     |
                   |'Destination' header using  |
                   |the information from the    |
                   |ProxyPass directives. This  |
                   |will break DAV COPY and MOVE|
                   |requests (and probably some |
                   |other ones). This is rather |
                   |well-known problem: see     |
                   |http://silmor.de/49 and     |
            Summary|http://svn.haxx.se/users/arc|
                   |hive-2005-03/1452.html. The |
                   |Apache's HEAD can cure the  |
                   |problem by the rewriting via|
                   |RequestHeader               |
            Summary|but the cleaner way to go is|
                   |to enable mod_proxy_http to |
                   |handle the 'Destination'    |
                   |header. The patch provided  |
                   |by the URL does this. I've  |
                   |tested it with the HTTPS    |
                   |Apache reverse proxy and the|
                   |DAV backend served by       |
                   |Apache's native DAV via     |
                   |HTTP.                       |




------- Additional Comments From nick@webthing.com  2007-02-25 12:57 -------
Please see http://httpd.apache.org/docs/2.3/mod/mod_headers.html#header

I don't know why the documentation of this fix hasn't made it through to 2.2. 
The fix itself is in 2.2.4.

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - If Apache is used as the reverse proxy for the DAV-enabled server (for example, SVN or GIT repository), it will not rewrite the 'Destination' header using the information from the ProxyPass directives. This will break DAV COPY and MOVE requests (and probably some other ones). This is rather well-known problem: see http://silmor.de/49 and http://svn.haxx.se/users/archive-2005-03/1452.html. The Apache's HEAD can cure the problem by the rewriting via RequestHeader, but the cleaner way to go is to enable mod_proxy_http to handle the 'Destination' header. The patch provided by the URL does this. I've tested it with the HTTPS Apache reverse proxy and the DAV backend served by Apache's native DAV via HTTP.

Posted by bu...@apache.org.
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=41698>.
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=41698





------- Additional Comments From rea-asf@codelabs.ru  2007-02-25 12:39 -------
Created an attachment (id=19633)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19633&action=view)
Patch for mod_proxy_http that enables the 'Destination' header handling.

Attached the patch.

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 41698] - Site documentation of Header edit is missing

Posted by bu...@apache.org.
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=41698>.
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=41698


rea-asf@codelabs.ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #19633|0                           |1
        is obsolete|                            |




------- Additional Comments From rea-asf@codelabs.ru  2007-03-28 08:23 -------
Created an attachment (id=19832)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19832&action=view)
New version of 'Destination' header rewriting patch


-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org