HTTP/2 - fix header processing
httpReply->setHeaderField does not simply append (name|value) pairs, it first erases all entries with the same name. This is quite wrong when we have _several_ 'Set-Cookie' headers, for example. Found while trying to login into a facebook account :) Task-number: QTBUG-64359 Change-Id: I51416ca3ba3d92b9414e4649e493d9cd88f6d9a0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>bb10
parent
7465329fe1
commit
7c334301bd
|
|
@ -1069,7 +1069,7 @@ void QHttp2ProtocolHandler::updateStream(Stream &stream, const HPack::HttpHeader
|
|||
QByteArray binder(", ");
|
||||
if (name == "set-cookie")
|
||||
binder = "\n";
|
||||
httpReply->setHeaderField(name, value.replace('\0', binder));
|
||||
httpReplyPrivate->fields.append(qMakePair(name, value.replace('\0', binder)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue