Permalink
Browse files

[xsp,fastcgi] Handle path info properly.

  • Loading branch information...
1 parent 591744b commit d8ccb7acd6835d7baa07fabbb6c511274bf5d7ae @grendello grendello committed Jul 7, 2011
Showing with 13 additions and 2 deletions.
  1. +13 −2 src/Mono.WebServer.FastCgi/WorkerRequest.cs
@@ -59,11 +59,18 @@ static WorkerRequest ()
string uri_path = null;
private string [][] unknownHeaders = null;
private string [] knownHeaders = null;
-
+ string path_info;
+
public WorkerRequest (Responder responder, ApplicationHost appHost) : base (appHost)
{
this.responder = responder;
input_data = responder.InputData;
+ try {
+ Paths.GetPathsFromUri (appHost, GetHttpVerbName (), GetFilePath (), out file_path, out path_info);
+ } catch {
+ path_info = null;
+ file_path = null;
+ }
}
#region Overrides
@@ -132,7 +139,11 @@ public override bool IsEntireEntityBodyIsPreloaded ()
public override string GetPathInfo ()
{
- return responder.GetParameter ("PATH_INFO") ?? String.Empty;
+ string pi = responder.GetParameter ("PATH_INFO");
+ if (!String.IsNullOrEmpty (pi))
+ return pi;
+
+ return path_info ?? String.Empty;
}
public override string GetRawUrl ()

0 comments on commit d8ccb7a

Please sign in to comment.