Skip to content

Accept HTTP status 307 as a redirect

Jonathan Marten requested to merge marten/libkgapi:master into master

Google appears to return this code when downloading a Drive document. It is not being interpreted as a redirect and so the download fails with an unknown error.

Abbreviated and redacted log:

kio_http HTTPProtocol::readResponseHeader: ============ Received Status Response:
kio_http HTTPProtocol::readResponseHeader: "HTTP/1.1 307 Temporary Redirect"
kio_http HTTPProtocol::readResponseHeader: -- full response:
"HTTP/1.1 307 Temporary Redirect\r\nLocation: https://doc-0k-90-docstext.googleusercontent.com/XXXXXX" kio_http/kf5.kio.kio_http HTTPProtocol::readResponseHeader: Re-directing from QUrl("https://docs.google.com/XXXXXX") to QUrl("https://doc-0k-90-docstext.googleusercontent.com/XXXXXX")
kio_gdrive KGAPI2::Job::Private::_k_replyReceived: Received reply from QUrl("https://docs.google.com/XXXXXX")
kio_gdrive KGAPI2::Job::Private::_k_replyReceived: Status code: 307
kio_gdrive KGAPI2::Job::Private::_k_replyReceived: Unknown error 307
kio_gdrive KIOGDrive::handleError: Completed job KGAPI2::Drive::FileFetchContentJob(0x7ffe478bfdc0) error code: 1 - message: "Unknown error.\n\nGoogle replied ''"
kioclient ClientApp::slotResult: "Unknown error.\n\nGoogle replied ''"

Merge request reports

Loading