mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22:48 +00:00
kio: set variables to valid range when the requested range is not valid in KHTTP
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
8364192b45
commit
70e1615510
1 changed files with 3 additions and 1 deletions
|
@ -608,7 +608,7 @@ void KHTTPPrivate::slotNewConnection()
|
|||
|
||||
const qint64 httpfilesize = httpfile->size();
|
||||
qint64 httprangesize = httpfilesize;
|
||||
const quint64 httprangestart = khttpheadersparser.rangeStart();
|
||||
quint64 httprangestart = khttpheadersparser.rangeStart();
|
||||
quint64 httprangeend = khttpheadersparser.rangeEnd();
|
||||
if (httprangestart != 0 || httprangeend != 0) {
|
||||
bool httprangevalid = true;
|
||||
|
@ -619,6 +619,8 @@ void KHTTPPrivate::slotNewConnection()
|
|||
kDebug(s_khttpdebugarea) << "ranged request" << responsefilepath << httprangestart << httprangeend;
|
||||
if (httprangestart > httpfilesize || httprangeend > httpfilesize) {
|
||||
httprangevalid = false;
|
||||
httprangestart = 0;
|
||||
httprangesize = httpfilesize;
|
||||
}
|
||||
// if valid change status and insert required headers for a ranged request, otherwise
|
||||
// just ignore the range request
|
||||
|
|
Loading…
Add table
Reference in a new issue