From beffabe167307ba03e06ae87bc8959f683285a60 Mon Sep 17 00:00:00 2001 From: ArsenArsen Date: Thu, 13 Jul 2017 17:29:29 +0200 Subject: [PATCH] Fix headers in multipart --- AppVeyor/make_installer.sh | 1 - README.md | 2 ++ install.sh | 2 +- io/ioutils.cpp | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/AppVeyor/make_installer.sh b/AppVeyor/make_installer.sh index 32dbb65..61e5ad4 100644 --- a/AppVeyor/make_installer.sh +++ b/AppVeyor/make_installer.sh @@ -32,7 +32,6 @@ addFile /c/Qt/5.9/mingw53_32/bin/Qt5Network.dll addFile /c/Qt/5.9/mingw53_32/bin/Qt5Gui.dll addFile /c/Qt/5.9/mingw53_32/bin/Qt5Widgets.dll addFile /c/Qt/5.9/mingw53_32/bin/Qt5WinExtras.dll -addFile /c/Qt/5.9/mingw53_32/bin/Qt5Network.dll addFileIn /c/Qt/5.9/mingw53_32/plugins/platforms/qwindows.dll platforms diff --git a/README.md b/README.md index 0cb5725..6cd9215 100644 --- a/README.md +++ b/README.md @@ -50,4 +50,6 @@ make On systems with FFMpeg pre-3.1 you need to apply `OlderSystemFix.patch` to `recording/encoders/encoder.cpp`. On systems with Qt pre-5.7 you need to install the Qt version from their website. You can attempt to `curl https://raw.githubusercontent.com/ArsenArsen/KShare/master/install.sh | bash` + +You can find more details [here](https://blog.arsenarsen.com/posts/compiling-kshare-on-linux-mac-os-x-and-windows-final-revision) ###### Started on 19th of April 2017 to bring some attention and improvement to Linux screenshotting. diff --git a/install.sh b/install.sh index c324471..161f30a 100755 --- a/install.sh +++ b/install.sh @@ -16,7 +16,7 @@ installIfNeeded pkg-config installIfNeeded git resultfile="$(pwd)/KShare/build/KShare.app/" elif [[ "$uname" = "Linux" ]]; then -echo "Please install Qt5 SDK, qmake, ffmpeg development files, git, and pkgcondig" +echo "Please install Qt5 SDK, qmake, ffmpeg development files, git, and pkgconfig" bash resultfile="$(pwd)/KShare/build/KShare" else echo "Unsupported OS!" && exit 1; fi diff --git a/io/ioutils.cpp b/io/ioutils.cpp index c66bbc8..447fcb9 100644 --- a/io/ioutils.cpp +++ b/io/ioutils.cpp @@ -28,7 +28,7 @@ void ioutils::postMultipartData(QUrl target, std::function callback) { QNetworkRequest req(target); for (auto header : headers) { - req.setRawHeader(header.first.toUtf8(), header.second.toUtf8()); + if (header.first.toLower() != "content-type") req.setRawHeader(header.first.toUtf8(), header.second.toUtf8()); } QNetworkReply *reply = networkManager.post(req, body); QObject::connect(reply, &QNetworkReply::finished, [reply, callback] {