Re: Updates URL.pm file

Graham Barr (bodg@tiuk.ti.com)
Sat, 18 Mar 95 16:09:49 GMT


In <9503180113.aa00601@paris.ics.uci.edu> 
On Sat, 18 Mar 1995 01:12:46 -0800 
Roy T. Fielding <fielding@avron.ICS.UCI.EDU> writes:
> [...]
> 
> It is not possible to properly escape the special characters in a
> URL in one fell swoop.  Each component of a URL has separate requirements
> regarding what must be escaped, and those requirements are also
> dependent on the URL scheme.  That is why the perl4 version uses a
> parameter to specify the replacement string (unsafe characters):

This is similar to the reasion which made me decide not to have a general
parser. What II did was to bless the URL into a package based on its scheme
and then call methods to parse  an rebuild the URL string. This could be 
extended for escaping the URL.

Regards,
Graham.

--
        .-----------------------------------------------------------.  
  ////  | Graham Barr                Email: bodg@tiuk.ti.com        |  \\\\ 
 |  00  | VLSI Cell Designer            or: bodg@ti.com             |  00  |
 O   ^  | MOS Design                TI MSG: BODG                    |  ^   O
  \ ~/  | Texas Instruments Ltd      Phone: +44 (0)1234 22 3419     |  \~ / 
        | ENGLAND                      Fax: +44 (0)1234 22 3331     |
        `-----------------------------------------------------------'