Around February I was trying to add urlencode() calls to the XHR code and try to say "this needs a call because it's not encoded yet."

At that time, Karl sez:

I take issue with your encoded decoded test, because I've been down
that path before.

There is simply no way to tell if a url is encoded.

So acknowledging this, I am wondering if there is something we can do about the following xhr call from radio caroline, and any others that would be on this pattern. It doesn't work with a space and it does work with a %20.

xhr http://radiocaroline.co.uk/website_prefs.json?v=2018-05-25 
23:31:19.890+00:00
curl>
GET /website_prefs.json?v=2018-05-25 23:31:19.890+00:00 HTTP/1.1
Host: radiocaroline.co.uk

curl<
HTTP/1.1 400 Bad Request


---



When I just go to startwinow, replace spaces with %20 just before fetchHTTP and recompile, the load of website_prefs succeeds and this triggers a whole bunch of new things like the long list of available 'g' links to different sections. (Whether the links work is another matter but when website_prefs succeeds, at least they render in the first place.)

xhr http://radiocaroline.co.uk/website_prefs.json?v=2018-05-25%2023:33:04.754+00:00
curl>
GET /website_prefs.json?v=2018-05-25%2023:33:04.754+00:00 HTTP/1.1
Host: radiocaroline.co.uk

curl<
HTTP/1.1 200 OK


Reply via email to