Could you please comment on 7f9818b?<div><br></div><div>It changes URLs to be able to represent &quot;there, but empty&quot; query components, but this changes the invariant that URL query components were always lists, which I think is better than putting in extraneous ?s</div>
<div><br></div><div>Jay<br><br><div class="gmail_quote">On Wed, Nov 23, 2011 at 11:00 AM,  <span dir="ltr">&lt;<a href="mailto:jay@racket-lang.org">jay@racket-lang.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
jay has updated `master&#39; from 6a99c93ebb to 9d8d36e568.<br>
  <a href="http://git.racket-lang.org/plt/6a99c93ebb..9d8d36e568" target="_blank">http://git.racket-lang.org/plt/6a99c93ebb..9d8d36e568</a><br>
<br>
=====[ 6 Commits ]======================================================<br>
<br>
Directory summary:<br>
  14.7% collects/net/<br>
  52.1% collects/tests/net/<br>
   5.7% collects/tests/plai/<br>
  15.4% collects/tests/web-server/pr/<br>
   6.8% collects/web-server/scribblings/<br>
   4.7% collects/web-server/<br>
<br>
~~~~~~~~~~<br>
<br>
d64d620 Jay McCarthy &lt;<a href="mailto:jay@racket-lang.org">jay@racket-lang.org</a>&gt; 2011-11-23 09:44<br>
:<br>
| Fixing PR10485<br>
:<br>
  A collects/tests/plai/datatype-coverage.rkt<br>
<br>
~~~~~~~~~~<br>
<br>
7f9818b Jay McCarthy &lt;<a href="mailto:jay@racket-lang.org">jay@racket-lang.org</a>&gt; 2011-11-23 10:35<br>
:<br>
| This fixes 10497 and potentially breaks programs that assume the query of a URL is always a list. I have fixed uses in the Web Server, which I expect is the major thing affected, but much more could be. Therefore I am skeptical this is a good idea just for the representation of ?. So, I&#39;d like other people to review the change and let me know if they think I should revert it.<br>

:<br>
  M collects/net/url.rkt                                         |   14 +-<br>
  M collects/net/url-structs.rkt                                 |    2 +-<br>
  M collects/tests/net/url.rkt                                   |   81 ++++---<br>
  M collects/unstable/net/url.rkt                                |    2 +-<br>
  M collects/web-server/dispatch/syntax.rkt                      |    2 +-<br>
  M collects/web-server/http/request.rkt                         |    2 +-<br>
  M .../default-web-root/htdocs/lang-servlets/add01.rkt          |    4 +-<br>
<br>
~~~~~~~~~~<br>
<br>
ccd5061 Jay McCarthy &lt;<a href="mailto:jay@racket-lang.org">jay@racket-lang.org</a>&gt; 2011-11-23 10:36<br>
:<br>
| Forgot to include doc change<br>
:<br>
  M collects/net/scribblings/url.scrbl |    2 +-<br>
<br>
~~~~~~~~~~<br>
<br>
ce6eab6 Jay McCarthy &lt;<a href="mailto:jay@racket-lang.org">jay@racket-lang.org</a>&gt; 2011-11-23 10:50<br>
:<br>
| Showing that 10546 is fixed<br>
:<br>
  A collects/tests/web-server/pr/10546.rkt<br>
<br>
~~~~~~~~~~<br>
<br>
5bd12bb Jay McCarthy &lt;<a href="mailto:jay@racket-lang.org">jay@racket-lang.org</a>&gt; 2011-11-23 10:55<br>
:<br>
| Clarifying syntax in docs<br>
:<br>
  M collects/web-server/scribblings/templates.scrbl |    5 +++--<br>
<br>
~~~~~~~~~~<br>
<br>
9d8d36e Jay McCarthy &lt;<a href="mailto:jay@racket-lang.org">jay@racket-lang.org</a>&gt; 2011-11-23 10:58<br>
:<br>
| Demonstrating that 10772 is fixed<br>
:<br>
  M collects/tests/plai/datatype.rkt |    2 ++<br>
<br>
=====[ Overall Diff ]===================================================<br>
<br>
collects/net/scribblings/url.scrbl<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
--- OLD/collects/net/scribblings/url.scrbl<br>
+++ NEW/collects/net/scribblings/url.scrbl<br>
@@ -38,7 +38,7 @@ re-exported by @racketmodname[net/url].}<br>
                 [port (or/c false/c exact-nonnegative-integer?)]<br>
                 [path-absolute? boolean?]<br>
                 [path (listof path/param?)]<br>
-                [query (listof (cons/c symbol? (or/c false/c string?)))]<br>
+                [query (or/c false/c (listof (cons/c symbol? (or/c false/c string?))))]<br>
                 [fragment (or/c false/c string?)])]{<br>
<br>
 The basic structure for all URLs, which is explained in RFC 3986<br>
<br>
collects/net/url-structs.rkt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
--- OLD/collects/net/url-structs.rkt<br>
+++ NEW/collects/net/url-structs.rkt<br>
@@ -13,7 +13,7 @@<br>
               [port (or/c false/c number?)]<br>
               [path-absolute? boolean?]<br>
               [path (listof path/param?)]<br>
-              [query (listof (cons/c symbol? (or/c string? false/c)))]<br>
+              [query (or/c false/c (listof (cons/c symbol? (or/c string? false/c))))]<br>
               [fragment (or/c false/c string?)]))<br>
  (struct path/param ([path (or/c string? (symbols &#39;up &#39;same))]<br>
                      [param (listof string?)])))<br>
<br>
collects/net/url.rkt<br>
~~~~~~~~~~~~~~~~~~~~<br>
--- OLD/collects/net/url.rkt<br>
+++ NEW/collects/net/url.rkt<br>
@@ -76,7 +76,11 @@<br>
             &quot;&quot;))<br>
         (combine-path-strings (url-path-absolute? url) path)<br>
         ;; (if query (sa &quot;?&quot; (uri-encode query)) &quot;&quot;)<br>
-        (if (null? query) &quot;&quot; (sa &quot;?&quot; (alist-&gt;form-urlencoded query)))<br>
+        (if query<br>
+            (if (null? query)<br>
+                &quot;?&quot;<br>
+                (sa &quot;?&quot; (alist-&gt;form-urlencoded query)))<br>
+            &quot;&quot;)<br>
         (if fragment (sa &quot;#&quot; (uri-encode fragment)) &quot;&quot;))))<br>
<br>
 ;; url-&gt;default-port : url -&gt; num<br>
@@ -259,7 +263,7 @@<br>
 ;; transliteration of code in rfc 3986, section 5.2.2<br>
 (define (combine-url/relative Base string)<br>
   (let ([R (string-&gt;url string)]<br>
-        [T (make-url #f #f #f #f #f &#39;() &#39;() #f)])<br>
+        [T (make-url #f #f #f #f #f &#39;() #f #f)])<br>
     (if (url-scheme R)<br>
       (begin<br>
         (set-url-scheme! T (url-scheme R))<br>
@@ -283,7 +287,7 @@<br>
               (begin<br>
                 (set-url-path-absolute?! T (url-path-absolute? Base))<br>
                 (set-url-path! T (url-path Base))<br>
-                (if (not (null? (url-query R)))<br>
+                (if (url-query R)<br>
                   (set-url-query! T (url-query R))<br>
                   (set-url-query! T (url-query Base))))<br>
               (begin<br>
@@ -485,7 +489,7 @@<br>
               [path     (if win-file?<br>
                           (separate-windows-path-strings path)<br>
                           (separate-path-strings path))]<br>
-              [query    (if query (form-urlencoded-&gt;alist query) &#39;())]<br>
+              [query    (if query (form-urlencoded-&gt;alist query) #f)]<br>
               [fragment (uri-decode/maybe fragment)])<br>
          (make-url scheme user host port abs? path query fragment))))<br>
    (cdr (or (regexp-match url-rx str)<br>
@@ -574,7 +578,7 @@<br>
                   (if (eq? base &#39;relative)<br>
                     accum<br>
                     (loop base accum)))])))])<br>
-    (make-url &quot;file&quot; #f &quot;&quot; #f (absolute-path? path) url-path &#39;() #f)))<br>
+    (make-url &quot;file&quot; #f &quot;&quot; #f (absolute-path? path) url-path #f #f)))<br>
<br>
 (define (url-&gt;path url [kind (system-path-convention-type)])<br>
   (file://-&gt;path url kind))<br>
<br>
collects/tests/net/url.rkt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
--- OLD/collects/tests/net/url.rkt<br>
+++ NEW/collects/tests/net/url.rkt<br>
@@ -1,6 +1,6 @@<br>
 #lang scheme<br>
 (require net/url tests/eli-tester<br>
-         (only-in net/uri-codec current-alist-separator-mode))<br>
+         (only-in net/uri-codec current-alist-separator-mode uri-encode))<br>
<br>
 (define (url-&gt;vec url)<br>
   (vector<br>
@@ -50,29 +50,29 @@<br>
      (current-proxy-servers))<br>
    =&gt; &#39;((&quot;http&quot; &quot;<a href="http://proxy.com" target="_blank">proxy.com</a>&quot; 3128)))<br>
<br>
-  (test-s-&gt;u #(#f #f #f #f #t (#(&quot;&quot;)) () #f)<br>
+  (test-s-&gt;u #(#f #f #f #f #t (#(&quot;&quot;)) #f #f)<br>
              &quot;/&quot;)<br>
-  (test-s-&gt;u #(#f #f #f #f #f () () #f)<br>
+  (test-s-&gt;u #(#f #f #f #f #f () #f #f)<br>
              &quot;&quot;)<br>
<br>
-  (test-s-&gt;u #(&quot;http&quot; #f #f #f #t (#(&quot;&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;http&quot; #f #f #f #t (#(&quot;&quot;)) #f #f)<br>
              &quot;http:/&quot;)<br>
<br>
-  (test-s-&gt;u #(&quot;http&quot; #f &quot;&quot; #f #t (#(&quot;&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;http&quot; #f &quot;&quot; #f #t (#(&quot;&quot;)) #f #f)<br>
              &quot;http:///&quot;)<br>
<br>
-  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #f () () #f)<br>
+  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #f () #f #f)<br>
              &quot;<a href="http://www.drscheme.org" target="_blank">http://www.drscheme.org</a>&quot;)<br>
-  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;&quot;)) #f #f)<br>
              &quot;<a href="http://www.drscheme.org/" target="_blank">http://www.drscheme.org/</a>&quot;)<br>
<br>
-  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot;) #(&quot;b&quot;) #(&quot;c&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot;) #(&quot;b&quot;) #(&quot;c&quot;)) #f #f)<br>
              &quot;<a href="http://www.drscheme.org/a/b/c" target="_blank">http://www.drscheme.org/a/b/c</a>&quot;)<br>
-  (test-s-&gt;u #(&quot;http&quot; &quot;robby&quot; &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot;) #(&quot;b&quot;) #(&quot;c&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;http&quot; &quot;robby&quot; &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot;) #(&quot;b&quot;) #(&quot;c&quot;)) #f #f)<br>
              &quot;<a href="http://robby@www.drscheme.org/a/b/c" target="_blank">http://robby@www.drscheme.org/a/b/c</a>&quot;)<br>
-  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; 8080 #t (#(&quot;a&quot;) #(&quot;b&quot;) #(&quot;c&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; 8080 #t (#(&quot;a&quot;) #(&quot;b&quot;) #(&quot;c&quot;)) #f #f)<br>
              &quot;<a href="http://www.drscheme.org:8080/a/b/c" target="_blank">http://www.drscheme.org:8080/a/b/c</a>&quot;)<br>
-  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot;) #(&quot;b&quot;) #(&quot;c&quot;)) () &quot;joe&quot;)<br>
+  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot;) #(&quot;b&quot;) #(&quot;c&quot;)) #f &quot;joe&quot;)<br>
              &quot;<a href="http://www.drscheme.org/a/b/c#joe" target="_blank">http://www.drscheme.org/a/b/c#joe</a>&quot;)<br>
   (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot;) #(&quot;b&quot;) #(&quot;c&quot;)) ((tim . &quot;&quot;)) #f)<br>
              &quot;<a href="http://www.drscheme.org/a/b/c?tim=" target="_blank">http://www.drscheme.org/a/b/c?tim=</a>&quot;)<br>
@@ -90,53 +90,53 @@<br>
   (parameterize ([current-alist-separator-mode &#39;amp])<br>
     (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot;) #(&quot;b&quot;) #(&quot;c&quot;)) ((tam . &quot;tom&quot;) (pam . &quot;pom&quot;)) &quot;joe&quot;)<br>

                &quot;<a href="http://www.drscheme.org/a/b/c?tam=tom&amp;pam=pom#joe" target="_blank">http://www.drscheme.org/a/b/c?tam=tom&amp;pam=pom#joe</a>&quot;))<br>
-  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot;) #(&quot;b&quot;) #(&quot;c&quot; &quot;b&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot;) #(&quot;b&quot;) #(&quot;c&quot; &quot;b&quot;)) #f #f)<br>
              &quot;<a href="http://www.drscheme.org/a/b/c;b" target="_blank">http://www.drscheme.org/a/b/c;b</a>&quot;)<br>
-  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot; &quot;x&quot;) #(&quot;b&quot;) #(&quot;c&quot; &quot;b&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot; &quot;x&quot;) #(&quot;b&quot;) #(&quot;c&quot; &quot;b&quot;)) #f #f)<br>
              &quot;<a href="http://www.drscheme.org/a;x/b/c;b" target="_blank">http://www.drscheme.org/a;x/b/c;b</a>&quot;)<br>
<br>
   ;; test unquoting for %<br>
   (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot;) #(&quot;b&quot;) #(&quot;c&quot;)) ((ti#m . &quot;&quot;)) &quot;jo e&quot;)<br>

              &quot;<a href="http://www.drscheme.org/a/b/c?ti%23m=#jo%20e" target="_blank">http://www.drscheme.org/a/b/c?ti%23m=#jo%20e</a>&quot;)<br>
-  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a &quot; &quot; a&quot;) #(&quot; b &quot;) #(&quot; c &quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a &quot; &quot; a&quot;) #(&quot; b &quot;) #(&quot; c &quot;)) #f #f)<br>
              &quot;<a href="http://www.drscheme.org/a%20;%20a/%20b%20/%20c%20" target="_blank">http://www.drscheme.org/a%20;%20a/%20b%20/%20c%20</a>&quot;)<br>
-  (test-s-&gt;u #(&quot;http&quot; &quot;robb y&quot; &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;http&quot; &quot;robb y&quot; &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;&quot;)) #f #f)<br>
              &quot;<a href="http://robb" target="_blank">http://robb</a>%<a href="http://20y@www.drscheme.org/" target="_blank">20y@www.drscheme.org/</a>&quot;)<br>
-  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;%a&quot;) #(&quot;b/&quot;) #(&quot;c&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;%a&quot;) #(&quot;b/&quot;) #(&quot;c&quot;)) #f #f)<br>
              &quot;<a href="http://www.drscheme.org/%25a/b%2F/c" target="_blank">http://www.drscheme.org/%25a/b%2F/c</a>&quot;)<br>
-  (test-s-&gt;u #(&quot;http&quot; &quot;robby:password&quot; &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;http&quot; &quot;robby:password&quot; &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;&quot;)) #f #f)<br>
              &quot;<a href="http://robby:password@www.drscheme.org/" target="_blank">http://robby:password@www.drscheme.org/</a>&quot;)<br>
   (test &quot;robby:password&quot; (lambda (x) (url-user (string-&gt;url x))) &quot;<a href="http://robby" target="_blank">http://robby</a>%<a href="http://3apassword@www.drscheme.org/" target="_blank">3apassword@www.drscheme.org/</a>&quot;)<br>

<br>
   ;; test the characters that need to be encoded in paths vs those that do not need to<br>
   ;; be encoded in paths<br>
-  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a:@!$&amp;&#39;()*+,=z&quot;) #(&quot;/?#[];&quot;) #(&quot;&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a:@!$&amp;&#39;()*+,=z&quot;) #(&quot;/?#[];&quot;) #(&quot;&quot;)) #f #f)<br>
              &quot;<a href="http://www.drscheme.org/a:@!$&amp;&#39;()*+,=z/%2F%3F%23%5B%5D%3B/" target="_blank">http://www.drscheme.org/a:@!$&amp;&#39;()*+,=z/%2F%3F%23%5B%5D%3B/</a>&quot;)<br>
<br>
-  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;.&quot;) #(&quot;..&quot;) #(same) #(up) #(&quot;...&quot;) #(&quot;abc.def&quot;)) () #f)<br>

+  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;.&quot;) #(&quot;..&quot;) #(same) #(up) #(&quot;...&quot;) #(&quot;abc.def&quot;)) #f #f)<br>

              &quot;<a href="http://www.drscheme.org/%2e/%2e%2e/./../.../abc.def" target="_blank">http://www.drscheme.org/%2e/%2e%2e/./../.../abc.def</a>&quot;)<br>
-  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;.&quot; &quot;&quot;) #(&quot;..&quot; &quot;&quot;) #(same &quot;&quot;) #(up &quot;&quot;) #(&quot;...&quot; &quot;&quot;) #(&quot;abc.def&quot; &quot;&quot;)) () #f)<br>

+  (test-s-&gt;u #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;.&quot; &quot;&quot;) #(&quot;..&quot; &quot;&quot;) #(same &quot;&quot;) #(up &quot;&quot;) #(&quot;...&quot; &quot;&quot;) #(&quot;abc.def&quot; &quot;&quot;)) #f #f)<br>

              &quot;<a href="http://www.drscheme.org/%2e;/%2e%2e;/.;/..;/...;/abc.def" target="_blank">http://www.drscheme.org/%2e;/%2e%2e;/.;/..;/...;/abc.def</a>;&quot;)<br>
<br>
   ;; test other scheme identifiers<br>
-  (test-s-&gt;u #(&quot;blah&quot; #f &quot;<a href="http://www.foo.com" target="_blank">www.foo.com</a>&quot; #f #t (#(&quot;&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;blah&quot; #f &quot;<a href="http://www.foo.com" target="_blank">www.foo.com</a>&quot; #f #t (#(&quot;&quot;)) #f #f)<br>
              &quot;blah://<a href="http://www.foo.com/" target="_blank">www.foo.com/</a>&quot;)<br>
-  (test-s-&gt;u #(&quot;blah99&quot; #f &quot;<a href="http://www.foo.com" target="_blank">www.foo.com</a>&quot; #f #t (#(&quot;&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;blah99&quot; #f &quot;<a href="http://www.foo.com" target="_blank">www.foo.com</a>&quot; #f #t (#(&quot;&quot;)) #f #f)<br>
              &quot;blah99://<a href="http://www.foo.com/" target="_blank">www.foo.com/</a>&quot;)<br>
-  (test-s-&gt;u #(&quot;blah+&quot; #f &quot;<a href="http://www.foo.com" target="_blank">www.foo.com</a>&quot; #f #t (#(&quot;&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;blah+&quot; #f &quot;<a href="http://www.foo.com" target="_blank">www.foo.com</a>&quot; #f #t (#(&quot;&quot;)) #f #f)<br>
              &quot;blah+://<a href="http://www.foo.com/" target="_blank">www.foo.com/</a>&quot;)<br>
-  (test-s-&gt;u #(&quot;a+b-c456.d&quot; #f &quot;<a href="http://www.foo.com" target="_blank">www.foo.com</a>&quot; #f #t (#(&quot;&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;a+b-c456.d&quot; #f &quot;<a href="http://www.foo.com" target="_blank">www.foo.com</a>&quot; #f #t (#(&quot;&quot;)) #f #f)<br>
              &quot;a+b-c456.d://<a href="http://www.foo.com/" target="_blank">www.foo.com/</a>&quot;)<br>
<br>
   ;; a colon and other junk (`sub-delims&#39;) can appear in usernames<br>
