Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

Commit

Permalink
2006-04-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Browse files Browse the repository at this point in the history
	* src/Mono.WebServer/MonoWorkerRequest.cs: remove all the duplicated
	slashes and don't do an extra Replace on non-windows.


svn path=/branches/mono-1-1-13/xsp/; revision=59869
  • Loading branch information
gonzalop committed Apr 25, 2006
1 parent 50dfd9e commit 7e47dbd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2006-04-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* src/Mono.WebServer/MonoWorkerRequest.cs: remove all the duplicated
slashes and don't do an extra Replace on non-windows.

2006-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* src/server.cs: make the hash different when the last argument is an
Expand Down
8 changes: 6 additions & 2 deletions src/Mono.WebServer/MonoWorkerRequest.cs
Expand Up @@ -223,10 +223,14 @@ public override string MapPath (string path)
if (path.StartsWith (HostVPath) && (path.Length == len || path [len] == '/'))
path = path.Substring (len + 1);

if (path.Length > 0 && path [0] == '/')
while (path.Length > 0 && path [0] == '/') {
path = path.Substring (1);
}

if (Path.DirectorySeparatorChar != '/')
path = path.Replace ('/', Path.DirectorySeparatorChar);

return Path.Combine (HostPath, path.Replace ('/', Path.DirectorySeparatorChar));
return Path.Combine (HostPath, path);
}

protected abstract bool GetRequestData ();
Expand Down

0 comments on commit 7e47dbd

Please sign in to comment.