[EMAIL PROTECTED] wrote:
> On Mon, 24 Jan 2000, you wrote:
> > I'm trying to loggin to a web page that needs a name and
> > password.
> >
> > The problem is the name has a "\" in it. This cases the URL
> > parsing to barf.
> >
> > How do I do this?
> >
> > http://my\name:[EMAIL PROTECTED]
>
> The official standard for URLs (RFC 1738) specifies that certain
> characters may never appear in URLs. The "\" character is among
> them, i.e. the above URL with the "\" in it is invalid. That is a universal
> rule, independent of which language or browser you use. Some
> browsers may not always strictly enforce that rule, but REBOL does.
>
> In order to send those special characters to the server as part of
> URL components you need to hex-encode them, i.e. normally
> (from web browsers) the following should work:
>
> http://my%5cname:[EMAIL PROTECTED]
>
> Unfortunately, with REBOL this currently does not work, because
> REBOL already uses the %-escape mechanism to allow its own
> special characters (";" for comments, "[", "]" for blocks etc.)
> to be escaped, and therefore removes any escaping from URLs
> before parsing the URL into components, so even with the %5c
> the internal, scanned URL in REBOL has the "\" in it, and you will
> still get a "URL Error" from the URL parser.
>
> The solution (I hope) is to use "double-escaping", i.e. escape
> the "%" in "%5c" again into a "%25", resulting in
>
> http://my%255cname:[EMAIL PROTECTED]
>
> This won't win a beauty contest but should work, at least in the
> current version. Please try not to rely on this trick too much
> though, because it may very well change in a future version,
> in favor of a nicer, easier solution.
>
Ha, Holger, welcome to the list :-) Could you please share with us a little bit
what's planned re REBOL protocols for some future versions of the language?
Best Wishes,
-pekr-
>
> --
> Holger Kruse
> [EMAIL PROTECTED]