File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 2525#include < cmath>
2626#include < cstring>
2727
28+ using namespace Qt ::StringLiterals;
29+
2830namespace OCC {
2931
3032constexpr auto relativeUploadsPath = " remote.php/dav/uploads/" ;
@@ -80,9 +82,9 @@ QUrl PropagateUploadFileNG::chunkUrl(const int chunk) const
8082QByteArray PropagateUploadFileNG::destinationHeader () const
8183{
8284 const auto davUrl = Utility::trailingSlashPath (propagator ()->account ()->davUrl ().toString ());
83- const auto remotePath = Utility::noLeadingSlashPath (propagator ()->fullRemotePath (_fileToUpload._file ));
85+ const auto remotePath = QUrl::toPercentEncoding ( Utility::noLeadingSlashPath (propagator ()->fullRemotePath (_fileToUpload._file )), " / " _ba );
8486 const auto destination = QString (davUrl + remotePath);
85- return QUrl::toPercentEncoding ( destination, " / " );
87+ return destination. toUtf8 ( );
8688}
8789
8890void PropagateUploadFileNG::doStartUpload ()
Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ private slots:
151151 QVERIFY (destinationHeader.contains (" SQ-0.5%25BF-150" ));
152152 QVERIFY (destinationHeader.contains (" /A/SQ-0.5%25BF-150/" ));
153153 QVERIFY (!destinationHeader.contains (" %2F" ));
154+ QVERIFY (destinationHeader.startsWith (" http://" ));
154155 }
155156
156157 // Test resuming when there's a confusing chunk added
You can’t perform that action at this time.
0 commit comments