Esempio n. 1
0
File: URI.cpp Progetto: 12307/poco
void URI::setScheme(const std::string& scheme)
{
	_scheme = scheme;
	toLowerInPlace(_scheme);
	if (_port == 0)
		_port = getWellKnownPort();
}
Esempio n. 2
0
unsigned short URI::getPort() const
{
	if (_port == 0)
		return getWellKnownPort();
	else
		return _port;
}
Esempio n. 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);
}
Esempio n. 4
0
bool URI::isWellKnownPort() const
{
	return _port == getWellKnownPort();
}