[Mono-bugs] [Bug 335615] Query string parsing in System.Web

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Oct 23 14:15:54 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=335615#c2


Robert Jordan <robertj at gmx.net> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |robertj at gmx.net




--- Comment #2 from Robert Jordan <robertj at gmx.net>  2007-10-23 12:15:53 MST ---
On MS.NET, both profiles, the test case returns

--
1
2
1;arg2=2
--


On Mono
--
1
2
1
2
--

So it seems that MS.NET actually doesn't support ";" as a query string
separator.


using System;
using System.IO;
using System.Web;
using System.Web.Hosting;

class TinyHost : MarshalByRefObject
{
        public static TinyHost CreateHost ()
        {
                string path = Directory.GetCurrentDirectory ();
                string bin = Path.Combine (path, "bin");
                string asm = Path.GetFileName (typeof
(TinyHost).Assembly.Location);

                Directory.CreateDirectory (bin);
                File.Copy (asm, Path.Combine (bin, asm), true);

                return (TinyHost) ApplicationHost.CreateApplicationHost (
                        typeof (TinyHost), "/", path);

        }

        public void Execute (string page, string query)
        {
                SimpleWorkerRequest req = new SimpleWorkerRequest (
                        page, query, Console.Out);
                HttpRuntime.ProcessRequest (req);
        }

        static void Main ()
        {
                TinyHost h = CreateHost ();
                StreamWriter w = new StreamWriter ("page.aspx");
                w.WriteLine (@"<%@ Page Language=""C#"" %>");
                w.WriteLine (@"<%= Request.QueryString [""arg1""] %>");
                w.WriteLine (@"<%= Request.QueryString [""arg2""] %>");
                w.Close ();
                h.Execute ("page.aspx", "arg1=1&arg2=2");
                h.Execute ("page.aspx", "arg1=1;arg2=2");
        }
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list