mwrock / RequestReduce

Instantly makes your .net website faster by reducing the number and size of requests with almost no effort.
www.requestreduce.org
Apache License 2.0
228 stars 48 forks source link

Use Request.Url.AbsolutePath instead of Request.RawUrl #184

Closed candrews closed 12 years ago

candrews commented 12 years ago

I think it would better to use Request.Url.AbsolutePath instead Request.RawUrl.

Request.RawUrl's documentation is confusing, and it doesn't work as expected (at least, not as I expect). For example, when using IIS's URL Rewrite module, Request.Url contains the rewritten path, but Request.RawUrl contains the original, unmodified path. In my case, all URLs (including Request Reduce's RequestReduceContent URLs) are rewritten. When I tried to access the RR dashboard, I got a 404 - as RR's filter was looking at Request.RawUrl - if it looks at Request.Url.AbsolutePath, everything works great.

The change is pretty small - RequestReduce/Module/RequestReduceModule.cs only contains Request.RawUrl in 5 places, and substituting Request.Url.AbsolutePath works fine.

mwrock commented 12 years ago

Good point. As it happens, the release I'm planning on putting out in the next couple days moves to PathAndQuery but I'll do a bit of research here to make sure that works ok.