mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kio: fake bytes range support for KHTTP
as the RFC says - the server (KHTTP in this case) can ignore range requests, tested with curl and wget and both will not get a range transfer but the request will not fail because the server does not support ranges Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
3bbbe4f382
commit
de4204d82c
1 changed files with 2 additions and 2 deletions
|
@ -278,9 +278,9 @@ static KHTTPHeaders HTTPHeaders(const QString &serverid, const bool authenticate
|
||||||
// optional for anything but 405, see:
|
// optional for anything but 405, see:
|
||||||
// https://www.rfc-editor.org/rfc/rfc9110.html#section-10.2.1
|
// https://www.rfc-editor.org/rfc/rfc9110.html#section-10.2.1
|
||||||
khttpheaders.insert("Allow", "GET, HEAD");
|
khttpheaders.insert("Allow", "GET, HEAD");
|
||||||
// optional, see:
|
// optional (the range request can be ignored), see:
|
||||||
// https://www.rfc-editor.org/rfc/rfc9110.html#section-14.3
|
// https://www.rfc-editor.org/rfc/rfc9110.html#section-14.3
|
||||||
khttpheaders.insert("Accept-Ranges", "none");
|
khttpheaders.insert("Accept-Ranges", "bytes");
|
||||||
// TODO: maybe implement persistent connections
|
// TODO: maybe implement persistent connections
|
||||||
khttpheaders.insert("Connection", "close");
|
khttpheaders.insert("Connection", "close");
|
||||||
if (authenticate) {
|
if (authenticate) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue