Beispiel #1
0
void URI::setScheme(const std::string& scheme)
{
	_scheme = scheme;
	toLowerInPlace(_scheme);
	if (_port == 0)
		_port = getWellKnownPort();
}
Beispiel #2
0
unsigned short URI::getPort() const
{
	if (_port == 0)
		return getWellKnownPort();
	else
		return _port;
}
Beispiel #3
0
URI::URI(const std::string& scheme, const std::string& pathEtc):
	_scheme(scheme),
	_port(0)
{
	toLowerInPlace(_scheme);
	_port = getWellKnownPort();
	std::string::const_iterator beg = pathEtc.begin();
	std::string::const_iterator end = pathEtc.end();
	parsePathEtc(beg, end);
}
Beispiel #4
0
bool URI::isWellKnownPort() const
{
	return _port == getWellKnownPort();
}