[fpc-pascal] Re: URIParser
Ludo Brands
ludo.brands at free.fr
Wed May 18 16:32:42 CEST 2011
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 telephone
number with folowing definition: global-phone-number = "+"
base-phone-number [isdn-subaddress]
[post-dial] *(area-specifier /
service-provider / future-extension)
Or
local-phone-number = 1*(phonedigit / dtmf-digit /
pause-character) [isdn-subaddress]
[post-dial] area-specifier
*(area-specifier / service-provider /
future-extension)
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.
Ludo
-----Message d'origine-----
De : fpc-pascal-bounces at lists.freepascal.org
[mailto:fpc-pascal-bounces at lists.freepascal.org] De la part de
michael.vancanneyt at wisa.be
Envoyé : mercredi 18 mai 2011 16:14
À : FPC-Pascal users discussions
Objet : Re: [fpc-pascal] Re: URIParser
On Wed, 18 May 2011, ik wrote:
> On Wed, May 18, 2011 at 16:49, <michael.vancanneyt at wisa.be> wrote:
>> So, how to distinguish between the two ?
>>
>> sip:mysecret at mydomain.com
>>
>> Is "sip" the protocol or the user name for a HTTP address ?
>>
>
> sip is the protocol, mysecrect is the user name
>
> sip::mysecrect at mydomain.com
>
> according to the RFC is the proper way to have
> 1. Protocol
> 2. Empty user name
> 3. Password
> 4. Domain
I will check the implementation.
As far as I know, it was never meant to be RFC compliant, but we can change
that of course.
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
More information about the fpc-pascal
mailing list