mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-29 09:16:29 -05: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) {
|
||||
if ( itcpSocket ) {
|
||||
if ( itcpSocket )
|
||||
itcpSocket->write(data);
|
||||
}
|
||||
|
||||
else if ( ilocalSocket )
|
||||
ilocalSocket->write(data);
|
||||
|
@ -82,12 +82,11 @@ void
|
||||
QHttpRequestPrivate::prepareHeadersToWrite() {
|
||||
|
||||
if ( !iheaders.contains("host") ) {
|
||||
quint16 port = iurl.port();
|
||||
if ( port == 0 )
|
||||
port = 80;
|
||||
|
||||
QString portStr = ( -1 != iurl.port() ) ?
|
||||
QString(":%1").arg(iurl.port()) : "";
|
||||
|
||||
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