[Mono-bugs] [Bug 77539][Nor] New - Relative client paths
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Feb 13 04:58:57 EST 2006
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 robertj at gmx.net.
http://bugzilla.ximian.com/show_bug.cgi?id=77539
--- shadow/77539 2006-02-13 04:58:57.000000000 -0500
+++ shadow/77539.tmp.24806 2006-02-13 04:58:57.000000000 -0500
@@ -0,0 +1,63 @@
+Bug#: 77539
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.Web
+AssignedTo: gonzalo at ximian.com
+ReportedBy: robertj at gmx.net
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Relative client paths
+
+MS.NET System.Web (1.1) always generates relative client paths
+if possible, i.e. if a certain S.W.UI.Image.ImageUrl is relative,
+its img src attribute will be emitted relative to TemplateSourceDirectory.
+
+Mono consistently uses Control.ResolveUrl, which by design constructs
+absolute urls (urls starting with the app virtual path).
+
+At the first moment this doesn't sound like a bug, but there is at
+least a use case which renders Mono's behaviour as a bug:
+
+Paths can be rewritten either using a handler or by hooking
+application's BeginRequest. The runtime is informed about
+the rewrite with Context.RewritePath.
+
+Here a sample implementing subsessions tunneled over an ASP.NET
+session:
+
+/app/subsessionid/path/to/page.aspx
+
+gets rewritten to
+
+/app/path/to/page.aspx
+Context["subsessionid"] = subsessionid;
+
+After the rewrite, the browser is still resolving relative
+urls relative to /app/subsessionid/path/to/, which
+carries the subsessionid with them.
+
+However, since Mono's urls are absolute, the subsessionid
+is lost on subsequent requests.
+
+The same code works under MS.NET because the urls are relative.
+
+Would you guys except a patch that changes Mono's behaviour regarding
+the url generation? I thought about implementing Control.ResolveClientUrl
+
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ string ResolveClientUrl (string relativeUrl);
+
+and replacing the affected ResolveUrl calls of S.W.UI.* with
+ResolveClientUrl.
More information about the mono-bugs
mailing list