* HttpResponse.cs: Actually apply an app path modifier in
authorJackson Harper <jackson@novell.com>
Thu, 4 Dec 2003 05:44:44 +0000 (05:44 -0000)
committerJackson Harper <jackson@novell.com>
Thu, 4 Dec 2003 05:44:44 +0000 (05:44 -0000)
ApplyAppPathModifer and add a method to set the app path modifier.
* HttpRequest.cs: Add utility method for setting a request
header.

svn path=/trunk/mcs/; revision=20758

mcs/class/System.Web/System.Web/ChangeLog
mcs/class/System.Web/System.Web/HttpRequest.cs
mcs/class/System.Web/System.Web/HttpResponse.cs

index f9313e336f31e543e8a6fb4a33415a4e1ce7c733..d83ed4e500f13ff11e7bb8bb5f704b859de4b4a6 100644 (file)
@@ -1,3 +1,9 @@
+2003-12-03  Jackson Harper <jackson@ximian.com>
+
+       * HttpResponse.cs: Actually apply an app path modifier in
+       ApplyAppPathModifer and add a method to set the app path modifier.
+       * HttpRequest.cs: Add utility method for setting a request header.
+       
 2003-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * HttpApplication.cs: handle FileNotFound and DirectoryNotFound
index f7457704765ce3751044f2162e08bf4619ca9623..3874cfeb53da850ed0f309042a0f2019ebfec0e0 100644 (file)
@@ -1141,6 +1141,16 @@ namespace System.Web {
                internal void SetForm (HttpValueCollection form)\r
                {\r
                        _oFormData = form;\r
-               }\r
+               }
+
+               internal void SetHeader (string name, string value)
+               {
+                       // this is just to make sure the headers are initialized
+                       // we don't actually use this var.
+                       NameValueCollection nadda = Headers;
+                       _oHeaders.MakeReadWrite ();
+                       _oHeaders [name] = value;
+                       _oHeaders.MakeReadOnly ();
+               }
        }\r
 }
index 515f05f0e17787f02fd246a04709fb1ff78dafbf..3e79c9f29610b5679fd72d0cede5a592c6ec5f2d 100644 (file)
@@ -62,7 +62,9 @@ namespace System.Web
                ArrayList fileDependencies;
                CachedRawResponse cached_response;
                ArrayList cached_headers;
-               
+
+               string app_path_mod = null;
+                
                public HttpResponse (TextWriter output)
                {
                         _bBuffering = true;
@@ -322,9 +324,17 @@ namespace System.Web
                                virtualPath = UrlUtils.Reduce (virtualPath);
                        }
 
+                       if (app_path_mod != null && virtualPath.IndexOf (app_path_mod) > 0)
+                               virtualPath = UrlUtils.Combine (app_path_mod, virtualPath);
+
                        return virtualPath;
                }
 
+               internal void SetAppPathModifier (string app_path_mod)
+               {
+                       this.app_path_mod = app_path_mod;
+               }
+               
                public bool Buffer
                {
                        get {