mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Fix Host header always having port 65535 when URI does not contain explicit port
This commit is contained in:
parent
9d5d3081dc
commit
a0ebbf997d
@ -93,9 +93,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void writeRaw(const QByteArray& data) {
|
void writeRaw(const QByteArray& data) {
|
||||||
if ( itcpSocket ) {
|
if ( itcpSocket )
|
||||||
itcpSocket->write(data);
|
itcpSocket->write(data);
|
||||||
}
|
|
||||||
|
|
||||||
else if ( ilocalSocket )
|
else if ( ilocalSocket )
|
||||||
ilocalSocket->write(data);
|
ilocalSocket->write(data);
|
||||||
|
@ -82,12 +82,11 @@ void
|
|||||||
QHttpRequestPrivate::prepareHeadersToWrite() {
|
QHttpRequestPrivate::prepareHeadersToWrite() {
|
||||||
|
|
||||||
if ( !iheaders.contains("host") ) {
|
if ( !iheaders.contains("host") ) {
|
||||||
quint16 port = iurl.port();
|
QString portStr = ( -1 != iurl.port() ) ?
|
||||||
if ( port == 0 )
|
QString(":%1").arg(iurl.port()) : "";
|
||||||
port = 80;
|
|
||||||
|
|
||||||
iheaders.insert("host",
|
iheaders.insert("host",
|
||||||
QString("%1:%2").arg(iurl.host()).arg(port).toLatin1()
|
QString("%1%2").arg(iurl.host()).arg(portStr).toLatin1()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user