示例#1
0
void RequestParser::httpResponse(QHttpResponseHeader header, QByteArray content)
{
	m_responseHttpVersion = header.majorVersion() + header.minorVersion() / 10.0;
	emit write(header.toString().toUtf8());
	emit write(content);
}
示例#2
0
void RequestParser::httpResponseHead(QHttpResponseHeader header)
{
	m_responseHttpVersion = header.majorVersion() + header.minorVersion() / 10.0;
	emit write(header.toString().toUtf8());
}
示例#3
0
/*!
 * \reimp
 */
void QxtHttpServerConnector::writeHeaders(QIODevice* device, const QHttpResponseHeader& header)
{
    if (header.majorVersion() == 0) return; // 0.9 doesn't have headers
    device->write(header.toString().toUtf8());
}