[fpc-pascal] Re: URIParser
idokan at gmail.com
Wed May 18 17:03:18 CEST 2011
On Wed, May 18, 2011 at 17:56, <michael.vancanneyt at wisa.be> wrote:
> On Wed, 18 May 2011, Ludo Brands wrote:
> Problem is that the RFC definition for the URI doesn't specify the
>> individual protocol scheme. So every protocol can specify it's own stuff.
>> Take the general sip URI:
>> sip:user:password at host:port;uri-parameters?headers. User can be a
>> number with folowing definition: global-phone-number = "+"
>> base-phone-number [isdn-subaddress]
>> [post-dial] *(area-specifier /
>> service-provider / future-extension)
>> local-phone-number = 1*(phonedigit / dtmf-digit /
>> pause-character) [isdn-subaddress]
>> [post-dial] area-specifier
>> *(area-specifier / service-provider /
>> This definitely will require custom processing.
>> Also both uri-parameters and headers are name=value pairs. The first are
>> separated by ";" and the second by "&"...
>> I'm afraid a universal URI decoder isn't possible.
> Great. In that case I just declare that URIParser will only work for ftp
> and http
> protocols :-)
I think it is possible. You can also add another field to the record of
"Extra data" and allow others to parse it.
the headers are like the HTTP URI (even the encoding of it is the same), and
the params are like the HTTP Post more or less but divided by a semicolon.
But I can work with parsing it myself imho, because that part is either
starting with question mark or by semicolon.
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal