Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=78177 --- shadow/78177 2006-04-24 11:18:27.000000000 -0400 +++ shadow/78177.tmp.4901 2006-04-24 11:18:27.000000000 -0400 @@ -0,0 +1,111 @@ +Bug#: 78177 +Product: Mono: Class Libraries +Version: 1.1 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: Sys.Web +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Server.Transfer don't preserve querystring parameters while it should + +Description of Problem: +Using Server.Transfer("new url", true) doesn't transfer the querystring to +the new url + + +Steps to reproduce the problem: +1. Create a webform1.aspx.cx +with this in page load: + private void Page_Load(object sender, System.EventArgs e) + + { + Server.Transfer("WebForm2.aspx",true); + + + } +2. + Create a webForm2.Aspx.cs with this in page load: +protected Label label1; + + + + + + private void Page_Load(object sender, System.EventArgs e) + + { + label1.Text="ID :"+ Request.QueryString["ID"]; + + + } + + +3. Run xsp, and access to http://localhost:8080/WebForm1.aspx?ID=Test + +Actual Results: +ID= + +Expected Results: +ID=Test + +How often does this happen? +Always + +Additional Information: +Here's a quick patch which solve the issue: +Index: System.Web/HttpServerUtility.cs +=================================================================== +--- System.Web/HttpServerUtility.cs (révision 59814) ++++ System.Web/HttpServerUtility.cs (copie de travail) +@@ -106,16 +106,15 @@ + } else { + query = ""; + } +- ++ + HttpRequest request = context.Request; + HttpResponse response = context.Response; +- ++ + string oldQuery = request.QueryStringRaw; + request.QueryStringRaw = query; + +- WebROCollection oldForm = null; ++ WebROCollection oldForm = request.Form as +WebROCollection; + if (!preserveQuery) { +- oldForm = request.Form as WebROCollection; + request.SetForm (new WebROCollection ()); + } + +@@ -125,9 +124,17 @@ + + string oldFilePath = request.FilePath; + request.SetCurrentExePath (UrlUtils.Combine +(request.BaseVirtualDir, path)); ++ ++ if (preserveQuery) ++ { ++ request.SetForm (oldForm); ++ if (query=="") ++ request.QueryStringRaw = oldQuery; ++ } + IHttpHandler handler = +context.ApplicationInstance.GetHandler (context); + TextWriter previous = null; + try { ++ request.SetCurrentExePath (oldFilePath); + previous = response.SetTextWriter (output); + if (!(handler is IHttpAsyncHandler)) { + handler.ProcessRequest (context); + + +Please feel free to commit, but it may be a little bit dirty... _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
