<br><div class="gmail_quote">On Wed, Sep 30, 2009 at 9:57 PM, Eli Barzilay <span dir="ltr"><<a href="mailto:eli@barzilay.org" target="_blank">eli@barzilay.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Sep 30, Synx wrote:<br>
> (url->string (string->url "?")) => ""<br>
><br>
> I can't seem to make a url structure where url->string produces the<br>
> valid URL "?" (meaning the same spot, with no query arguments). ""<br>
> by itself means the same spot with the same query arguments.<br>
><br>
> I would recommend adding something in the url structure contract<br>
> that allows the query portion of make-url be either (listof (cons/c<br>
> symbol? (or/c false/c string?))) or 'clear to produce a ? without<br>
> any name/value pairs.<br>
<br>
Allowing #f (which is a different contract) seems like the right thing<br>
(given that the fragment part is done this way), but I'm not sure if<br>
there's code that relies on it. Is there anyone who uses this and<br>
relies on the query part to always be a list of bindings?<br></blockquote><div><br>This change will mean mapping the query would take one extra test - or we will have to have a separate function to help filter it out. <br>
<br>(define (url-query* url)<br> (if (not (url-query url)) '() (url-query url))) <br><br>Which probably should be supplied within net/url so people who depends on the binding do not have to write their own. <br> </div>
Cheers,<br>yc<br><br></div>