blob: 415bc73a27067dfe97eb4729595dfda2e89700b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
From 02a8d3deb4f97046da4a0bb79abf9510d2d1c0a2 Mon Sep 17 00:00:00 2001
From: David Faure <faure@kde.org>
Date: Wed, 23 Oct 2019 09:29:55 +0200
Subject: kio_http: avoid double Content-Type and Depth when used by KDAV
Summary: This makes libkdav 19.08 work again after commit 9713ea02e49eda.
Test Plan: syncing a CALDAV calendar in korganizer no longer fails
Reviewers: vkrause
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D24880
---
src/ioslaves/http/http.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/ioslaves/http/http.cpp b/src/ioslaves/http/http.cpp
index e3bad6c..11dd7af 100644
--- src/ioslaves/http/http.cpp
+++ src/ioslaves/http/http.cpp
@@ -172,7 +172,8 @@ static QString sanitizeCustomHTTPHeader(const QString &_header)
if (!header.contains(QLatin1Char(':')) ||
header.startsWith(QLatin1String("host"), Qt::CaseInsensitive) ||
header.startsWith(QLatin1String("proxy-authorization"), Qt::CaseInsensitive) ||
- header.startsWith(QLatin1String("via"), Qt::CaseInsensitive)) {
+ header.startsWith(QLatin1String("via"), Qt::CaseInsensitive) ||
+ header.startsWith(QLatin1String("depth"), Qt::CaseInsensitive)) {
continue;
}
@@ -2599,7 +2600,7 @@ bool HTTPProtocol::sendQuery()
davHeader += metaData(QStringLiteral("davHeader"));
// Set content type of webdav data
- if (hasDavData) {
+ if (hasDavData && !header.contains(QLatin1String("Content-Type: "))) {
davHeader += QStringLiteral("Content-Type: text/xml; charset=utf-8\r\n");
}
--
cgit v1.1
|