-
Notifications
You must be signed in to change notification settings - Fork 55
srcsrv doesnt support URLs with special chars #94
Comments
Hi @gluck! I wonder if there is a way to get |
Simply with the http provider, I doubt it, that's also what MS support replied to this guy: |
Well that sucks! I just reproduced it: .\Exe\bin\Release\SourceLink.exe index |
Another simple work-a-round is to use a proxy or rewrite the URLs. Several web servers support rewriting URLs. Which one are you using. You can also repurpose the SourceLink-Proxy Node app I made to do what you want. http://blog.ctaggart.com/2015/07/sourcelink-10-with-private-github.html |
I'm using cgit behind apache, and I already did that (mod_rewrite), mostly wanted to share the issue/findings, as well as give thoughts around the Powershelll approach. Also the warning/error will probably help others spend less time troubleshooting this one. Thx ! |
That is a good idea. Glad you got it working. Can you share the mod_rewrite config details? |
Sure, that may be specific to our setup though. I remapped
|
(better title would be that SRCSRV doesn't support that, but sourcelink could work around it)
Context:
Many (all ?) GIT viewers (e.g. cgit, gitweb) have raw URLs with HTTP params, e.g.
SRCSRV doesn't like that
When using http protocol support, the URL is used to generate the local file path (where it'll be saved), which fails because of the special (e.g.
?
) chars, with a cryptic error in VS0x80004005
(you're not helping SRCSRV).What can you do about it ?
Immediatly
Reject URLs with special chars when indexing
Powershell to the rescue
You could use an indexing strategy that wouldn't rely on SRCSRV http support, but use a powershell command for URL download instead. It's probably slower (400ms powershell startup time on my machine), requires the user to "trust" the command (get a warning in VS), but also opens up the range of possible features (e.g. could do the LF->CRLF conversion on the fly, or could use credentials).
Here's a PDBSTR indexing using powershell that works ™️
Now you may wonder why am I not extracting stuff (URL root, SHA1, project) to variables ?
Glad you asked ! That is because I want a common variables section for every project, to allow/simplify merging assemblies (Hint: I'm the author of ILRepack), and their indexed pdbs.
The text was updated successfully, but these errors were encountered: