";" semi-colons in urls
[1/8] from: norsepower:uswest at: 10-Jan-2001 23:33
Using 'read or 'browse on the following url brings up an error page, but
dropping the same url in a browser address bar loads the page ok. Is there
something about this url construction which REBOL can't handle? (I see the
semi-colons may pose a problem?)
http://ad2.doubleclick.net/jump/sonar.bebits/default;sz=468x60;ord=979190170
-Ryan
[2/8] from: holger:rebol at: 11-Jan-2001 12:28
On Wed, Jan 10, 2001 at 11:33:13PM -0600, <[norsepower--uswest--net]> wrote:
> Using 'read or 'browse on the following url brings up an error page, but
> dropping the same url in a browser address bar loads the page ok. Is there
> something about this url construction which REBOL can't handle? (I see the
> semi-colons may pose a problem?)
>
> http://ad2.doubleclick.net/jump/sonar.bebits/default;sz=468x60;ord=979190170
The semicolon introduces comments in REBOL, i.e. the scanner considers
;sz=468x60;ord=979190170
to be a comment in your script and does not
include it in the URL. Workarounds:
Either:
to-url "http://ad2.doubleclick.net/jump/sonar.bebits/default;sz=468x60;ord=979190170"
Or:
http://ad2.doubleclick.net/jump/sonar.bebits/default%3Bsz=468x60%3Bord=979190170
%3B is the hex representation of the ASCII code of ";".
--
Holger Kruse
[holger--rebol--com]
[3/8] from: rchristiansen::pop::isdfa::sei-it::com at: 11-Jan-2001 15:11
Either I didn't understand your solution or it doesn't work with
REBOL/Core 2.3.0.3.1 for Windows.
>> to-url http://ad2.doubleclick.net/jump/sonar.bebits/default;sz=468x60;ord=979
190170
== http://ad2.doubleclick.net/jump/sonar.bebits/default
This cuts off everything past the semi-colon
>> read http://ad2.doubleclick.net/jump/sonar.bebits/default%3Bsz=468x60%3Bord=9
79190170
** User Error: URL error: http://ad2.doubleclick.net/jump/sonar.bebits/default;s
z=468x60;ord=979190170.
** Where: read http://ad2.doubleclick.net/jump/sonar.bebits/default%3Bsz=468x60%
3Bord=979190170
Using the ASCII code gives a "User Error" error
>> to-url http://ad2.doubleclick.net/jump/sonar.bebits/default%3Bsz=468x60%3Bord
=979190170
== http://ad2.doubleclick.net/jump/sonar.bebits/default%3Bsz=468x60%3Bord=979190
170
>> some-url: to-url http://ad2.doubleclick.net/jump/sonar.bebits/default%3Bsz=46
8x60%3Bord=979190170
== http://ad2.doubleclick.net/jump/sonar.bebits/default%3Bsz=468x60%3Bord=979190
170
>> read some-url
** User Error: URL error: http://ad2.doubleclick.net/jump/sonar.bebits/default;s
z=468x60;ord=979190170.
** Where: read some-url
Cannot use 'read on the url with the ASCII code
>> browse some-url
** Script Error: Feature not available in this REBOL.
** Where: browse some-url
Cannot use 'browse on the url with the ASCII code
>> second-url: make url! http://ad2.doubleclick.net/jump/sonar.bebits/default%3B
sz=468x60%3Bord=979190170
== http://ad2.doubleclick.net/jump/sonar.bebits/default%3Bsz=468x60%3Bord=979190
170
>> read second-url
** User Error: URL error: http://ad2.doubleclick.net/jump/sonar.bebits/default;s
z=468x60;ord=979190170.
** Where: read second-url
>> browse second-url
** Script Error: Feature not available in this REBOL.
** Where: browse second-url
>>
I also tried 'make 'url! with the same results.
-Ryan
[4/8] from: carl:cybercraft at: 12-Jan-2001 11:07
On 12-Jan-01, Ryan C. Christiansen wrote:
> Either I didn't understand your solution or it doesn't work with
> REBOL/Core 2.3.0.3.1 for Windows.
>>> to-url
>>>
http://ad2.doubleclick.net/jump/sonar.bebits/default;sz=468x60;ord=979
> 190170
> == http://ad2.doubleclick.net/jump/sonar.bebits/default
> This cuts off everything past the semi-colon
The URL should've been in quotes - ie a string. All the
to-something
words, (to-url, to-string etc.), are for forcing a
value to be a specific datatype, even though they may be of another
type.
That said, I still get the same error as you.
>>> read
>>>
http://ad2.doubleclick.net/jump/sonar.bebits/default%3Bsz=468x60%3Bord=9
> 79190170
> ** User Error: URL error:
<<quoted lines omitted: 3>>
> 3Bord=979190170
> Using the ASCII code gives a "User Error" error
--
Carl Read
[carl--cybercraft--co--nz]
[5/8] from: holger:rebol at: 11-Jan-2001 14:54
On Thu, Jan 11, 2001 at 03:11:40PM -0600, Ryan C. Christiansen wrote:
> Either I didn't understand your solution or it doesn't work with
> REBOL/Core 2.3.0.3.1 for Windows.
<<quoted lines omitted: 3>>
> 3Bord=979190170
> Using the ASCII code gives a "User Error" error
Ok, looks like the version of REBOL you use still has the old URL parser, which
does not support ";". Here is a workaround:
http://ad2.doubleclick.net/jump/sonar.bebits/default%253Bsz=468x60%253Bord=979190170
This double-escapes the ";". The server should still be able to handle it.
--
Holger Kruse
[holger--rebol--com]
[6/8] from: rchristiansen:pop:isdfa:sei-it at: 11-Jan-2001 17:48
Is the new URL parser in an unreleased version of /Core? I tried to
read or browse urls with ";" semi-colons in /Core (Experimental)
2.4.39.3.1 for Windows and the URLs do not work there, either.
[7/8] from: rchristiansen:pop:isdfa:sei-it at: 11-Jan-2001 17:51
This workaround does work, by the way. (Thank you.) The URL in the
previous examples will no longer work (expired.) Here is a current
URL that should work for anyone that wants to test it:
http://ad2.doubleclick.net/click%253B929250%253B0-0%253B0%253B4336617%253B1-468|60%253B0|0|0%253B%253B%3fhttp://www.drugfreeamerica.org
[8/8] from: holger:rebol at: 11-Jan-2001 17:25
On Thu, Jan 11, 2001 at 05:48:01PM -0600, Ryan C. Christiansen wrote:
> Is the new URL parser in an unreleased version of /Core? I tried to
> read or browse urls with ";" semi-colons in /Core (Experimental)
> 2.4.39.3.1 for Windows and the URLs do not work there, either.
Yes, it is a very recent change. Probably not in the current experimental...
--
Holger Kruse
[holger--rebol--com]
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted