From aa04fe03f3bf2bacacac635eba481cfa5697672e Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 17 Apr 2007 11:56:20 +0000 Subject: [PATCH] URL parsing is closer to the RFC now svn: r5965 original commit: e885e79295df773c61e149c075f0458a478fb35d --- collects/tests/mzscheme/net.ss | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/collects/tests/mzscheme/net.ss b/collects/tests/mzscheme/net.ss index 86d6daa7e2..2cfee9d1e5 100644 --- a/collects/tests/mzscheme/net.ss +++ b/collects/tests/mzscheme/net.ss @@ -252,12 +252,16 @@ (test-s->u #("a+b-c456.d" #f "www.foo.com" #f #t (#("")) () #f) "a+b-c456.d://www.foo.com/") - ;; a colon can appear in absolute paths - (test-s->u #(#f #f #f #f #t (#("x:y") #("z")) () #f) - "/x:y/z") + ;; a colon and other junk (`sub-delims') can appear in usernames + (test #("http" "x:!$&'()*+,;=y" "www.drscheme.org" #f #t (#("a")) () #f) + string->url/vec + "http://x:!$&'()*+,;=y@www.drscheme.org/a") + ;; a colon and atsign can appear in absolute paths + (test-s->u #(#f #f #f #f #t (#("x:@y") #("z")) () #f) + "/x:@y/z") ;; and in relative paths as long as it's not in the first element - (test-s->u #(#f #f #f #f #f (#("x") #("y:z")) () #f) - "x/y:z") + (test-s->u #(#f #f #f #f #f (#("x") #("y:@z")) () #f) + "x/y:@z") ;; test bad schemes (err/rt-test (string->url "://www.foo.com/") url-exception?)