[Mono-bugs] [Bug 621837] Using HttpContext.RewritePath causes incorrect HttpRequest.Path to be returned when PathInfo is specified

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jul 13 06:08:26 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=621837

http://bugzilla.novell.com/show_bug.cgi?id=621837#c1


--- Comment #1 from Ashish Kulkarni <ashish.kulkarni at kalyptorisk.com> 2010-07-13 10:08:25 UTC ---
As a workaround, I did the following immediately after calling RewritePath
which seems to fix this issue for me:

// workaround for bug 621837 in Mono
if(Type.GetType("Mono.Runtime") != null)
{
    PropertyInfo prop = typeof(HttpRequest).GetProperty("UrlComponents",
                                       
BindingFlags.NonPublic|BindingFlags.Instance);
    if(prop != null)
    {
        UriBuilder components = prop.GetValue(req, null) as UriBuilder;
        if(components != null)
            components.Path = req.FilePath+req.PathInfo;
    }
}

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list