On Wed, Aug 15, 2007 at 12:20:16PM +0200, Henrik Holst wrote:
>  is there a reason for ne_uri_parse to only set parsed->port if the URI 
> contains a specific port setting, such as 
> "http://www.webdav.org:8080/index.html"; and not setting it first using 
> ne_uri_defaultport?
> 
> This means that usercode have to call ne_uri_defaultport if it finds 
> that parsed->port is zero before a call to say ne_session_create. Not 
> that big of a hassle but if there is no reason for ne_uri_parse not to 
> set the port to the default value before parsing the uri I really think 
> that it would be better for ne_uri_parse to set the port.

I know it is slightly annoying, but performing the scheme -> port 
mapping is not part of the URI parsing process.  It's important to keep 
them separate; the caller may wish to use some other mechanism to map 
schemes to default port.  If ne_uri_parse() did it, the caller can't 
tell whether the port was specified in the URI or whether it was set by 
default from the scheme.

Regards,

joe
_______________________________________________
neon mailing list
[email protected]
http://mailman.webdav.org/mailman/listinfo/neon

Reply via email to