-  (test #(&quot;http&quot; &quot;x:!$&amp;&#39;()*+,;=y&quot; &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot;)) () #f)<br>
+  (test #(&quot;http&quot; &quot;x:!$&amp;&#39;()*+,;=y&quot; &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #t (#(&quot;a&quot;)) #f #f)<br>
         string-&gt;url/vec<br>
         &quot;http://x:!$&amp;&#39;()*+,;=<a href="http://y@www.drscheme.org/a" target="_blank">y@www.drscheme.org/a</a>&quot;)<br>
   ;; a colon and atsign can appear in absolute paths<br>
-  (test-s-&gt;u #(#f #f #f #f #t (#(&quot;x:@y&quot;) #(&quot;z&quot;)) () #f)<br>
+  (test-s-&gt;u #(#f #f #f #f #t (#(&quot;x:@y&quot;) #(&quot;z&quot;)) #f #f)<br>
              &quot;/x:@y/z&quot;)<br>
   ;; and in relative paths as long as it&#39;s not in the first element<br>
-  (test-s-&gt;u #(#f #f #f #f #f (#(&quot;x&quot;) #(&quot;y:@z&quot;)) () #f)<br>
+  (test-s-&gt;u #(#f #f #f #f #f (#(&quot;x&quot;) #(&quot;y:@z&quot;)) #f #f)<br>
              &quot;x/y:@z&quot;)<br>
<br>
   ;; test bad schemes<br>
@@ -148,38 +148,38 @@<br>
    (string-&gt;url &quot;a b://<a href="http://www.foo.com/" target="_blank">www.foo.com/</a>&quot;) =error&gt; url-exception?)<br>
<br>
   ;; test file: urls<br>
-  (test-s-&gt;u #(&quot;file&quot; #f &quot;&quot; #f #t (#(&quot;abc&quot;) #(&quot;def.html&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;file&quot; #f &quot;&quot; #f #t (#(&quot;abc&quot;) #(&quot;def.html&quot;)) #f #f)<br>
              &quot;file:///abc/def.html&quot;)<br>
   (test (url-&gt;string (string-&gt;url &quot;file:///abc/def.html&quot;))<br>
         =&gt; &quot;file:///abc/def.html&quot;)<br>
   (parameterize ([file-url-path-convention-type &#39;unix])<br>
     (test (url-&gt;string (string-&gt;url &quot;file://a/b&quot;))<br>
           =&gt; &quot;file://a/b&quot;)<br>
-    (test-s-&gt;u #(&quot;file&quot; #f &quot;localhost&quot; #f #t (#(&quot;abc&quot;) #(&quot;def.html&quot;)) () #f)<br>
+    (test-s-&gt;u #(&quot;file&quot; #f &quot;localhost&quot; #f #t (#(&quot;abc&quot;) #(&quot;def.html&quot;)) #f #f)<br>
                &quot;file://localhost/abc/def.html&quot;))<br>
<br>
   ;; test files: urls with colons, and the different parsing on Windows<br>
-  (test-s-&gt;u #(&quot;file&quot; #f &quot;localhost&quot; 123 #t (#(&quot;abc&quot;) #(&quot;def.html&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;file&quot; #f &quot;localhost&quot; 123 #t (#(&quot;abc&quot;) #(&quot;def.html&quot;)) #f #f)<br>
              &quot;file://localhost:123/abc/def.html&quot;)<br>
   (parameterize ([file-url-path-convention-type &#39;unix])<br>
     ;; different parse for file://foo:/...<br>
     (test (string-&gt;url/vec &quot;file://foo:/abc/def.html&quot;)<br>
-          =&gt; #(&quot;file&quot; #f &quot;foo&quot; #f #t (#(&quot;abc&quot;) #(&quot;def.html&quot;)) () #f)))<br>
+          =&gt; #(&quot;file&quot; #f &quot;foo&quot; #f #t (#(&quot;abc&quot;) #(&quot;def.html&quot;)) #f #f)))<br>
   (parameterize ([file-url-path-convention-type &#39;windows])<br>
     (test (string-&gt;url/vec &quot;file://foo:/abc/def.html&quot;)<br>
-          =&gt; #(&quot;file&quot; #f &quot;&quot; #f #t (#(&quot;foo:&quot;) #(&quot;abc&quot;) #(&quot;def.html&quot;)) () #f)<br>
+          =&gt; #(&quot;file&quot; #f &quot;&quot; #f #t (#(&quot;foo:&quot;) #(&quot;abc&quot;) #(&quot;def.html&quot;)) #f #f)<br>
           (string-&gt;url/vec &quot;file://c:/abc/def.html&quot;)<br>
-          =&gt; #(&quot;file&quot; #f &quot;&quot; #f #t (#(&quot;c:&quot;) #(&quot;abc&quot;) #(&quot;def.html&quot;)) () #f)<br>
+          =&gt; #(&quot;file&quot; #f &quot;&quot; #f #t (#(&quot;c:&quot;) #(&quot;abc&quot;) #(&quot;def.html&quot;)) #f #f)<br>
           (string-&gt;url/vec &quot;file:\\\\d\\c\\abc\\def.html&quot;)<br>
-          =&gt; #(&quot;file&quot; #f &quot;&quot; #f #t (#(&quot;&quot;) #(&quot;d&quot;) #(&quot;c&quot;) #(&quot;abc&quot;) #(&quot;def.html&quot;)) () #f)))<br>
+          =&gt; #(&quot;file&quot; #f &quot;&quot; #f #t (#(&quot;&quot;) #(&quot;d&quot;) #(&quot;c&quot;) #(&quot;abc&quot;) #(&quot;def.html&quot;)) #f #f)))<br>
<br>
   (parameterize ([file-url-path-convention-type &#39;unix])<br>
     ;; but no effect on http://foo:/...<br>
     (test (string-&gt;url/vec &quot;http://foo:/abc/def.html&quot;)<br>
-          =&gt; #(&quot;http&quot; #f &quot;foo&quot; #f #t (#(&quot;abc&quot;) #(&quot;def.html&quot;)) () #f)))<br>
+          =&gt; #(&quot;http&quot; #f &quot;foo&quot; #f #t (#(&quot;abc&quot;) #(&quot;def.html&quot;)) #f #f)))<br>
   (parameterize ([file-url-path-convention-type &#39;windows])<br>
     (test (string-&gt;url/vec &quot;http://foo:/abc/def.html&quot;)<br>
-          =&gt; #(&quot;http&quot; #f &quot;foo&quot; #f #t (#(&quot;abc&quot;) #(&quot;def.html&quot;)) () #f)))<br>
+          =&gt; #(&quot;http&quot; #f &quot;foo&quot; #f #t (#(&quot;abc&quot;) #(&quot;def.html&quot;)) #f #f)))<br>
<br>
   (test (url-&gt;string (path-&gt;url (bytes-&gt;path #&quot;c:\\a\\b&quot; &#39;windows)))<br>
         =&gt; &quot;file:///c:/a/b&quot;<br>
@@ -228,7 +228,7 @@<br>
          &quot;<a href="HTTP://ROBBY@WWW.DRSCHEME.ORG:80/INDEX.HTML;XXX?T=P#YYY" target="_blank">HTTP://ROBBY@WWW.DRSCHEME.ORG:80/INDEX.HTML;XXX?T=P#YYY</a>&quot;)<br>
         =&gt; #(&quot;http&quot; &quot;ROBBY&quot; &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; 80 #t (#(&quot;INDEX.HTML&quot; &quot;XXX&quot;)) ((T . &quot;P&quot;)) &quot;YYY&quot;))<br>

<br>
-  (test-s-&gt;u #(&quot;mailto&quot; #f #f #f #f (#(&quot;<a href="mailto:robby@racket-lang.org">robby@racket-lang.org</a>&quot;)) () #f)<br>
+  (test-s-&gt;u #(&quot;mailto&quot; #f #f #f #f (#(&quot;<a href="mailto:robby@racket-lang.org">robby@racket-lang.org</a>&quot;)) #f #f)<br>
              &quot;mailto:<a href="mailto:robby@racket-lang.org">robby@racket-lang.org</a>&quot;)<br>
<br>
   (test (string-&gt;url/vec &quot;<a href="http://www.drscheme.org?bar=%E9%A6%A8%E6%85%A7%22" target="_blank">http://www.drscheme.org?bar=馨慧&quot;</a>)<br>
@@ -238,7 +238,7 @@<br>
         =&gt; #(&quot;http&quot; #f &quot;<a href="http://www.drscheme.org" target="_blank">www.drscheme.org</a>&quot; #f #f () ((bár . &quot;é&quot;)) #f))<br>
<br>
   (test-c-u/r &quot;<a href="http://www.drscheme.org" target="_blank">http://www.drscheme.org</a>&quot;<br>
-              (make-url #f #f #f #f #f &#39;() &#39;() #f)<br>
+              (make-url #f #f #f #f #f &#39;() #f #f)<br>
               &quot;<a href="http://www.drscheme.org" target="_blank">http://www.drscheme.org</a>&quot;)<br>
<br>
   (test-c-u/r &quot;<a href="http://www.drscheme.org" target="_blank">http://www.drscheme.org</a>&quot;<br>
@@ -351,6 +351,11 @@<br>
<br>
      ))<br>
<br>
+  ;; PR 10497<br>
+  (test<br>
+   (url-&gt;string (url #f #f #f #f #f empty empty #f)) =&gt; &quot;?&quot;<br>
+   (url-&gt;string (url #f #f #f #f #f empty #f #f)) =&gt; &quot;&quot;)<br>
+<br>
   )<br>
<br>
 (provide tests)<br>
<br>
collects/tests/plai/datatype-coverage.rkt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
--- /dev/null<br>
+++ NEW/collects/tests/plai/datatype-coverage.rkt<br>
@@ -0,0 +1,11 @@<br>
+#lang plai<br>
+;; RE: PR10485<br>
+(define-type toy<br>
+  [airplane (lift number?) (name string?)])<br>
+<br>
+(type-case toy (airplane 3412 &quot;the bat!&quot;)<br>
+  [airplane (lift name) (+ lift 13)])<br>
+<br>
+;; The body of this function should be the only red in the file<br>
+(define (f x)<br>
+  (+ 1 1))<br>
\ No newline at end of file<br>
<br>
collects/tests/plai/datatype.rkt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
--- OLD/collects/tests/plai/datatype.rkt<br>
+++ NEW/collects/tests/plai/datatype.rkt<br>
@@ -57,4 +57,6 @@<br>
  (type-case &quot;foo&quot; &quot;bar&quot;) =error&gt; &quot;this must be a type defined with define-type&quot;<br>
<br>
  (type-case + &quot;bar&quot;) =error&gt; &quot;this must be a type defined with define-type&quot;<br>
+<br>
+ (type-case #f [x () 1]) =error&gt; &quot;this must be a type defined with define-type&quot;<br>
  )<br>
<br>
collects/tests/web-server/pr/10546.rkt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
--- /dev/null<br>
+++ NEW/collects/tests/web-server/pr/10546.rkt<br>
@@ -0,0 +1,55 @@<br>
+#lang racket<br>
+<br>
+(define here (current-directory))<br>
+(define txt (build-path here &quot;some.txt&quot;))<br>
+<br>
+(with-output-to-file txt<br>
+  #:exists &#39;replace<br>
+  (lambda ()<br>
+    (display #&lt;&lt;END<br>
+Here is some text that looks at @this<br>
+END<br>
+  )))<br>
+<br>
+(with-output-to-file &quot;relative.rkt&quot;<br>
+  #:exists &#39;replace<br>
+  (lambda ()<br>
+    (display #&lt;&lt;END<br>
+#lang racket<br>
+(require web-server/templates)<br>
+(provide ans)<br>
+<br>
+(define this 5)<br>
+(define ans (include-template &quot;some.txt&quot;))<br>
+END<br>
+  )))<br>
+<br>
+(with-output-to-file &quot;absolute.rkt&quot;<br>
+  #:exists &#39;replace<br>
+  (lambda ()<br>
+    (display #&lt;&lt;END<br>
+#lang racket<br>
+(require web-server/templates)<br>
+(provide ans)<br>
+<br>
+(define this 5)<br>
+(define ans (include-template (file &quot;<br>
+END<br>
+  )<br>
+<br>
+ (display (path-&gt;string txt))<br>
+<br>
+(display #&lt;&lt;END<br>
+&quot;)))<br>
+END<br>
+)))<br>
+<br>
+(require tests/eli-tester)<br>
+(define rel (dynamic-require &quot;relative.rkt&quot; &#39;ans))<br>
+(define abs (dynamic-require &quot;absolute.rkt&quot; &#39;ans))<br>
+(test<br>
+  rel =&gt; abs<br>
+  rel =&gt; &quot;Here is some text that looks at 5&quot;)<br>
+<br>
+<br>
+<br>
<br>
collects/unstable/net/url.rkt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
--- OLD/collects/unstable/net/url.rkt<br>
+++ NEW/collects/unstable/net/url.rkt<br>
@@ -20,7 +20,7 @@<br>
      (url-port in-url)<br>
      (url-path-absolute? in-url)<br>
      new-path<br>
-     empty<br>
+     #f<br>
      (url-fragment in-url))))<br>
 ;; Eli: if it also removes the query, this it&#39;s a bad name, and it&#39;s<br>
 ;;   questionable whether it is general enough.  Why not make it into a<br>
<br>
collects/web-server/default-web-root/htdocs/lang-servlets/add01.rkt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
--- OLD/collects/web-server/default-web-root/htdocs/lang-servlets/add01.rkt<br>
+++ NEW/collects/web-server/default-web-root/htdocs/lang-servlets/add01.rkt<br>
@@ -8,7 +8,7 @@<br>
   (let* ([uri (request-uri req)]<br>
          [qry (url-query uri)])<br>
     (cond<br>
-      [(assoc &#39;second qry)<br>
+      [(and qry (assoc &#39;second qry))<br>
        =&gt; (lambda (a-pair)<br>
             (response/xexpr<br>
              `(html (head (title &quot;Answer Page&quot;))<br>
@@ -17,7 +17,7 @@<br>
                      (p ,(format &quot;The answer is: ~a&quot;<br>
                                  (+ (string-&gt;number (cdr a-pair))<br>
                                     (string-&gt;number (cdr (assoc &#39;first qry))))))))))]<br>
-      [(assoc &#39;first qry)<br>
+      [(and qry (assoc &#39;first qry))<br>
        =&gt; (lambda (a-pair)<br>
             (response/xexpr<br>
              `(html (head (title &quot;Second Page&quot;))<br>
<br>
collects/web-server/dispatch/syntax.rkt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
--- OLD/collects/web-server/dispatch/syntax.rkt<br>
+++ NEW/collects/web-server/dispatch/syntax.rkt<br>
@@ -16,7 +16,7 @@<br>
                  (list (make-path/param &quot;&quot; empty))<br>
                  (map (lambda (s) (make-path/param s empty))<br>
                       strlist))<br>
-             empty #f)))<br>
+             #f #f)))<br>
<br>
 (define-syntax (dispatch-case stx)<br>
   (syntax-case stx (else)<br>
<br>
collects/web-server/http/request.rkt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
--- OLD/collects/web-server/http/request.rkt<br>
+++ NEW/collects/web-server/http/request.rkt<br>
@@ -177,7 +177,7 @@<br>
                                    (make-binding:form (string-&gt;bytes/utf-8 (symbol-&gt;string k))<br>
                                                       (string-&gt;bytes/utf-8 v))<br>
                                    #f)])<br>
-                            (url-query uri))))<br>
+                            (or (url-query uri) empty))))<br>
              #f)]<br>
     [(bytes-ci=? #&quot;POST&quot; meth)<br>
      (local<br>
<br>
collects/web-server/scribblings/templates.scrbl<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
--- OLD/collects/web-server/scribblings/templates.scrbl<br>
+++ NEW/collects/web-server/scribblings/templates.scrbl<br>
@@ -2,6 +2,7 @@<br>
 @(require &quot;web-server.rkt&quot;)<br>
 @(require (for-label web-server/servlet<br>
                      web-server/templates<br>
+                     racket/include<br>
                      racket/promise<br>
                      racket/list<br>
                      xml))<br>
@@ -358,8 +359,8 @@ the template to be unescaped, then create a @racket[cdata] structure:<br>
<br>
 @section{API Details}<br>
<br>
-@defform[(include-template path)]{<br>
- Compiles the template at @racket[path] using the @at-reader-ref syntax within the enclosing lexical context.<br>
+@defform[(include-template path-spec)]{<br>
+ Compiles the template at @racket[path-spec] using the @at-reader-ref syntax within the enclosing lexical context. The @racket[path-spec] is the same format used by @racket[include].<br>
<br>
  Example:<br>
  @racketblock[<br>
</blockquote></div><br></div>