otac0n / WebGitNet

WebGit .NET is an ASP.NET MVC app that provides access to your git repositories over HTTP. It supports browsing in a web browser AND push / pull over Git's "Smart HTTP protocol".
zlib License
133 stars 62 forks source link

Slashes in branch names break URL routing. #53

Open otac0n opened 11 years ago

otac0n commented 11 years ago

Title pretty much says it. Check out fuel/fuel for a real-world example.

otac0n commented 11 years ago

Woops, just meant to comment that this may be fixed simply by URL encoding slashes, but I recall that there may be an issue with those in .NET's URI class, possibly requiring a hacked URI or a setting in the Web.config

http://stackoverflow.com/questions/781205/getting-a-url-with-an-url-encoded-slash

otac0n commented 11 years ago

This is a pretty deep rabbit hole. Unfortunately, we can only allow one wildcard routing segment, so we need a different encoding scheme, or we need to put either the branch or the file path into the query string.