2002-07-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sun, 14 Jul 2002 02:48:38 +0000 (02:48 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sun, 14 Jul 2002 02:48:38 +0000 (02:48 -0000)
* HttpResponse.cs: quick&dirty hack to make redirection work. Should
be out of there once we have SimpleWorkerRequest.

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

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

index 3f15bf9cc3f31249c5092bd888ba115a3cd61e4d..3e98d1000081862aae4d831f2c645beca6affaf9 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * HttpResponse.cs: quick&dirty hack to make redirection work. Should
+       be out of there once we have SimpleWorkerRequest.
+
 2002-07-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * HttpUtility.cs: little typo, big headache.
index 2ba851807c14f8fdb9c30f2173a18b3dee9d9070..c484961ca13124d9f09afdfdaa463834134cac48 100644 (file)
@@ -667,6 +667,14 @@ namespace System.Web {
          Redirect(url, true);\r
       }\r
 \r
+      //FIXME: [1] this is an ugly hack to make it work until we have SimpleWorkerRequest!\r
+      private string redirectLocation;\r
+      public string RedirectLocation\r
+      {\r
+             get {\r
+                     return redirectLocation;\r
+             }\r
+      }\r
       public void Redirect(string url, bool endResponse) {\r
          if (_bHeadersSent) {\r
             throw new System.Web.HttpException("Headers has been sent to the client");\r
@@ -675,16 +683,19 @@ namespace System.Web {
          Clear();\r
 \r
          StatusCode = 302;\r
-         AppendHeader(HttpWorkerRequest.HeaderLocation, url);\r
+        redirectLocation = url;\r
+         //[1]AppendHeader(HttpWorkerRequest.HeaderLocation, url);\r
 \r
          // Text for browsers that can't handle location header\r
          Write("<html><head><title>Object moved</title></head><body>\r\n");\r
          Write("<h2>Object moved to <a href='" + url + "'>here</a></h2>\r\n");\r
          Write("</body><html>\r\n");\r
 \r
-         if (endResponse) {\r
+         /* [1]\r
+        if (endResponse) {\r
             End();\r
          }\r
+        */\r
       }\r
 \r
       public void Write(char ch) {\r