<div dir="ltr">Even, Craig,<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 12, 2017 at 4:15 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div style="font-family:"Sans Serif";font-size:9pt;font-weight:400;font-style:normal">
<p style="margin:0px;text-indent:0px">Craig,</p><span class="gmail-">
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">> True, but that does eliminate ambiguity in the URL, and does so in a</p>
<p style="margin:0px;text-indent:0px">> well-known way.</p></span></div></blockquote><div><br></div><div>I'd like to point out that very often URLs in a query string do not need to be encoded. Both the Python (see my earlier example) and Node standard parsers will handle the string</div><div><br></div><div>/viscurl?option1=foo&option2=bar&url=<a href="https://example.com/foo.tif">https://example.com/foo.tif</a><br></div><div><br></div><div>without any URL encoding.</div><div><br></div><div><div>> url.parse('/viscurl?option1=foo&option2=bar&url=<a href="https://example.com/foo.tif">https://example.com/foo.tif</a>', true)</div><div>Url {</div><div>  protocol: null,</div><div>  slashes: null,</div><div>  auth: null,</div><div>  host: null,</div><div>  port: null,</div><div>  hostname: null,</div><div>  hash: null,</div><div>  search: '?option1=foo&option2=bar&url=<a href="https://example.com/foo.tif">https://example.com/foo.tif</a>',</div><div>  query:</div><div>   { option1: 'foo',</div><div>     option2: 'bar',</div><div>     url: '<a href="https://example.com/foo.tif">https://example.com/foo.tif</a>' },</div><div>  pathname: '/viscurl',</div><div>  path: '/viscurl?option1=foo&option2=bar&url=<a href="https://example.com/foo.tif">https://example.com/foo.tif</a>',</div><div>  href: '/viscurl?option1=foo&option2=bar&url=<a href="https://example.com/foo.tif">https://example.com/foo.tif</a>' }</div></div><div><br></div><div>If the web resource has a query string of its own, it will certainly have to be encoded.</div><div><br></div><div>Typing URLs by hand into the console, URL-encoded or not, is always going to invite mistakes. In my experience, we're more likely to be selecting and copying from a UI element or the output of another program, and it would be unfortunate to trade away the benefits of URL standards only to make typing easier.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-family:"Sans Serif";font-size:9pt;font-weight:400;font-style:normal"><span class="gmail-">
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> Does the current scheme use any encoding?</p>
<p style="margin:0px;text-indent:0px"> </p>
</span><p style="margin:0px;text-indent:0px">No</p><span class="gmail-">
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">> How would you escape text in</p>
<p style="margin:0px;text-indent:0px">> option values that might use `=` and `,` etc? Or are there guaranteed to be</p>
<p style="margin:0px;text-indent:0px">> no freeform-text options in these paths?</p>
<p style="margin:0px;text-indent:0px"> </p>
</span><p style="margin:0px;text-indent:0px">Currently, given the supported set of options and values, yes. In case of future ambiguity, yes, we'd need to define some escaping rules.</p></div></blockquote><div><br></div><div>The web already has escaping rules built in, one of the benefits I alluded to above.</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Sean Gillies</div></div>
</div></div>