From: Mel on
I am getting the following error from a perfectly good url of
http://uk.finance.yahoo.com/q/cp?s=^FTSE


--- do_request for http://uk.finance.yahoo.com/q/cp?s=^FTSE
Illegal characters in URL path
while executing
"::http::geturl http://uk.finance.yahoo.com/q/cp?s=^FTSE -headers {}"

How can I bypass this good url ?

thanks in advance
From: Larry W. Virden on
On Nov 25, 9:04 am, Mel <MelHer...(a)gmail.com> wrote:
> I am getting the following error from a perfectly good url ofhttp://uk.finance.yahoo.com/q/cp?s=^FTSE
>
> --- do_request forhttp://uk.finance.yahoo.com/q/cp?s=^FTSE
> Illegal characters in URL path
>     while executing
> "::http::geturlhttp://uk.finance.yahoo.com/q/cp?s=^FTSE -headers {}"
>
> How can I bypass this good url ?
>
> thanks in advance

I guess my first thought would be "how can I find out from
http::geturl _what_ the illegal character is that it is reporting.

As for what to do about it, I wonder if http://formatQuery is what you
need to invoke, getting back the string to append to cp?
From: Eric Hassold on
Hello,

Enforce escaping of all non alpha-numeric characters using
::http::formatQuery.

package require http
set url "http://uk.finance.yahoo.com/q/cp"
append url "?" [::http::formatQuery s ^FTSE]
::http::geturl $url -headers {}

Eric


Mel wrote :
> I am getting the following error from a perfectly good url of
> http://uk.finance.yahoo.com/q/cp?s=^FTSE
>
>
> --- do_request for http://uk.finance.yahoo.com/q/cp?s=^FTSE
> Illegal characters in URL path
> while executing
> "::http::geturl http://uk.finance.yahoo.com/q/cp?s=^FTSE -headers {}"
>
> How can I bypass this good url ?
>
> thanks in advance
From: Mark Janssen on
On Nov 25, 3:41 pm, Eric Hassold <hass...(a)evolane.com> wrote:
> Hello,
>
> Enforce escaping of all non alpha-numeric characters using
> ::http::formatQuery.
>
> package require http
> set url "http://uk.finance.yahoo.com/q/cp"
> append url "?" [::http::formatQuery s ^FTSE]
> ::http::geturl $url -headers {}
>
> Eric
>
> Mel wrote :
>
> > I am getting the following error from a perfectly good url of
> >http://uk.finance.yahoo.com/q/cp?s=^FTSE
>
> > --- do_request forhttp://uk.finance.yahoo.com/q/cp?s=^FTSE
> > Illegal characters in URL path
> >     while executing
> > "::http::geturlhttp://uk.finance.yahoo.com/q/cp?s=^FTSE -headers {}"
>
> > How can I bypass this good url ?
>
> > thanks in advance
>
>

Or more straightforward:

% http::geturl http://uk.finance.yahoo.com/q/cp?s=^FTSE -strict 0

Mark