Hi,

On Thu, Feb 4, 2010 at 20:15, Nelson, Erik - 2
<[email protected]> wrote:
> I noticed that basic_uri::port always returns the same value for a given
> scheme... Is that by design?  I see lots of web servers running on ports
> other than 80.
>

It shouldn't, this is the current implementation:

return parts_.port ? *(parts_.port) :
                    (boost::iequals(parts_.scheme,
string_type("https")) ? 443u : 80u);

As it's a boost::optional<boost::uint16_t> it first checks whether a
port is available in the uri_parts, this is the boolean operator of
the optional, reflected by "parts_.port", and if it is it will return
it, "*(parts_.port)". Otherwise it will check the scheme and return
443 if it is 'https' (case insensitve), and only if that's not the
case it will return 80.

> Thanks
>
> Erik
>

Jeroen

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Cpp-netlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel

Reply via email to