WebDAV Methods Ignored by Reverse Proxy Rewrite?

Feb 2, 2010 at 2:45 AM
Edited Feb 2, 2010 at 2:48 AM

First, thanks for creating this great free software. I really appreciate it.

 

Like many people, I am trying to use URL Rewriter as a reverse proxy for a Subversion server. I have managed to mostly get the URL Rewriter working.


    Reverse Proxy:80

    |                     |

IIS7:80            VisualSVN:8080


 

These are my simple Rewrite rules:


RewriteEngine On

RewriteRule ^(.*)   http://localhost:8080/$1 [P]


 

I am properly redirected when I use my web browser (an HTTP GET).


http://server1.com/svn/repository

to

http://server1.com:8080/svn/repository


 

However, I get an HTTP 500 error when I use a Subversion client (TortioseSVN, Subclipse, etc...)


Subversion Client Logs:

svn: OPTIONS of '/svn/repository': 500 Internal Server Error (http://server1.com)
svn: OPTIONS request failed on '/svn/repository'

 

IIS7 Logs:

#Software: Microsoft Internet Information Services 7.0
#Version: 1.0
#Date: 2010-02-02 01:42:26
#Fields: date time cs-method cs-uri-stem c-ip cs(User-Agent) cs(Referer) cs-host sc-status sc-bytes cs-bytes
2010-02-02 01:42:26 OPTIONS /svn/repository 1.1.1.1 SVN/1.5.4+SVNKit/1.2.1+(http://svnkit.com/)+r5297 - server1.com 500 2880 442

 

Windows Event Log:

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2/1/2010 5:42:24 PM
Event time (UTC): 2/2/2010 1:42:24 AM
Event ID: 731a4c615fbc43978ba2c2d7b6ba79cd
Event sequence: 4
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1/ROOT-1-129095485436437734
    Trust level: Full
    Application Virtual Path: /
    Application Path: C:\inetpub\vhosts\default\htdocs\
    Machine name: MACHINE
 
Process information:
    Process ID: 4756
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE
 
Exception information:
    Exception type: KeyNotFoundException
    Exception message: The given key was not present in the dictionary.
 
Request information:
    Request URL: http://server1.com/svn/repository
    Request path: /svn/repository
    User host address: 1.1.1.1
    User: 
    Is authenticated: False
    Authentication Type: 
    Thread account name: NT AUTHORITY\NETWORK SERVICE
 
Thread information:
    Thread ID: 6
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False
    Stack trace:    at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ManagedFusion.Rewriter.ProxyHandler.KnownHttpVerb.Parse(String name)
   at ManagedFusion.Rewriter.ProxyHandler.SendRequestToTarget(HttpContext context)
   at ManagedFusion.Rewriter.ProxyHandler.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


 

It appears that the HTTP GET method is being properly redirected and the HTTP OPTIONS method is not.

Any ideas on how to debug this further?

Thanks in advance,

Derek Basch

Feb 2, 2010 at 4:15 AM

Thanks for the kind words, this problem was introduced with the 3.5 release.  There is a pending fix that needs to be verified:

Check out this fix, and let me know if it solves the problem.

http://urlrewriter.codeplex.com/WorkItem/View.aspx?WorkItemId=10093

Feb 2, 2010 at 6:08 AM

HaHa! Of course!

After I spend hours tracking down and documenting the problem, it has already been reported.

That will teach me not to check the issue tracker more carefully ;)

The fix worked. Thanks for the help.

Derek

 

Feb 2, 2010 at 2:12 PM

I wish more people took the initiative that you have in documenting your problems.  It really helps.