From 023ebf17898db4bca63129f079fd90b5cf76c1a9 Mon Sep 17 00:00:00 2001
From: Michael Stahl
Date: Tue, 14 Dec 2021 16:44:14 +0100
Subject: ucb: remove --with-webdav=neon
Remove code in ucb/source/ucp/webdav-neon, and now unused external
neon.
The --with-webdav=no option is retained for now.
Change-Id: I4ce429587e3991fa82009da2f8e4a068abe36435
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126839
Tested-by: Jenkins
Reviewed-by: Michael Stahl
---
Makefile.fetch | 1 -
RepositoryExternal.mk | 40 -
compilerplugins/clang/stringstatic.cxx | 3 -
compilerplugins/clang/toolslong.cxx | 3 +-
compilerplugins/clang/unusedvariableplus.cxx | 3 -
config_host.mk.in | 4 -
configure.ac | 18 +-
distro-configs/LibreOfficeFlatpak.conf | 1 -
distro-configs/LibreOfficeOpenBSD.conf | 1 -
download.lst | 2 -
external/Module_external.mk | 1 -
external/neon/Library_neon.mk | 100 -
external/neon/Makefile | 7 -
external/neon/Module_neon.mk | 17 -
external/neon/README | 1 -
external/neon/UnpackedTarball_neon.mk | 27 -
external/neon/configs/config.h | 603 ---
external/neon/neon.def | 292 --
external/neon/neon.patch | 311 --
external/neon/neon_fix_lock_token_on_if.patch | 12 -
external/neon/neon_fix_no_OPENSSL_Applink.patch | 11 -
external/neon/neon_with_gnutls.patch | 29 -
readlicense_oo/license/license.xml | 14 -
solenv/clang-format/excludelist | 50 -
ucb/IwyuFilter_ucb.yaml | 67 -
ucb/Library_ucpdav1.mk | 46 -
ucb/README.md | 5 -
ucb/source/ucp/webdav-neon/ContentProperties.cxx | 558 ---
ucb/source/ucp/webdav-neon/ContentProperties.hxx | 183 -
ucb/source/ucp/webdav-neon/DAVAuthListener.hxx | 50 -
ucb/source/ucp/webdav-neon/DAVAuthListenerImpl.hxx | 69 -
ucb/source/ucp/webdav-neon/DAVException.hxx | 174 -
ucb/source/ucp/webdav-neon/DAVProperties.cxx | 193 -
ucb/source/ucp/webdav-neon/DAVProperties.hxx | 69 -
.../ucp/webdav-neon/DAVRequestEnvironment.hxx | 64 -
ucb/source/ucp/webdav-neon/DAVResource.hxx | 70 -
ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx | 1192 ------
ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx | 231 --
ucb/source/ucp/webdav-neon/DAVSession.hxx | 213 -
ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx | 99 -
ucb/source/ucp/webdav-neon/DAVSessionFactory.hxx | 85 -
ucb/source/ucp/webdav-neon/DAVTypes.cxx | 189 -
ucb/source/ucp/webdav-neon/DAVTypes.hxx | 208 -
ucb/source/ucp/webdav-neon/DateTimeHelper.cxx | 247 --
ucb/source/ucp/webdav-neon/DateTimeHelper.hxx | 61 -
ucb/source/ucp/webdav-neon/LinkSequence.cxx | 214 -
ucb/source/ucp/webdav-neon/LinkSequence.hxx | 49 -
ucb/source/ucp/webdav-neon/LockEntrySequence.cxx | 246 --
ucb/source/ucp/webdav-neon/LockEntrySequence.hxx | 45 -
ucb/source/ucp/webdav-neon/LockSequence.cxx | 360 --
ucb/source/ucp/webdav-neon/LockSequence.hxx | 48 -
ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx | 139 -
ucb/source/ucp/webdav-neon/NeonHeadRequest.hxx | 53 -
ucb/source/ucp/webdav-neon/NeonInputStream.cxx | 136 -
ucb/source/ucp/webdav-neon/NeonInputStream.hxx | 95 -
ucb/source/ucp/webdav-neon/NeonLockStore.cxx | 241 --
ucb/source/ucp/webdav-neon/NeonLockStore.hxx | 97 -
ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx | 320 --
ucb/source/ucp/webdav-neon/NeonPropFindRequest.hxx | 63 -
ucb/source/ucp/webdav-neon/NeonSession.cxx | 2359 -----------
ucb/source/ucp/webdav-neon/NeonSession.hxx | 285 --
ucb/source/ucp/webdav-neon/NeonTypes.hxx | 54 -
ucb/source/ucp/webdav-neon/NeonUri.cxx | 291 --
ucb/source/ucp/webdav-neon/NeonUri.hxx | 103 -
ucb/source/ucp/webdav-neon/PropertyMap.hxx | 65 -
ucb/source/ucp/webdav-neon/PropfindCache.cxx | 86 -
ucb/source/ucp/webdav-neon/PropfindCache.hxx | 77 -
.../ucp/webdav-neon/UCBDeadPropertyValue.cxx | 509 ---
.../ucp/webdav-neon/UCBDeadPropertyValue.hxx | 50 -
ucb/source/ucp/webdav-neon/ucpdav1.component | 35 -
ucb/source/ucp/webdav-neon/webdavcontent.cxx | 4197 --------------------
ucb/source/ucp/webdav-neon/webdavcontent.hxx | 317 --
ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx | 646 ---
ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx | 487 ---
ucb/source/ucp/webdav-neon/webdavdatasupplier.hxx | 78 -
ucb/source/ucp/webdav-neon/webdavprovider.cxx | 189 -
ucb/source/ucp/webdav-neon/webdavprovider.hxx | 105 -
ucb/source/ucp/webdav-neon/webdavresultset.cxx | 86 -
ucb/source/ucp/webdav-neon/webdavresultset.hxx | 57 -
79 files changed, 3 insertions(+), 17803 deletions(-)
delete mode 100644 external/neon/Library_neon.mk
delete mode 100644 external/neon/Makefile
delete mode 100644 external/neon/Module_neon.mk
delete mode 100644 external/neon/README
delete mode 100644 external/neon/UnpackedTarball_neon.mk
delete mode 100644 external/neon/configs/config.h
delete mode 100644 external/neon/neon.def
delete mode 100644 external/neon/neon.patch
delete mode 100644 external/neon/neon_fix_lock_token_on_if.patch
delete mode 100644 external/neon/neon_fix_no_OPENSSL_Applink.patch
delete mode 100644 external/neon/neon_with_gnutls.patch
delete mode 100644 ucb/source/ucp/webdav-neon/ContentProperties.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/ContentProperties.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/DAVAuthListener.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/DAVAuthListenerImpl.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/DAVException.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/DAVProperties.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/DAVProperties.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/DAVRequestEnvironment.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/DAVResource.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/DAVSession.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/DAVSessionFactory.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/DAVTypes.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/DAVTypes.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/DateTimeHelper.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/DateTimeHelper.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/LinkSequence.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/LinkSequence.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/LockEntrySequence.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/LockEntrySequence.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/LockSequence.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/LockSequence.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/NeonHeadRequest.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/NeonInputStream.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/NeonInputStream.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/NeonLockStore.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/NeonLockStore.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/NeonPropFindRequest.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/NeonSession.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/NeonSession.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/NeonTypes.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/NeonUri.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/NeonUri.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/PropertyMap.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/PropfindCache.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/PropfindCache.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/ucpdav1.component
delete mode 100644 ucb/source/ucp/webdav-neon/webdavcontent.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/webdavcontent.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/webdavdatasupplier.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/webdavprovider.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/webdavprovider.hxx
delete mode 100644 ucb/source/ucp/webdav-neon/webdavresultset.cxx
delete mode 100644 ucb/source/ucp/webdav-neon/webdavresultset.hxx
diff --git a/Makefile.fetch b/Makefile.fetch
index ba8e58d5f4be..b988fbf7e717 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -192,7 +192,6 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S
$(call fetch_Optional,MSPUB,MSPUB_TARBALL) \
$(call fetch_Optional,MWAW,MWAW_TARBALL) \
$(call fetch_Optional,MYTHES,MYTHES_TARBALL) \
- $(call fetch_Optional,NEON,NEON_TARBALL) \
$(call fetch_Optional,NSS,NSS_TARBALL) \
$(call fetch_Optional_pack,NUMBERTEXT_EXTENSION_PACK) \
$(call fetch_Optional,ODFGEN,ODFGEN_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index dbe4d8e28ba4..5569aa0f1027 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1080,46 +1080,6 @@ endef
endif # SYSTEM_LIBLANGTAG
-ifeq ($(WITH_WEBDAV),neon)
-
-ifneq ($(SYSTEM_NEON),)
-
-define gb_LinkTarget__use_neon
-$(call gb_LinkTarget_add_defs,$(1),\
- -DNEON_VERSION=0x$(NEON_VERSION) \
- -DSYSTEM_NEON \
-)
-$(call gb_LinkTarget_set_include,$(1),\
- $$(INCLUDE) \
- $(NEON_CFLAGS) \
-)
-
-$(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
-
-endef
-
-else # !SYSTEM_NEON
-
-$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
- neon \
-))
-
-define gb_LinkTarget__use_neon
-$(call gb_LinkTarget_use_unpacked,$(1),neon)
-$(call gb_LinkTarget_set_include,$(1),\
- -I$(call gb_UnpackedTarball_get_dir,neon/src) \
- $$(INCLUDE) \
-)
-$(call gb_LinkTarget_use_libraries,$(1),\
- neon \
-)
-
-endef
-
-endif # SYSTEM_NEON
-
-endif # WITH_WEBDAV
-
ifneq ($(SYSTEM_REDLAND),)
define gb_LinkTarget__use_librdf
diff --git a/compilerplugins/clang/stringstatic.cxx b/compilerplugins/clang/stringstatic.cxx
index 364bc566aa97..a6b5b7d2e8fe 100644
--- a/compilerplugins/clang/stringstatic.cxx
+++ b/compilerplugins/clang/stringstatic.cxx
@@ -58,9 +58,6 @@ bool StringStatic::preRun()
// passing around pointers to global OUString
if (loplugin::hasPathnamePrefix(fn, SRCDIR "/filter/source/svg/"))
return false;
- // has a mix of literals and refs to external OUStrings
- if (loplugin::isSamePathname(fn, SRCDIR "/ucb/source/ucp/webdav-neon/ContentProperties.cxx"))
- return false;
return true;
}
diff --git a/compilerplugins/clang/toolslong.cxx b/compilerplugins/clang/toolslong.cxx
index 9a762c99af76..38beb8ed19b0 100644
--- a/compilerplugins/clang/toolslong.cxx
+++ b/compilerplugins/clang/toolslong.cxx
@@ -156,8 +156,7 @@ void ToolsLong::run()
|| loplugin::isSamePathname(fn, SRCDIR
"/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx")
|| loplugin::isSamePathname(fn, SRCDIR "/shell/source/win32/zipfile/zipfile.cxx")
- || loplugin::isSamePathname(fn, SRCDIR "/ucb/source/ucp/webdav-curl/CurlSession.cxx")
- || loplugin::isSamePathname(fn, SRCDIR "/ucb/source/ucp/webdav-neon/NeonSession.cxx"))
+ || loplugin::isSamePathname(fn, SRCDIR "/ucb/source/ucp/webdav-curl/CurlSession.cxx"))
return;
// these are places where the external API is actually "long"
if (loplugin::isSamePathname(fn, SRCDIR "/vcl/source/filter/jpeg/JpegReader.cxx"))
diff --git a/compilerplugins/clang/unusedvariableplus.cxx b/compilerplugins/clang/unusedvariableplus.cxx
index b5c92082c400..845a4eedb2a7 100644
--- a/compilerplugins/clang/unusedvariableplus.cxx
+++ b/compilerplugins/clang/unusedvariableplus.cxx
@@ -435,9 +435,6 @@ public:
"VersionCompatRead",
"VersionCompatWrite",
"SlideShowImpl::WaitSymbolLock",
- "webdav_ucp::NeonHeadRequest",
- "webdav_ucp::NeonPropFindRequest",
- "webdav_ucp::NeonUri",
"weld::WaitObject",
"writerfilter::ooxml::(anonymous namespace)::StatusIndicatorGuard",
"WriterSpecificAutoFormatBlock",
diff --git a/config_host.mk.in b/config_host.mk.in
index 3ad4b010ef48..2717ef888d13 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -455,9 +455,6 @@ export MYTHES_CFLAGS=$(gb_SPACE)@MYTHES_CFLAGS@
export MYTHES_LIBS=$(gb_SPACE)@MYTHES_LIBS@
export NASM=@NASM@
export NAFLAGS=@NAFLAGS@
-export NEON_CFLAGS=$(gb_SPACE)@NEON_CFLAGS@
-export NEON_LIBS=$(gb_SPACE)@NEON_LIBS@
-export NEON_VERSION=@NEON_VERSION@
export NM=@NM@
export NSS_CFLAGS=$(gb_SPACE)@NSS_CFLAGS@
export NSS_LIBS=$(gb_SPACE)@NSS_LIBS@
@@ -633,7 +630,6 @@ export SYSTEM_MARIADB_CONNECTOR_C=@SYSTEM_MARIADB_CONNECTOR_C@
export SYSTEM_MSPUB=@SYSTEM_MSPUB@
export SYSTEM_MWAW=@SYSTEM_MWAW@
export SYSTEM_MYTHES=@SYSTEM_MYTHES@
-export SYSTEM_NEON=@SYSTEM_NEON@
export SYSTEM_NSS=@SYSTEM_NSS@
export SYSTEM_ODBC_HEADERS=@SYSTEM_ODBC_HEADERS@
export SYSTEM_ODFGEN=@SYSTEM_ODFGEN@
diff --git a/configure.ac b/configure.ac
index c259558abc87..12e90717037f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2070,7 +2070,7 @@ AC_ARG_WITH(tls,
AS_HELP_STRING([--with-tls],
[Decides which TLS/SSL and cryptographic implementations to use for
LibreOffice's code. Notice that this doesn't apply for depending
- libraries like "neon", for example. Default is to use NSS
+ libraries like "curl", for example. Default is to use NSS
although OpenSSL is also possible. Notice that selecting NSS restricts
the usage of OpenSSL in LO's code but selecting OpenSSL doesn't
restrict by now the usage of NSS in LO's code. Possible values:
@@ -2429,7 +2429,7 @@ AC_ARG_WITH(system-lockfile,
AC_ARG_WITH(webdav,
AS_HELP_STRING([--with-webdav],
[Specify which library to use for webdav implementation.
- Possible values: "neon", "curl", "no". The default value is "neon".
+ Possible values: "curl", "no". The default value is "curl".
Example: --with-webdav="curl"]))
AC_ARG_WITH(linker-hash-style,
@@ -10848,17 +10848,6 @@ curl)
AC_MSG_ERROR(["--with-webdav=curl conflicts with --disable-curl"])
fi
;;
-neon)
- AC_MSG_RESULT([neon])
- # Check for system neon
- libo_CHECK_SYSTEM_MODULE([neon],[NEON],[neon >= 0.31.2])
- if test "$with_system_neon" = "yes"; then
- NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
- else
- NEON_VERSION=0312
- fi
- AC_SUBST(NEON_VERSION)
- ;;
*)
AC_MSG_RESULT([none, disabled])
WITH_WEBDAV=""
@@ -14337,9 +14326,6 @@ if test "$enable_mpl_subset" = "yes"; then
if test "$enable_lotuswordpro" = "yes"; then
AC_MSG_ERROR([need to --disable-lotuswordpro - a Lotus Word Pro file format import filter.])
fi
- if test "$WITH_WEBDAV" = "neon"; then
- AC_MSG_ERROR([need --with-webdav=curl or --without-webdav - webdav support.])
- fi
if test -n "$ENABLE_POPPLER"; then
if test "x$SYSTEM_POPPLER" = "x"; then
AC_MSG_ERROR([need to disable PDF import via poppler or use system library])
diff --git a/distro-configs/LibreOfficeFlatpak.conf b/distro-configs/LibreOfficeFlatpak.conf
index 438252c6c408..beb3353c6aec 100644
--- a/distro-configs/LibreOfficeFlatpak.conf
+++ b/distro-configs/LibreOfficeFlatpak.conf
@@ -51,7 +51,6 @@
--without-system-lpsolve
--without-system-mariadb
--without-system-mdds
---without-system-neon
--without-system-odbc
--without-system-openldap
--without-system-orcus
diff --git a/distro-configs/LibreOfficeOpenBSD.conf b/distro-configs/LibreOfficeOpenBSD.conf
index 241b0153b605..2af93a64202a 100644
--- a/distro-configs/LibreOfficeOpenBSD.conf
+++ b/distro-configs/LibreOfficeOpenBSD.conf
@@ -22,7 +22,6 @@
--with-system-jars
--with-system-jpeg
--with-system-libxml
---with-system-neon
--with-system-openssl
--with-system-poppler
--with-system-redland
diff --git a/download.lst b/download.lst
index 0288736795ac..3d5f8917b286 100644
--- a/download.lst
+++ b/download.lst
@@ -185,8 +185,6 @@ export MWAW_VERSION_MICRO := 21
export MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.xz
export MYTHES_SHA256SUM := 1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b0e0790a305f
export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
-export NEON_SHA256SUM := cf1ee3ac27a215814a9c80803fcee4f0ede8466ebead40267a9bd115e16a8678
-export NEON_TARBALL := neon-0.31.2.tar.gz
export NSS_SHA256SUM := 07a9e5b70f121a62706140d4cacc3006d3efb869da40f3a2bf7a65d37847f4d9
export NSS_TARBALL := nss-3.73-with-nspr-4.32.tar.gz
export ODFGEN_SHA256SUM := 55200027fd46623b9bdddd38d275e7452d1b0ff8aeddcad6f9ae6dc25f610625
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 121be4f8e106..66759274caa8 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -75,7 +75,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,MSPUB,libmspub) \
$(call gb_Helper_optional,MWAW,libmwaw) \
$(call gb_Helper_optional,MYTHES,mythes) \
- $(call gb_Helper_optional,NEON,neon) \
$(call gb_Helper_optional,NSS,nss) \
$(call gb_Helper_optional,ODFGEN,libodfgen) \
$(call gb_Helper_optional,OPENLDAP,openldap) \
diff --git a/external/neon/Library_neon.mk b/external/neon/Library_neon.mk
deleted file mode 100644
index 4a0e069b39fa..000000000000
--- a/external/neon/Library_neon.mk
+++ /dev/null
@@ -1,100 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Library_Library,neon))
-
-$(eval $(call gb_Library_use_unpacked,neon,neon))
-
-$(eval $(call gb_Library_use_externals,neon,\
- gnutls \
- libxml2 \
- libgcrypt \
- openssl \
- openssl_headers \
- zlib \
-))
-
-$(eval $(call gb_Library_set_visibility_default,neon))
-
-$(eval $(call gb_Library_set_warnings_disabled,neon))
-
-$(eval $(call gb_Library_add_generated_cobjects,neon,\
- UnpackedTarball/neon/src/ne_207 \
- UnpackedTarball/neon/src/ne_acl3744 \
- UnpackedTarball/neon/src/ne_alloc \
- UnpackedTarball/neon/src/ne_auth \
- UnpackedTarball/neon/src/ne_basic \
- UnpackedTarball/neon/src/ne_compress \
- UnpackedTarball/neon/src/ne_dates \
- UnpackedTarball/neon/src/ne_i18n \
- UnpackedTarball/neon/src/ne_locks \
- UnpackedTarball/neon/src/ne_md5 \
- UnpackedTarball/neon/src/ne_props \
- UnpackedTarball/neon/src/ne_redirect \
- UnpackedTarball/neon/src/ne_request \
- UnpackedTarball/neon/src/ne_session \
- UnpackedTarball/neon/src/ne_socket \
- UnpackedTarball/neon/src/ne_socks \
- UnpackedTarball/neon/src/ne_string \
- UnpackedTarball/neon/src/ne_uri \
- UnpackedTarball/neon/src/ne_utils \
- UnpackedTarball/neon/src/ne_xml \
- UnpackedTarball/neon/src/ne_xmlreq \
-))
-
-
-ifeq ($(ENABLE_OPENSSL),TRUE)
-$(eval $(call gb_Library_add_generated_cobjects,neon,\
- UnpackedTarball/neon/src/ne_openssl \
-))
-else
-$(eval $(call gb_Library_add_generated_cobjects,neon,\
- UnpackedTarball/neon/src/ne_gnutls \
-))
-endif
-
-
-ifeq ($(OS),WNT)
-$(eval $(call gb_Library_use_system_win32_libs,neon,\
- ws2_32 \
- crypt32 \
-))
-
-ifeq ($(COM),MSC)
-$(eval $(call gb_Library_add_ldflags,neon,\
- /DEF:$(SRCDIR)/external/neon/neon.def \
-))
-endif
-
-$(eval $(call gb_Library_add_generated_cobjects,neon,\
- UnpackedTarball/neon/src/ne_sspi \
-))
-
-else
-ifeq ($(ENABLE_OPENSSL),TRUE)
-$(eval $(call gb_Library_add_generated_cobjects,neon,\
- UnpackedTarball/neon/src/ne_ntlm \
-))
-endif
-
-endif
-
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Library_add_libs,neon,\
- -ldl \
-))
-endif
-
-ifneq (,$(gb_ENABLE_DBGUTIL))
-$(eval $(call gb_Library_add_cflags,neon,\
- -DNE_DEBUGGING \
-))
-endif
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/neon/Makefile b/external/neon/Makefile
deleted file mode 100644
index e4968cf85fb6..000000000000
--- a/external/neon/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-
-module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
-
-include $(module_directory)/../../solenv/gbuild/partial_build.mk
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/neon/Module_neon.mk b/external/neon/Module_neon.mk
deleted file mode 100644
index cc2e0cb5e2a6..000000000000
--- a/external/neon/Module_neon.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Module_Module,neon))
-
-$(eval $(call gb_Module_add_targets,neon,\
- Library_neon \
- UnpackedTarball_neon \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/neon/README b/external/neon/README
deleted file mode 100644
index e983ae8223b5..000000000000
--- a/external/neon/README
+++ /dev/null
@@ -1 +0,0 @@
-Web library to help deal with WebDAV or other protocols, from [https://notroj.github.io/neon/].
diff --git a/external/neon/UnpackedTarball_neon.mk b/external/neon/UnpackedTarball_neon.mk
deleted file mode 100644
index 73cdd81f2e18..000000000000
--- a/external/neon/UnpackedTarball_neon.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_UnpackedTarball_UnpackedTarball,neon))
-
-$(eval $(call gb_UnpackedTarball_set_tarball,neon,$(NEON_TARBALL)))
-
-$(eval $(call gb_UnpackedTarball_add_files,neon,src,\
- external/neon/configs/config.h \
-))
-
-$(eval $(call gb_UnpackedTarball_set_patchlevel,neon,0))
-
-$(eval $(call gb_UnpackedTarball_add_patches,neon,\
- external/neon/neon.patch \
- external/neon/neon_with_gnutls.patch \
- external/neon/neon_fix_lock_token_on_if.patch \
- $(if $(filter WNT,$(OS)),external/neon/neon_fix_no_OPENSSL_Applink.patch) \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/neon/configs/config.h b/external/neon/configs/config.h
deleted file mode 100644
index 9ac5f6ce4c3f..000000000000
--- a/external/neon/configs/config.h
+++ /dev/null
@@ -1,603 +0,0 @@
-/* Contents kept in sync with config.h.in from neon 0.31.2 */
-
-/* Define if building universal (internal helper macro) */
-/* #undef AC_APPLE_UNIVERSAL_BUILD */
-
-/* Define to specific EGD socket path */
-/* #undef EGD_PATH */
-
-/* Define if EGD should be supported */
-/* #undef ENABLE_EGD */
-
-/* Define if GSS_C_NT_HOSTBASED_SERVICE is not defined otherwise */
-/* #undef GSS_C_NT_HOSTBASED_SERVICE */
-
-/* Define to 1 if you have the header file. */
-#ifdef UNX
-#define HAVE_ARPA_INET_H 1
-#endif
-
-/* Define to 1 if you have the `bind_textdomain_codeset' function. */
-/* #undef HAVE_BIND_TEXTDOMAIN_CODESET */
-
-/* Define to 1 if you have the `CRYPTO_set_idptr_callback' function. */
-/* #undef HAVE_CRYPTO_SET_IDPTR_CALLBACK */
-
-/* Define to 1 if you have the declaration of `h_errno', and to 0 if you
- don't. */
-#ifdef _WIN32
-#define HAVE_DECL_H_ERRNO 1
-#endif
-
-/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
- */
-#ifdef LINUX
-#define HAVE_DECL_STPCPY 1
-#endif
-
-/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
- don't. */
-#ifdef LINUX
-#define HAVE_DECL_STRERROR_R 1
-#endif
-
-/* Define to 1 if you have the header file. */
-#ifdef UNX
-#define HAVE_DLFCN_H 1
-#endif
-
-/* Define to 1 if you have the header file. */
-#define HAVE_ERRNO_H 1
-
-/* Define if you have expat */
-/* #undef HAVE_EXPAT */
-
-/* Define to 1 if you have the `fcntl' function. */
-#ifdef UNX
-#define HAVE_FCNTL 1
-#endif
-
-/* Define to 1 if you have the header file. */
-#ifdef UNX
-#define HAVE_FCNTL_H 1
-#endif
-
-/* Define to 1 if you have the `fstat64' function. */
-#define HAVE_FSTAT64
-
-/* Define to 1 if you have the `gai_strerror' function. */
-#define HAVE_GAI_STRERROR 1
-
-/* Define to 1 if you have the `gethostname' function. */
-/* #undef HAVE_GETHOSTNAME */
-
-/* Define to 1 if you have the `getnameinfo' function. */
-/* #undef HAVE_GETNAMEINFO */
-
-/* Define to 1 if you have the `getsockopt' function. */
-#ifdef UNX
-#define HAVE_GETSOCKOPT 1
-#endif
-
-#ifdef DISABLE_OPENSSL
-/* Define if GnuTLS support is enabled */
-#define HAVE_GNUTLS
-
-/* Define to 1 if you have the `gnutls_certificate_get_x509_cas' function. */
-/* #undef HAVE_GNUTLS_CERTIFICATE_GET_X509_CAS */
-
-/* Define to 1 if you have the `gnutls_certificate_verify_peers2' function. */
-#define HAVE_GNUTLS_CERTIFICATE_VERIFY_PEERS2
-
-/* Define to 1 if you have the `gnutls_session_get_data2' function. */
-#define HAVE_GNUTLS_SESSION_GET_DATA2
-
-/* Define to 1 if you have the `gnutls_sign_callback_set' function. */
-#define HAVE_GNUTLS_SIGN_CALLBACK_SET
-
-/* Define to 1 if you have the `gnutls_x509_dn_get_rdn_ava' function. */
-#define HAVE_GNUTLS_X509_DN_GET_RDN_AVA
-#endif /* DISABLE_OPENSSL */
-
-/* Define if GSSAPI support is enabled */
-/* #undef HAVE_GSSAPI */
-
-/* Define to 1 if you have the header file. */
-/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */
-
-/* Define to 1 if you have the header file. */
-/* #undef HAVE_GSSAPI_GSSAPI_H */
-
-/* Define to 1 if you have the header file. */
-/* #undef HAVE_GSSAPI_H */
-
-/* Define to 1 if you have the `gss_init_sec_context' function. */
-/* #undef HAVE_GSS_INIT_SEC_CONTEXT */
-
-/* Define to 1 if you have the `hstrerror' function. */
-/* #undef HAVE_HSTRERROR */
-
-/* Define to 1 if you have the `iconv' function. */
-/* #undef HAVE_ICONV */
-
-/* Define to 1 if you have the header file. */
-/* #undef HAVE_ICONV_H */
-
-/* Define to 1 if you have the `inet_ntop' function. */
-#ifdef UNX
-#define HAVE_INET_NTOP 1
-#endif
-
-/* Define to 1 if you have the `inet_pton' function. */
-/* #undef HAVE_INET_PTON */
-
-/* Define to 1 if you have the header file. */
-#ifdef UNX
-#define HAVE_INTTYPES_H 1
-#endif
-
-/* Define to 1 if you have the `isatty' function. */
-#define HAVE_ISATTY 1
-
-/* Define to 1 if you have the header file. */
-/* #undef HAVE_LIBINTL_H */
-
-/* Define if libproxy is supported */
-/* #undef HAVE_LIBPROXY */
-
-/* Define if you have libxml */
-#define HAVE_LIBXML 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_LIBXML_PARSER_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_LIBXML_XMLVERSION_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_LOCALE_H 1
-
-/* Define to 1 if you have the `lseek64' function. */
-#define HAVE_LSEEK64 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the header file. */
-#ifdef UNX
-#define HAVE_NETDB_H 1
-#endif
-
-/* Define to 1 if you have the header file. */
-#ifdef UNX
-#define HAVE_NETINET_IN_H 1
-#endif
-
-/* Define to 1 if you have the header file. */
-#ifdef UNX
-#define HAVE_NETINET_TCP_H 1
-#endif
-
-#ifndef DISABLE_OPENSSL
-/* Define if NTLM is supported */
-#ifndef _WIN32
-#define HAVE_NTLM 1
-#endif
-
-/* Define if OpenSSL support is enabled */
-#define HAVE_OPENSSL 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_OPENSSL_OPENSSLV_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_OPENSSL_SSL_H 1
-#endif /* !DISABLE_OPENSSL */
-
-/* Define if pakchois library supported */
-/* #undef HAVE_PAKCHOIS */
-
-/* Define to 1 if you have the `pipe' function. */
-#define HAVE_PIPE 1
-
-/* Define to 1 if you have the `poll' function. */
-#define HAVE_POLL 1
-
-/* Define to 1 if you have the `pthread_mutex_init' function. */
-/* #undef HAVE_PTHREAD_MUTEX_INIT */
-
-/* Define to 1 if you have the `pthread_mutex_lock' function. */
-/* #undef HAVE_PTHREAD_MUTEX_LOCK */
-
-/* Define to 1 if you have the `setlocale' function. */
-#define HAVE_SETLOCALE 1
-
-/* Define to 1 if you have the `setsockopt' function. */
-#if defined(LINUX) || defined(_WIN32)
-#define HAVE_SETSOCKOPT 1
-#endif
-
-/* Define to 1 if you have the `setvbuf' function. */
-#define HAVE_SETVBUF 1
-
-/* Define to 1 if you have the `shutdown' function. */
-#ifdef LINUX
-#define HAVE_SHUTDOWN 1
-#endif
-
-/* Define to 1 if you have the `signal' function. */
-#define HAVE_SIGNAL 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_SIGNAL_H 1
-
-/* Define to 1 if you have the `snprintf' function. */
-#if defined(UNX) || defined(_MSC_VER)
-#define HAVE_SNPRINTF 1
-#endif
-
-/* Define to 1 if the system has the type `socklen_t'. */
-#ifdef UNX
-#define HAVE_SOCKLEN_T 1
-#endif
-
-/* Define to 1 if you have the `SSL_SESSION_cmp' function. */
-/* #undef HAVE_SSL_SESSION_CMP */
-
-/* Define to 1 if you have the header file. */
-#define HAVE_STDARG_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `stpcpy' function. */
-#ifdef LINUX
-#define HAVE_STPCPY 1
-#endif
-
-/* Define to 1 if you have the `strcasecmp' function. */
-#ifdef UNX
-#define HAVE_STRCASECMP 1
-#endif
-
-#ifdef _WIN32
-#define strcasecmp strcmpi
-#endif
-
-/* Define to 1 if you have the `strerror_r' function. */
-#ifdef LINUX
-#define HAVE_STRERROR_R 1
-#endif
-
-/* Define to 1 if you have the header file. */
-#ifdef UNX
-#define HAVE_STRINGS_H 1
-#endif
-
-/* Define to 1 if you have the header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the `strtoll' function. */
-#define HAVE_STRTOLL 1
-
-/* Define to 1 if you have the `strtoq' function. */
-/* #undef HAVE_STRTOQ */
-
-/* Define to 1 if `tm_gmtoff' is member of `struct tm'. */
-#ifdef LINUX
-#define HAVE_STRUCT_TM_TM_GMTOFF 1
-#endif
-
-/* Define to 1 if `__tm_gmtoff' is member of `struct tm'. */
-/* #undef HAVE_STRUCT_TM___TM_GMTOFF */
-
-/* Define to 1 if you have the header file. */
-/* #undef HAVE_SYS_LIMITS_H */
-
-/* Define to 1 if you have the header file. */
-#ifdef UNX
-#define HAVE_SYS_POLL_H 1
-#endif
-
-/* Define to 1 if you have the header file. */
-#ifdef UNX
-#define HAVE_SYS_SELECT_H 1
-#endif
-
-/* Define to 1 if you have the header file. */
-#ifdef UNX
-#define HAVE_SYS_SOCKET_H 1
-#endif
-
-/* Define to 1 if you have the header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the header file. */
-#ifdef UNX
-#define HAVE_SYS_TIME_H 1
-#endif
-
-/* Define to 1 if you have the header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define if the timezone global is available */
-#ifndef MACOSX
-#define HAVE_TIMEZONE 1
-#if defined(_MSC_VER)
-#define timezone _timezone
-#endif
-#endif
-
-/* Use trio printf replacement library */
-/* #undef HAVE_TRIO */
-
-/* Define to 1 if you have the header file. */
-/* #undef HAVE_TRIO_H */
-
-/* Define to 1 if you have the header file. */
-#ifdef UNX
-#define HAVE_UNISTD_H 1
-#endif
-
-/* Define to 1 if you have the `usleep' function. */
-#ifdef UNX
-#define HAVE_USLEEP 1
-#endif
-
-/* Define to 1 if you have the `vsnprintf' function. */
-#if defined(UNX) || defined(_MSC_VER)
-#define HAVE_VSNPRINTF 1
-#endif
-
-#ifdef __MINGW32__
-#define vsnprintf _vsnprintf
-#endif
-
-/* Define to be location of localedir */
-/* #undef LOCALEDIR */
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-/* #undef LT_OBJDIR */
-
-/* Defined when neon is built as a library */
-#define NEON_IS_LIBRARY 1
-
-/* Define to be the neon version string */
-#define NEON_VERSION "0.31.2"
-
-/* Define to enable debugging */
-/* #undef NE_DEBUGGING */
-
-/* Define to be printf format string for ne_off_t */
-/* #undef NE_FMT_NE_OFF_T */
-
-/* Define to be printf format string for off64_t */
-#define NE_FMT_OFF64_T "lld"
-
-/* Define to be printf format string for off_t */
-#define NE_FMT_OFF_T "ld"
-
-/* Define to be printf format string for size_t */
-#define NE_FMT_SIZE_T "u"
-
-/* Define to be printf format string for ssize_t */
-#define NE_FMT_SSIZE_T "d"
-
-/* Define to be printf format string for time_t */
-#define NE_FMT_TIME_T "ld"
-
-/* Define to be printf format string for XML_Size */
-/* #undef NE_FMT_XML_SIZE */
-
-/* Defined if DAV is supported */
-#define NE_HAVE_DAV 1
-
-/* Defined if I18N is supported */
-/* #undef NE_HAVE_I18N */
-
-/* Defined if IPV6 is supported */
-#define NE_HAVE_IPV6 1
-
-/* Defined if LFS is supported */
-#define NE_HAVE_LFS 1
-
-/* Defined if LIBPXY is supported */
-/* #undef NE_HAVE_LIBPXY */
-
-/* Defined if SSL is supported */
-#define NE_HAVE_SSL
-
-/* Defined if TS_SSL is supported */
-/* #undef NE_HAVE_TS_SSL */
-
-/* Defined if ZLIB is supported */
-#define NE_HAVE_ZLIB 1
-
-/* Define to be filename of an SSL CA root bundle */
-/* #undef NE_SSL_CA_BUNDLE */
-
-/* Define if poll() should be used */
-#ifdef UNX
-#define NE_USE_POLL 1
-#endif
-
-/* Define to be neon library major version */
-#define NE_VERSION_MAJOR (0)
-
-/* Define to be neon library minor version */
-#define NE_VERSION_MINOR (31)
-
-/* Define to be neon library patch version */
-#define NE_VERSION_PATCH (2)
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "neon@webdav.org"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "neon"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "neon 0.31.2"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "neon"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "0.31.2"
-
-/* The size of `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 4
-
-/* The size of `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG 8
-
-/* The size of `off64_t', as computed by sizeof. */
-#define SIZEOF_OFF64_T 8
-
-/* The size of `off_t', as computed by sizeof. */
-#define SIZEOF_OFF_T 4
-
-/* The size of `size_t', as computed by sizeof. */
-#define SIZEOF_SIZE_T 4
-
-/* The size of `ssize_t', as computed by sizeof. */
-#define SIZEOF_SSIZE_T 4
-
-/* The size of `time_t', as computed by sizeof. */
-#define SIZEOF_TIME_T 4
-
-/* The size of `XML_Size', as computed by sizeof. */
-/* #undef SIZEOF_XML_SIZE */
-
-/* Define to 1 if you have the ANSI C header files. */
-#ifdef __sun
-#define STDC_HEADERS 1
-#endif
-
-/* Define to 1 if strerror_r returns char *. */
-#ifdef LINUX
-#define STRERROR_R_CHAR_P 1
-#endif
-
-/* Define to 1 if you can safely include both and . */
-#define TIME_WITH_SYS_TIME 1
-
-/* Define if getaddrinfo supports AI_ADDRCONFIG */
-/* #undef USE_GAI_ADDRCONFIG */
-
-/* Define if getaddrinfo() should be used */
-#define USE_GETADDRINFO 1
-
-/* Enable extensions on AIX 3, Interix. */
-#ifndef _ALL_SOURCE
-#undef _ALL_SOURCE
-#endif
-/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-#undef _GNU_SOURCE
-#endif
-/* Enable threading extensions on Solaris. */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-#undef _POSIX_PTHREAD_SEMANTICS
-#endif
-/* Enable extensions on HP NonStop. */
-#ifndef _TANDEM_SOURCE
-#undef _TANDEM_SOURCE
-#endif
-/* Enable general extensions on Solaris. */
-#ifndef __EXTENSIONS__
-#undef __EXTENSIONS__
-#endif
-
-/* Always defined to enable GNU extensions */
-#define _GNU_SOURCE 1
-
-/*
- include osl/endian.h after _GNU_SOURCE because it includes other headers and we need
- to ensure we get the strerror_r variant that returns char*
-*/
-#include
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
- significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined OSL_BIGENDIAN
-#define WORDS_BIGENDIAN 1
-#endif
-
-/* Define to 1 if on MINIX. */
-/* #undef _MINIX */
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
- this defined. */
-/* #undef _POSIX_1_SOURCE */
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-/* #undef _POSIX_SOURCE */
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define if in_addr_t is not available */
-/* #undef in_addr_t */
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-#if defined(__sun) && defined(__SUNPRO_C)
-#define inline
-#endif
-#endif
-
-/* Define to `long int' if does not define. */
-/* #undef off_t */
-
-/* Define to `int' if does not define. */
-/* #undef pid_t */
-
-/* Define to `unsigned int' if does not define. */
-/* #undef size_t */
-
-/* Define if socklen_t is not available */
-/* #undef socklen_t */
-
-/* MS IIS does not send Lock-Token response header after creation of a */
-/* new lock. This violates RFC, but... if we want to talk with this */
-/* beast we need a workaround */
-#define IIS_LOCK_BUG_WORKAROUND 1
-
-/* Enable leak-tracking versions of ne_*alloc when NEON_MEMLEAK is enabled */
-#ifdef NEON_MEMLEAK
-#include "memleak.h"
-#endif
-
-#if defined(HAVE_STPCPY) && defined(HAVE_DECL_STPCPY) && !HAVE_DECL_STPCPY && !defined(stpcpy)
-char* stpcpy(char*, const char*);
-#endif
-
-#ifdef _WIN32
-
-#include
-
-#define HAVE_MEMCPY 1
-
-#define strncasecmp strnicmp
-#define inline __inline
-#define WIN32_LEAN_AND_MEAN
-#define NOUSER
-#define NOGDI
-#define NONLS
-#define NOCRYPT
-
-#define HAVE_SSPI 1
-
-#endif
diff --git a/external/neon/neon.def b/external/neon/neon.def
deleted file mode 100644
index 3a14d66fbdfe..000000000000
--- a/external/neon/neon.def
+++ /dev/null
@@ -1,292 +0,0 @@
-LIBRARY "neon.dll"
-HEAPSIZE 0
-EXPORTS
- ne_sspi_authenticate;
- ne_sspi_clear_context;
- ne_sspi_create_context;
- ne_sspi_deinit;
- ne_sspi_destroy_context;
- ne_sspi_init;
- ne__negotiate_ssl;
- ne__ssl_exit;
- ne__ssl_init;
- ne_ssl_cert_cmp;
- ne_ssl_cert_digest;
- ne_ssl_cert_export;
- ne_ssl_cert_free;
- ne_ssl_cert_identity;
- ne_ssl_cert_import;
- ne_ssl_cert_issuer;
- ne_ssl_cert_read;
- ne_ssl_cert_signedby;
- ne_ssl_cert_subject;
- ne_ssl_cert_validity_time;
- ne_ssl_cert_write;
- ne_ssl_clicert_decrypt;
- ne_ssl_clicert_encrypted;
- ne_ssl_clicert_free;
- ne_ssl_clicert_name;
- ne_ssl_clicert_owner;
- ne_ssl_clicert_read;
- ne_ssl_context_create;
- ne_ssl_context_destroy;
- ne_ssl_context_keypair;
- ne_ssl_context_set_flag;
- ne_ssl_context_set_verify;
- ne_ssl_context_trustcert;
- ne_ssl_dname_cmp;
- ne_ssl_readable_dname;
- ne_ssl_set_clicert;
- ne_ssl_trust_default_ca;
- ne_xml_dispatch_request;
- ne_xml_parse_response;
- ne_xml_create;
- ne_xml_currentline;
- ne_xml_destroy;
- ne_xml_doc_encoding;
- ne_xml_failed;
- ne_xml_get_attr;
- ne_xml_get_error;
- ne_xml_mapid;
- ne_xml_parse;
- ne_xml_parse_v;
- ne_xml_push_handler;
- ne_xml_resolve_nspace;
- ne_xml_set_error;
- ne_debug;
- ne_debug_init;
- ne_debug_mask;
- ne_debug_stream;
- ne_has_support;
- ne_parse_statusline;
- ne_version_match;
- ne_version_string;
- ne_path_childof;
- ne_path_compare;
- ne_path_escape;
- ne_path_has_trailing_slash;
- ne_path_parent;
- ne_path_unescape;
- ne_uri_cmp;
- ne_uri_copy;
- ne_uri_defaultport;
- ne_uri_free;
- ne_uri_parse;
- ne_uri_resolve;
- ne_uri_unparse;
- ne_base64;
- ne_buffer_altered;
- ne_buffer_append;
- ne_buffer_clear;
- ne_buffer_concat;
- ne_buffer_create;
- ne_buffer_destroy;
- ne_buffer_finish;
- ne_buffer_grow;
- ne_buffer_ncreate;
- ne_buffer_snprintf;
- ne_buffer_zappend;
- ne_concat;
- ne_qtoken;
- ne_shave;
- ne_snprintf;
- ne_strcasecmp;
- ne_strclean;
- ne_strerror;
- ne_strncasecmp;
- ne_token;
- ne_tolower_array;
- ne_unbase64;
- ne_vsnprintf;
- ne__sock_sslsock;
- ne_addr_destroy;
- ne_addr_error;
- ne_addr_first;
- ne_addr_next;
- ne_addr_resolve;
- ne_addr_result;
- ne_iaddr_cmp;
- ne_iaddr_free;
- ne_iaddr_make;
- ne_iaddr_print;
- ne_iaddr_reverse;
- ne_iaddr_typeof;
- ne_sock_accept;
- ne_sock_accept_ssl;
- ne_sock_block;
- ne_sock_cipher;
- ne_sock_close;
- ne_sock_connect;
- ne_sock_connect_ssl;
- ne_sock_connect_timeout;
- ne_sock_create;
- ne_sock_error;
- ne_sock_exit;
- ne_sock_fd;
- ne_sock_fullread;
- ne_sock_fullwrite;
- ne_sock_init;
- ne_sock_peek;
- ne_sock_peer;
- ne_sock_prebind;
- ne_sock_proxy;
- ne_sock_read;
- ne_sock_read_timeout;
- ne_sock_readline;
- ne_sock_sessid;
- ne__ssl_set_verify_err;
- ne_close_connection;
- ne_fill_proxy_uri;
- ne_fill_server_uri;
- ne_get_error;
- ne_get_scheme;
- ne_get_server_hostport;
- ne_get_session_flag;
- ne_hook_close_conn;
- ne_hook_create_request;
- ne_hook_destroy_request;
- ne_hook_destroy_session;
- ne_hook_post_headers;
- ne_hook_post_send;
- ne_hook_pre_send;
- ne_session_create;
- ne_session_destroy;
- ne_session_proxy;
- ne_set_addrlist;
- ne_set_connect_timeout;
- ne_set_error;
- ne_set_localaddr;
- ne_set_notifier;
- ne_set_progress;
- ne_set_read_timeout;
- ne_set_session_flag;
- ne_set_session_private;
- ne_set_useragent;
- ne_ssl_cert_validity;
- ne_ssl_provide_clicert;
- ne_ssl_set_verify;
- ne_ssl_trust_cert;
- ne_unhook_close_conn;
- ne_unhook_create_request;
- ne_unhook_destroy_request;
- ne_unhook_destroy_session;
- ne_unhook_post_headers;
- ne_unhook_post_send;
- ne_unhook_pre_send;
- ne_version_pre_http11;
- ne_accept_2xx;
- ne_accept_always;
- ne_add_request_header;
- ne_add_response_body_reader;
- ne_begin_request;
- ne_discard_response;
- ne_end_request;
- ne_get_request_flag;
- ne_get_request_private;
- ne_get_response_header;
- ne_get_session;
- ne_get_session_private;
- ne_get_status;
- ne_print_request_header;
- ne_read_response_block;
- ne_read_response_to_fd;
- ne_request_create;
- ne_request_destroy;
- ne_request_dispatch;
- ne_response_header_iterate;
- ne_set_request_body_buffer;
- ne_set_request_body_fd;
- ne_set_request_body_provider;
- ne_set_request_flag;
- ne_set_request_private;
- ne_redirect_location;
- ne_redirect_register;
- ne_propfind_allprop;
- ne_propfind_create;
- ne_propfind_current_private;
- ne_propfind_destroy;
- ne_propfind_get_parser;
- ne_propfind_get_request;
- ne_propfind_named;
- ne_propfind_set_private;
- ne_propnames;
- ne_proppatch;
- ne_propset_iterate;
- ne_propset_lang;
- ne_propset_private;
- ne_propset_status;
- ne_propset_value;
- ne_simple_propfind;
- ne_ascii_to_md5;
- ne_md5_create_ctx;
- ne_md5_destroy_ctx;
- ne_md5_dup_ctx;
- ne_md5_finish_ascii;
- ne_md5_finish_ctx;
- ne_md5_process_block;
- ne_md5_process_bytes;
- ne_md5_read_ctx;
- ne_md5_reset_ctx;
- ne_md5_stream;
- ne_md5_to_ascii;
- ne_lock;
- ne_lock_copy;
- ne_lock_create;
- ne_lock_destroy;
- ne_lock_discover;
- ne_lock_free;
- ne_lock_refresh;
- ne_lock_using_parent;
- ne_lock_using_resource;
- ne_lockstore_add;
- ne_lockstore_create;
- ne_lockstore_destroy;
- ne_lockstore_findbyuri;
- ne_lockstore_first;
- ne_lockstore_next;
- ne_lockstore_register;
- ne_lockstore_remove;
- ne_unlock;
- ne_i18n_init;
- ne_asctime_parse;
- ne_httpdate_parse;
- ne_iso8601_parse;
- ne_rfc1036_parse;
- ne_rfc1123_date;
- ne_rfc1123_parse;
- ne_decompress_destroy;
- ne_decompress_reader;
- ne_add_depth_header;
- ne_copy;
- ne_delete;
- ne_get;
- ne_get_content_type;
- ne_get_range;
- ne_getmodtime;
- ne_mkcol;
- ne_move;
- ne_options;
- ne_options2;
- ne_post;
- ne_put;
- ne_add_proxy_auth;
- ne_add_server_auth;
- ne_forget_auth;
- ne_set_proxy_auth;
- ne_set_server_auth;
- ne_calloc;
- ne_malloc;
- ne_oom_callback;
- ne_realloc;
- ne_strdup;
- ne_strndup;
- ne_free;
- ne_acl3744_set;
- ne_207_create;
- ne_207_destroy;
- ne_207_get_current_propstat;
- ne_207_get_current_response;
- ne_207_set_propstat_handlers;
- ne_207_set_response_handlers;
- ne_accept_207;
- ne_simple_request;
diff --git a/external/neon/neon.patch b/external/neon/neon.patch
deleted file mode 100644
index 23aef0d0fe85..000000000000
--- a/external/neon/neon.patch
+++ /dev/null
@@ -1,311 +0,0 @@
---- src/ne_auth.c 2010-10-14 17:00:53.000000000 +0200
-+++ src/ne_auth.c 2011-02-03 10:31:22.000000000 +0100
-@@ -367,7 +367,7 @@
- static int get_credentials(auth_session *sess, ne_buffer **errmsg, int attempt,
- struct auth_challenge *chall, char *pwbuf)
- {
-- if (chall->handler->creds(chall->handler->userdata, sess->realm,
-+ if (chall->handler->creds(chall->handler->userdata, chall->protocol->name, sess->realm,
- chall->handler->attempt++, sess->username, pwbuf) == 0) {
- return 0;
- } else {
-@@ -385,15 +385,19 @@
- {
- char *tmp, password[NE_ABUFSIZ];
-
-+#if 0 /* Workaround - IIS sends challenge without realm. */
-+
- /* Verify challenge... must have a realm */
- if (parms->realm == NULL) {
- challenge_error(errmsg, _("missing realm in Basic challenge"));
- return -1;
- }
-+#endif
-
- clean_session(sess);
-
-- sess->realm = ne_strdup(parms->realm);
-+ if (parms->realm != NULL)
-+ sess->realm = ne_strdup(parms->realm);
-
- if (get_credentials(sess, errmsg, attempt, parms, password)) {
- /* Failed to get credentials */
-@@ -610,10 +614,12 @@
- return NULL;
- }
-
--static int continue_sspi(auth_session *sess, int ntlm, const char *hdr)
-+static int continue_sspi(auth_session *sess, int ntlm, const char *hdr,
-+ int attempt, struct auth_challenge *parms, ne_buffer **errmsg)
- {
- int status;
- char *response = NULL;
-+ char password[NE_ABUFSIZ];
-
- NE_DEBUG(NE_DBG_HTTPAUTH, "auth: SSPI challenge.\n");
-
-@@ -630,8 +636,17 @@
- return status;
- }
- }
--
-- status = ne_sspi_authenticate(sess->sspi_context, hdr, &response);
-+
-+ /* Authentification needs more than one http request.
-+ * As long as authentification in progress use the existing credentials.
-+ * Otherwise get new credentials.*/
-+ if (!hdr)
-+ if (get_credentials(sess, errmsg, attempt, parms, password)) {
-+ /* Failed to get credentials */
-+ return -1;
-+ }
-+
-+ status = ne_sspi_authenticate(sess->sspi_context, hdr, &response, sess->username, password);
- if (status) {
- return status;
- }
-@@ -651,7 +666,7 @@
- {
- int ntlm = ne_strcasecmp(parms->protocol->name, "NTLM") == 0;
-
-- return continue_sspi(sess, ntlm, parms->opaque);
-+ return continue_sspi(sess, ntlm, parms->opaque, attempt, parms, errmsg);
- }
-
- static int verify_sspi(struct auth_request *req, auth_session *sess,
-@@ -674,7 +689,7 @@
- return NE_OK;
- }
-
-- return continue_sspi(sess, ntlm, ptr);
-+ return continue_sspi(sess, ntlm, ptr, 0, NULL, NULL);
- }
-
- #endif
---- src/ne_auth.h 2009-09-01 22:13:12.000000000 +0200
-+++ src/ne_auth.h 2011-02-03 10:26:20.000000000 +0100
-@@ -47,8 +47,8 @@
- * Hint: if you just wish to attempt authentication just once (even if
- * the user gets the username/password wrong), have the callback
- * function use 'attempt' value as the function return value. */
--typedef int (*ne_auth_creds)(void *userdata, const char *realm, int attempt,
-- char *username, char *password);
-+typedef int (*ne_auth_creds)(void *userdata, const char * auth_protocol,
-+ const char *realm, int attempt, char *username, char *password);
-
- /* Set callbacks to provide credentials for server and proxy
- * authentication, using the default set of authentication protocols.
---- src/ne_locks.c 2007-02-05 11:09:27.000000000 +0100
-+++ src/ne_locks.c 2011-02-03 10:26:21.000000000 +0100
-@@ -579,6 +579,23 @@
- const char *token = ne_get_response_header(ctx->req, "Lock-Token");
- /* at the root element; retrieve the Lock-Token header,
- * and bail if it wasn't given. */
-+#ifdef IIS_LOCK_BUG_WORKAROUND
-+ /* MS IIS violates RFC 2518/4918. It does not send a Lock-Token response
-+ header upon successful creation of a new lock. As a workaround, we
-+ will try to pick the lock token from the response body (although
-+ this is not 100% safe in case of multiple activelocks). */
-+ if (token == NULL)
-+ NE_DEBUG(NE_DBG_LOCKS,
-+ "Ignoring missing LOCK response Lock-Token header\n");
-+
-+ if (token != NULL) {
-+ if (token[0] == '<') token++;
-+ ctx->token = ne_strdup(token);
-+ ne_shave(ctx->token, ">");
-+ NE_DEBUG(NE_DBG_LOCKS, "lk_startelm: Finding token %s\n",
-+ ctx->token);
-+ }
-+#else
- if (token == NULL) {
- ne_xml_set_error(ctx->parser,
- _("LOCK response missing Lock-Token header"));
-@@ -590,12 +607,28 @@
- ne_shave(ctx->token, ">");
- NE_DEBUG(NE_DBG_LOCKS, "lk_startelm: Finding token %s\n",
- ctx->token);
-+#endif
- }
-
- /* TODO: only accept 'prop' as root for LOCK response */
- if (!can_accept(parent, id))
- return NE_XML_DECLINE;
-
-+#ifdef IIS_LOCK_BUG_WORKAROUND
-+ if (id == ELM_activelock && ctx->found) {
-+ /* Found another activelock... */
-+ const char *token = ne_get_response_header(ctx->req, "Lock-Token");
-+ if (token == NULL) {
-+ /* Response contains more than one activelock and no Lock-Token
-+ * response header. We are doomed. No safe workaround for IIS
-+ * lock bug possible. */
-+ ne_xml_set_error(ctx->parser,
-+ _("LOCK response missing Lock-Token header and more than one activelock"));
-+ return NE_XML_ABORT;
-+ }
-+ }
-+#endif
-+
- if (id == ELM_activelock && !ctx->found) {
- /* a new activelock */
- ne_lock_free(&ctx->active);
-@@ -621,7 +654,12 @@
- return -1;
-
- if (state == ELM_activelock) {
-+#ifdef IIS_LOCK_BUG_WORKAROUND
-+ if (ctx->active.token) {
-+ ctx->token = ne_strdup(ctx->active.token);
-+#else
- if (ctx->active.token && strcmp(ctx->active.token, ctx->token) == 0) {
-+#endif
- ctx->found = 1;
- }
- }
---- src/ne_sspi.c 2007-08-10 17:26:08.000000000 +0200
-+++ src/ne_sspi.c 2011-02-03 10:26:21.000000000 +0100
-@@ -206,6 +206,45 @@
- }
-
- /*
-+ * Simplification wrapper arround AcquireCredentialsHandle as most of
-+ * the parameters do not change.
-+ */
-+static int acquireCredentialsHandleForUsername(CredHandle * credentials, char *package, const char *username, const char *password)
-+{
-+ SECURITY_STATUS status;
-+ TimeStamp timestamp;
-+
-+ const char *domain = "";
-+
-+ int rc, rcISC;
-+ SecPkgInfo *secPackInfo;
-+ SEC_WINNT_AUTH_IDENTITY *nameAndPwd = NULL;
-+ int bytesReceived = 0, bytesSent = 0;
-+
-+ nameAndPwd = (SEC_WINNT_AUTH_IDENTITY *) malloc( sizeof(SEC_WINNT_AUTH_IDENTITY) );
-+ memset( nameAndPwd, '\0', sizeof (*nameAndPwd) );
-+ nameAndPwd->Domain = (unsigned char *) _strdup( domain? domain: "" );
-+ nameAndPwd->DomainLength = domain? strlen( domain ): 0;
-+ nameAndPwd->User = (unsigned char *) _strdup( username? username: "" );
-+ nameAndPwd->UserLength = username? strlen( username ): 0;
-+ nameAndPwd->Password = (unsigned char *) _strdup( password? password: "" );
-+ nameAndPwd->PasswordLength = password? strlen( password ): 0;
-+ nameAndPwd->Flags = SEC_WINNT_AUTH_IDENTITY_ANSI;
-+
-+ status = pSFT->AcquireCredentialsHandle( NULL, package, SECPKG_CRED_OUTBOUND,
-+ NULL, nameAndPwd, NULL, NULL, credentials, ×tamp );
-+
-+ if (status != SEC_E_OK) {
-+ NE_DEBUG(NE_DBG_HTTPAUTH,
-+ "sspi: AcquireCredentialsHandle [fail] [%x].\n", status);
-+ return -1;
-+ }
-+
-+ return 0;
-+}
-+
-+
-+/*
- * Wrapper around initializeSecurityContext. Supplies several
- * default parameters as well as logging in case of errors.
- */
-@@ -483,7 +522,7 @@
- * Processes received authentication tokens as well as supplies the
- * response token.
- */
--int ne_sspi_authenticate(void *context, const char *base64Token, char **responseToken)
-+int ne_sspi_authenticate(void *context, const char *base64Token, char **responseToken, const char* username, const char* password)
- {
- SecBufferDesc outBufferDesc;
- SecBuffer outBuffer;
-@@ -561,13 +600,22 @@
- /* Reset any existing context since we are starting over */
- resetContext(sspiContext);
-
-- if (acquireCredentialsHandle
-- (&sspiContext->credentials, sspiContext->mechanism) != SEC_E_OK) {
-- freeBuffer(&outBufferDesc);
-- NE_DEBUG(NE_DBG_HTTPAUTH,
-- "sspi: acquireCredentialsHandle failed.\n");
-- return -1;
-- }
-+ if (strlen(username) != 0) {
-+ if (acquireCredentialsHandleForUsername
-+ (&sspiContext->credentials, sspiContext->mechanism, username, password) != SEC_E_OK) {
-+ freeBuffer(&outBufferDesc);
-+ NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: acquireCredentialsHandleForUsername failed.\n");
-+ return -1;
-+ }
-+ } else {
-+ if (acquireCredentialsHandle
-+ (&sspiContext->credentials, sspiContext->mechanism) != SEC_E_OK) {
-+ freeBuffer(&outBufferDesc);
-+ NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: acquireCredentialsHandle failed.\n");
-+ return -1;
-+ }
-+ }
-+
-
- securityStatus =
- initializeSecurityContext(&sspiContext->credentials, NULL,
---- src/ne_sspi.h 2006-02-12 13:05:14.000000000 +0100
-+++ src/ne_sspi.h 2011-02-03 10:26:21.000000000 +0100
-@@ -41,7 +41,7 @@
- int ne_sspi_clear_context(void *context);
-
- int ne_sspi_authenticate(void *context, const char *base64Token,
-- char **responseToken);
-+ char **responseToken, const char* username, const char* password);
-
- #endif /* HAVE_SSPI */
-
---- src/ne_openssl.c
-+++ src/ne_openssl.c
-@@ -43,6 +43,13 @@
- #endif
- #endif
-
-+#ifdef _WIN32
-+#define X509_NAME WIN32_X509_NAME
-+#include
-+#include
-+#undef X509_NAME
-+#endif
-+
- #include "ne_ssl.h"
- #include "ne_string.h"
- #include "ne_session.h"
-@@ -798,6 +805,31 @@
- X509_STORE_load_locations(store, NE_SSL_CA_BUNDLE, NULL);
- #else
- X509_STORE_set_default_paths(store);
-+#ifdef _WIN32
-+ {
-+ HCERTSTORE hStore;
-+ PCCERT_CONTEXT pContext = NULL;
-+ X509 *x509;
-+
-+ hStore = CertOpenSystemStore(0, "ROOT");
-+ if (hStore)
-+ {
-+ while (pContext = CertEnumCertificatesInStore(hStore, pContext))
-+ {
-+ x509 = d2i_X509(NULL, &pContext->pbCertEncoded, pContext->cbCertEncoded);
-+ if (x509)
-+ {
-+ X509_STORE_add_cert(store, x509);
-+ X509_free(x509);
-+ }
-+ }
-+ }
-+
-+ CertFreeCertificateContext(pContext);
-+ CertCloseStore(hStore, 0);
-+ }
-+#endif
-+
- #endif
- }
-
diff --git a/external/neon/neon_fix_lock_token_on_if.patch b/external/neon/neon_fix_lock_token_on_if.patch
deleted file mode 100644
index a60303789f53..000000000000
--- a/external/neon/neon_fix_lock_token_on_if.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -aru src.origin/ne_locks.c src/ne_locks.c
---- src.origin/ne_locks.c 2007-02-05 11:09:27.000000000 +0100
-+++ src/ne_locks.c 2015-07-29 10:33:55.724753920 +0200
-@@ -137,7 +137,7 @@
- }
- else {
- char *uri = ne_uri_unparse(&item->lock->uri);
-- ne_buffer_concat(req, " <", uri, "> (<",
-+ ne_buffer_concat(req, " (<",
- item->lock->token, ">)", NULL);
- ne_free(uri);
- }
diff --git a/external/neon/neon_fix_no_OPENSSL_Applink.patch b/external/neon/neon_fix_no_OPENSSL_Applink.patch
deleted file mode 100644
index 40291ff412bf..000000000000
--- a/external/neon/neon_fix_no_OPENSSL_Applink.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/ne_openssl.c
-+++ src/ne_openssl.c
-@@ -440,7 +440,7 @@
- #ifdef NE_DEBUGGING
- if (ne_debug_mask & NE_DBG_SSL) {
- fprintf(ne_debug_stream, "Cert #%d:\n", n);
-- X509_print_fp(ne_debug_stream, cert->subject);
-+ // X509_print_fp(ne_debug_stream, cert->subject);
- }
- #endif
- if (top == NULL) {
diff --git a/external/neon/neon_with_gnutls.patch b/external/neon/neon_with_gnutls.patch
deleted file mode 100644
index ed8b7faadebf..000000000000
--- a/external/neon/neon_with_gnutls.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/ne_gnutls.c 2009-12-02 23:40:41.000000000 +0200
-+++ src/ne_gnutls.c 2013-03-29 13:41:00.429857276 +0200
-@@ -48,6 +48,26 @@
- #include
- #endif
-
-+
-+/* GnuTLS removed these symbols from 2.99.0.
-+ *
-+ * This is a dodgy solution to avoid further patching of neon
-+ * sources */
-+#if LIBGNUTLS_VERSION_NUMBER >= 0x026300
-+# define gnutls_pkcs12 gnutls_pkcs12_t
-+# define gnutls_pkcs12_bag gnutls_pkcs12_bag_t
-+# define gnutls_pkcs12_bag_type gnutls_pkcs12_bag_type_t
-+# define gnutls_certificate_verify_peers(_ssl) ({ \
-+ int __status_ ## __LINE__ = 0; \
-+ gnutls_certificate_verify_peers2((_ssl), &__status_ ## __LINE__) == 0 \
-+ ? __status_ ## __LINE__ : -1; \
-+ })
-+#elif LIBGNUTLS_VERSION_NUMBER >= 0x020303
-+/* GnuTLS had these symbols since 2.3.3. */
-+# define HAVE_GNUTLS_CERTIFICATE_GET_X509_CAS
-+#endif /* LIBGNUTLS_VERSION_NUMBER */
-+
-+
- #include "ne_ssl.h"
- #include "ne_string.h"
- #include "ne_session.h"
diff --git a/readlicense_oo/license/license.xml b/readlicense_oo/license/license.xml
index 1cda802b8b92..cdbecd828533 100644
--- a/readlicense_oo/license/license.xml
+++ b/readlicense_oo/license/license.xml
@@ -1433,20 +1433,6 @@
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
-
Network Security Services (NSS)
The following software may be included in this product: Network Security Services (NSS). Use of any of this
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 6aa756c4a795..b0d534e3773a 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -14024,56 +14024,6 @@ ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
ucb/source/ucp/webdav-curl/webdavresultset.cxx
ucb/source/ucp/webdav-curl/webdavresultset.hxx
ucb/source/ucp/webdav-curl/webdavservices.cxx
-ucb/source/ucp/webdav-neon/ContentProperties.cxx
-ucb/source/ucp/webdav-neon/ContentProperties.hxx
-ucb/source/ucp/webdav-neon/DAVAuthListener.hxx
-ucb/source/ucp/webdav-neon/DAVAuthListenerImpl.hxx
-ucb/source/ucp/webdav-neon/DAVException.hxx
-ucb/source/ucp/webdav-neon/DAVProperties.cxx
-ucb/source/ucp/webdav-neon/DAVProperties.hxx
-ucb/source/ucp/webdav-neon/DAVRequestEnvironment.hxx
-ucb/source/ucp/webdav-neon/DAVResource.hxx
-ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx
-ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx
-ucb/source/ucp/webdav-neon/DAVSession.hxx
-ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx
-ucb/source/ucp/webdav-neon/DAVSessionFactory.hxx
-ucb/source/ucp/webdav-neon/DAVTypes.cxx
-ucb/source/ucp/webdav-neon/DAVTypes.hxx
-ucb/source/ucp/webdav-neon/DateTimeHelper.cxx
-ucb/source/ucp/webdav-neon/DateTimeHelper.hxx
-ucb/source/ucp/webdav-neon/LinkSequence.cxx
-ucb/source/ucp/webdav-neon/LinkSequence.hxx
-ucb/source/ucp/webdav-neon/LockEntrySequence.cxx
-ucb/source/ucp/webdav-neon/LockSequence.cxx
-ucb/source/ucp/webdav-neon/LockSequence.hxx
-ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx
-ucb/source/ucp/webdav-neon/NeonHeadRequest.hxx
-ucb/source/ucp/webdav-neon/NeonInputStream.cxx
-ucb/source/ucp/webdav-neon/NeonInputStream.hxx
-ucb/source/ucp/webdav-neon/NeonLockStore.cxx
-ucb/source/ucp/webdav-neon/NeonLockStore.hxx
-ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
-ucb/source/ucp/webdav-neon/NeonPropFindRequest.hxx
-ucb/source/ucp/webdav-neon/NeonSession.cxx
-ucb/source/ucp/webdav-neon/NeonSession.hxx
-ucb/source/ucp/webdav-neon/NeonTypes.hxx
-ucb/source/ucp/webdav-neon/NeonUri.cxx
-ucb/source/ucp/webdav-neon/NeonUri.hxx
-ucb/source/ucp/webdav-neon/PropertyMap.hxx
-ucb/source/ucp/webdav-neon/PropfindCache.cxx
-ucb/source/ucp/webdav-neon/PropfindCache.hxx
-ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx
-ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.hxx
-ucb/source/ucp/webdav-neon/webdavcontent.cxx
-ucb/source/ucp/webdav-neon/webdavcontent.hxx
-ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
-ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx
-ucb/source/ucp/webdav-neon/webdavdatasupplier.hxx
-ucb/source/ucp/webdav-neon/webdavprovider.cxx
-ucb/source/ucp/webdav-neon/webdavprovider.hxx
-ucb/source/ucp/webdav-neon/webdavresultset.cxx
-ucb/source/ucp/webdav-neon/webdavresultset.hxx
ucbhelper/source/client/commandenvironment.cxx
ucbhelper/source/client/content.cxx
ucbhelper/source/client/interceptedinteraction.cxx
diff --git a/ucb/IwyuFilter_ucb.yaml b/ucb/IwyuFilter_ucb.yaml
index 27115f812783..1b242fd561b3 100644
--- a/ucb/IwyuFilter_ucb.yaml
+++ b/ucb/IwyuFilter_ucb.yaml
@@ -10,48 +10,6 @@ excludelist:
ucb/source/ucp/ftp/ftpcontentprovider.hxx:
# Wrapper for external lib
- curl.hxx
- ucb/source/ucp/webdav-neon/ContentProperties.hxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/DateTimeHelper.hxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/DAVException.hxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/LockSequence.hxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/DAVAuthListenerImpl.hxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/DAVAuthListener.hxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/DAVResource.hxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/NeonInputStream.hxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/DAVTypes.hxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/DAVSessionFactory.hxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/DAVRequestEnvironment.hxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/PropertyMap.hxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/webdavdatasupplier.hxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/webdavprovider.hxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
ucb/source/core/ucb.cxx:
# Needed for UnoType
- com/sun/star/ucb/XCommandInfo.hpp
@@ -97,31 +55,6 @@ excludelist:
ucb/source/ucp/tdoc/tdoc_content.cxx:
# Needed for UnoType
- com/sun/star/ucb/XCommandInfo.hpp
- ucb/source/ucp/webdav-neon/DateTimeHelper.cxx:
- # Actually in use
- - com/sun/star/util/DateTime.hpp
- ucb/source/ucp/webdav-neon/LockEntrySequence.cxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/LinkSequence.cxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/LinkSequence.cxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/LockSequence.cxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/NeonSession.cxx:
- # Needed for UnoType
- - com/sun/star/ucb/Lock.hpp
- - com/sun/star/beans/NamedValue.hpp
- ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx:
- # Needed for LGPL code licensing
- - config_lgpl.h
- ucb/source/ucp/webdav-neon/webdavcontent.cxx:
- # Needed for UnoType
- - com/sun/star/ucb/XCommandInfo.hpp
ucb/source/ucp/webdav-curl/DateTimeHelper.cxx:
# Actually in use
- com/sun/star/util/DateTime.hpp
diff --git a/ucb/Library_ucpdav1.mk b/ucb/Library_ucpdav1.mk
index c2a36d7fcef7..b3c9a2342d6e 100644
--- a/ucb/Library_ucpdav1.mk
+++ b/ucb/Library_ucpdav1.mk
@@ -27,8 +27,6 @@ $(eval $(call gb_Library_use_libraries,ucpdav1,\
tl \
))
-ifeq ($(WITH_WEBDAV),curl)
-
$(eval $(call gb_Library_set_componentfile,ucpdav1,ucb/source/ucp/webdav-curl/ucpdav1,services))
$(eval $(call gb_Library_use_externals,ucpdav1,\
@@ -59,50 +57,6 @@ $(eval $(call gb_Library_add_exception_objects,ucpdav1,\
ucb/source/ucp/webdav-curl/webdavresultset \
))
-else
-ifeq ($(WITH_WEBDAV),neon)
-
-$(eval $(call gb_Library_set_componentfile,ucpdav1,ucb/source/ucp/webdav-neon/ucpdav1,services))
-
-$(eval $(call gb_Library_use_externals,ucpdav1,\
- boost_headers \
- libxml2 \
- neon \
- openssl \
-))
-
-$(eval $(call gb_Library_use_custom_headers,ucpdav1,\
- officecfg/registry \
-))
-
-$(eval $(call gb_Library_add_exception_objects,ucpdav1,\
- ucb/source/ucp/webdav-neon/ContentProperties \
- ucb/source/ucp/webdav-neon/DateTimeHelper \
- ucb/source/ucp/webdav-neon/DAVProperties \
- ucb/source/ucp/webdav-neon/DAVResourceAccess \
- ucb/source/ucp/webdav-neon/DAVSessionFactory \
- ucb/source/ucp/webdav-neon/DAVTypes \
- ucb/source/ucp/webdav-neon/LinkSequence \
- ucb/source/ucp/webdav-neon/LockEntrySequence \
- ucb/source/ucp/webdav-neon/LockSequence \
- ucb/source/ucp/webdav-neon/NeonHeadRequest \
- ucb/source/ucp/webdav-neon/NeonInputStream \
- ucb/source/ucp/webdav-neon/NeonLockStore \
- ucb/source/ucp/webdav-neon/NeonPropFindRequest \
- ucb/source/ucp/webdav-neon/NeonSession \
- ucb/source/ucp/webdav-neon/NeonUri \
- ucb/source/ucp/webdav-neon/PropfindCache \
- ucb/source/ucp/webdav-neon/UCBDeadPropertyValue \
- ucb/source/ucp/webdav-neon/webdavcontentcaps \
- ucb/source/ucp/webdav-neon/webdavcontent \
- ucb/source/ucp/webdav-neon/webdavdatasupplier \
- ucb/source/ucp/webdav-neon/webdavprovider \
- ucb/source/ucp/webdav-neon/webdavresultset \
-))
-
-endif # WITH_WEBDAV
-endif # WITH_WEBDAV
-
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_system_win32_libs,ucpdav1,\
ws2_32 \
diff --git a/ucb/README.md b/ucb/README.md
index 5af5487d7c5d..23d5fefb6db5 100644
--- a/ucb/README.md
+++ b/ucb/README.md
@@ -2,8 +2,3 @@
Universal Content Broker (has ucp) which do things like convert files to strings in content broker world.
-mmeeks: so - I renamed the old LGPLv3 webdav code to `webdav-neon`, and imported
-the (not built) serf webdav ucp into the old space. so that in future, we can
-merge changes more easily - and still choose which to use. cbosdonnat kindly
-volunteered to do some comparative analysis of the two codebases to decide which
-is best for what etc.
diff --git a/ucb/source/ucp/webdav-neon/ContentProperties.cxx b/ucb/source/ucp/webdav-neon/ContentProperties.cxx
deleted file mode 100644
index faee90874f5b..000000000000
--- a/ucb/source/ucp/webdav-neon/ContentProperties.cxx
+++ /dev/null
@@ -1,558 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-/**************************************************************************
- TODO
- **************************************************************************
-
- *************************************************************************/
-#include
-#include
-#include "NeonUri.hxx"
-#include "DAVResource.hxx"
-#include "DAVProperties.hxx"
-#include "DateTimeHelper.hxx"
-#include "webdavprovider.hxx"
-#include "ContentProperties.hxx"
-
-using namespace com::sun::star;
-using namespace webdav_ucp;
-
-/*
-=============================================================================
-
- Property Mapping
-
-=============================================================================
-HTTP (entity header) WebDAV (property) UCB (property)
-=============================================================================
-
-Allow
-Content-Encoding
-Content-Language getcontentlanguage
-Content-Length getcontentlength Size
-Content-Location
-Content-MD5
-Content-Range
-Content-Type getcontenttype MediaType
-Expires
-Last-Modified getlastmodified DateModified
- creationdate DateCreated
- resourcetype IsFolder,IsDocument,ContentType
- displayname
-ETag (actually getetag
-a response header )
- lockdiscovery
- supportedlock
- source
- Title (always taken from URI)
-
-=============================================================================
-
-Important: HTTP headers will not be mapped to DAV properties; only to UCB
- properties. (Content-Length,Content-Type,Last-Modified)
-*/
-
-
-// ContentProperties Implementation.
-
-
-// static member!
-uno::Any ContentProperties::m_aEmptyAny;
-
-ContentProperties::ContentProperties( const DAVResource& rResource )
-: m_xProps( new PropertyValueMap ),
- m_bTrailingSlash( false )
-{
- assert( !rResource.uri.isEmpty() && "ContentProperties ctor - Empty resource URI!" );
-
- // Title
- try
- {
- NeonUri aURI( rResource.uri );
- m_aEscapedTitle = aURI.GetPathBaseName();
-
- (*m_xProps)[ OUString("Title") ]
- = PropertyValue(
- uno::makeAny( aURI.GetPathBaseNameUnescaped() ), true );
- }
- catch ( DAVException const & )
- {
- (*m_xProps)[ OUString("Title") ]
- = PropertyValue(
- uno::makeAny(
- OUString(
- "*** unknown ***" ) ),
- true );
- }
-
- for ( const auto& rProp : rResource.properties )
- {
- addProperty( rProp );
- }
-
- if ( rResource.uri.endsWith("/") )
- m_bTrailingSlash = true;
-}
-
-
-ContentProperties::ContentProperties(
- const OUString & rTitle, bool bFolder )
-: m_xProps( new PropertyValueMap ),
- m_bTrailingSlash( false )
-{
- (*m_xProps)[ OUString("Title") ]
- = PropertyValue( uno::makeAny( rTitle ), true );
- (*m_xProps)[ OUString("IsFolder") ]
- = PropertyValue( uno::makeAny( bFolder ), true );
- (*m_xProps)[ OUString("IsDocument") ]
- = PropertyValue( uno::makeAny( !bFolder ), true );
-}
-
-
-ContentProperties::ContentProperties( const OUString & rTitle )
-: m_xProps( new PropertyValueMap ),
- m_bTrailingSlash( false )
-{
- (*m_xProps)[ OUString("Title") ]
- = PropertyValue( uno::makeAny( rTitle ), true );
-}
-
-
-ContentProperties::ContentProperties()
-: m_xProps( new PropertyValueMap ),
- m_bTrailingSlash( false )
-{
-}
-
-ContentProperties::ContentProperties(const ContentProperties& rOther)
- : m_aEscapedTitle(rOther.m_aEscapedTitle)
- , m_xProps(rOther.m_xProps ? new PropertyValueMap(*rOther.m_xProps) : new PropertyValueMap)
- , m_bTrailingSlash(rOther.m_bTrailingSlash)
-{
-}
-
-
-bool ContentProperties::contains( const OUString & rName ) const
-{
- return get( rName ) != nullptr;
-}
-
-
-const uno::Any & ContentProperties::getValue(
- const OUString & rName ) const
-{
- const PropertyValue * pProp = get( rName );
- if ( pProp )
- return pProp->value();
- else
- return m_aEmptyAny;
-}
-
-
-const PropertyValue * ContentProperties::get(
- const OUString & rName ) const
-{
- PropertyValueMap::const_iterator it = m_xProps->find( rName );
- const PropertyValueMap::const_iterator end = m_xProps->end();
-
- if ( it == end )
- {
- it = std::find_if(m_xProps->cbegin(), end,
- [&rName](const PropertyValueMap::value_type& rEntry) {
- return rEntry.first.equalsIgnoreAsciiCase( rName );
- });
- if ( it != end )
- return &(*it).second;
-
- return nullptr;
- }
- else
- return &(*it).second;
-}
-
-
-// static
-void ContentProperties::UCBNamesToDAVNames(
- const uno::Sequence< beans::Property > & rProps,
- std::vector< OUString > & propertyNames )
-{
-
- // Assemble list of DAV properties to obtain from server.
- // Append DAV properties needed to obtain requested UCB props.
-
-
- // DAV UCB
- // creationdate <- DateCreated
- // getlastmodified <- DateModified
- // getcontenttype <- MediaType
- // getcontentlength <- Size
- // resourcetype <- IsFolder, IsDocument, ContentType
- // (taken from URI) <- Title
-
- bool bCreationDate = false;
- bool bLastModified = false;
- bool bContentType = false;
- bool bContentLength = false;
- bool bResourceType = false;
-
- for ( const beans::Property & rProp : rProps )
- {
- if ( rProp.Name == "Title" )
- {
- // Title is always obtained from resource's URI.
- continue;
- }
- else if ( rProp.Name == "DateCreated" || rProp.Name == DAVProperties::CREATIONDATE )
- {
- if ( !bCreationDate )
- {
- propertyNames.push_back( DAVProperties::CREATIONDATE );
- bCreationDate = true;
- }
- }
- else if ( rProp.Name == "DateModified" || rProp.Name == DAVProperties::GETLASTMODIFIED )
- {
- if ( !bLastModified )
- {
- propertyNames.push_back( DAVProperties::GETLASTMODIFIED );
- bLastModified = true;
- }
- }
- else if ( rProp.Name == "MediaType" || rProp.Name == DAVProperties::GETCONTENTTYPE )
- {
- if ( !bContentType )
- {
- propertyNames.push_back( DAVProperties::GETCONTENTTYPE );
- bContentType = true;
- }
- }
- else if ( rProp.Name == "Size" || rProp.Name == DAVProperties::GETCONTENTLENGTH )
- {
- if ( !bContentLength )
- {
- propertyNames.push_back( DAVProperties::GETCONTENTLENGTH );
- bContentLength = true;
- }
- }
- else if ( rProp.Name == "ContentType" || rProp.Name == "IsDocument" || rProp.Name == "IsFolder" || rProp.Name == DAVProperties::RESOURCETYPE )
- {
- if ( !bResourceType )
- {
- propertyNames.push_back( DAVProperties::RESOURCETYPE );
- bResourceType = true;
- }
- }
- else
- {
- propertyNames.push_back( rProp.Name );
- }
- }
-}
-
-
-// static
-void ContentProperties::UCBNamesToHTTPNames(
- const uno::Sequence< beans::Property > & rProps,
- std::vector< OUString > & propertyNames )
-{
-
- // Assemble list of HTTP header names to obtain from server.
- // Append HTTP headers needed to obtain requested UCB props.
-
-
- // HTTP UCB
- // Last-Modified <- DateModified
- // Content-Type <- MediaType
- // Content-Length <- Size
-
- for ( const beans::Property & rProp : rProps )
- {
- if ( rProp.Name == "DateModified" )
- {
- propertyNames.emplace_back("Last-Modified" );
- }
- else if ( rProp.Name == "MediaType" )
- {
- propertyNames.emplace_back("Content-Type" );
- }
- else if ( rProp.Name == "Size" )
- {
- propertyNames.emplace_back("Content-Length" );
- }
- else
- {
- propertyNames.push_back( rProp.Name );
- }
- }
-}
-
-
-bool ContentProperties::containsAllNames(
- const uno::Sequence< beans::Property >& rProps,
- std::vector< OUString > & rNamesNotContained ) const
-{
- rNamesNotContained.clear();
-
- for ( const auto& rProp : rProps )
- {
- const OUString & rName = rProp.Name;
- if ( !contains( rName ) )
- {
- // Not found.
- rNamesNotContained.push_back( rName );
- }
- }
-
- return rNamesNotContained.empty();
-}
-
-
-void ContentProperties::addProperties(
- const std::vector< OUString > & rProps,
- const ContentProperties & rContentProps )
-{
- for ( const OUString & rName : rProps )
- {
- if ( !contains( rName ) ) // ignore duplicates
- {
- const PropertyValue * pProp = rContentProps.get( rName );
- if ( pProp )
- {
- // Add it.
- addProperty( rName, pProp->value(), pProp->isCaseSensitive() );
- }
- else
- {
- addProperty( rName, uno::Any(), false );
- }
- }
- }
-}
-
-
-void ContentProperties::addProperty( const DAVPropertyValue & rProp )
-{
- addProperty( rProp.Name, rProp.Value, rProp.IsCaseSensitive );
-}
-
-
-void ContentProperties::addProperty( const OUString & rName,
- const css::uno::Any & rValue,
- bool bIsCaseSensitive )
-{
- if ( rName == DAVProperties::CREATIONDATE )
- {
- // Map DAV:creationdate to UCP:DateCreated
- OUString aValue;
- rValue >>= aValue;
- util::DateTime aDate;
- DateTimeHelper::convert( aValue, aDate );
-
- (*m_xProps)[ OUString("DateCreated") ]
- = PropertyValue( uno::makeAny( aDate ), true );
- }
- // else if ( rName.equals( DAVProperties::DISPLAYNAME ) )
- // {
- // }
- // else if ( rName.equals( DAVProperties::GETCONTENTLANGUAGE ) )
- // {
- // }
- else if ( rName == DAVProperties::GETCONTENTLENGTH )
- {
- // Map DAV:getcontentlength to UCP:Size
- OUString aValue;
- rValue >>= aValue;
-
- (*m_xProps)[ OUString("Size") ]
- = PropertyValue( uno::makeAny( aValue.toInt64() ), true );
- }
- else if ( rName.equalsIgnoreAsciiCase( "Content-Length" ) )
- {
- // Do NOT map Content-length entity header to DAV:getcontentlength!
- // Only DAV resources have this property.
-
- // Map Content-Length entity header to UCP:Size
- OUString aValue;
- rValue >>= aValue;
-
- (*m_xProps)[ OUString("Size") ]
- = PropertyValue( uno::makeAny( aValue.toInt64() ), true );
- }
- else if ( rName == DAVProperties::GETCONTENTTYPE )
- {
- // Map DAV:getcontenttype to UCP:MediaType (1:1)
- (*m_xProps)[ OUString("MediaType") ]
- = PropertyValue( rValue, true );
- }
- else if ( rName.equalsIgnoreAsciiCase( "Content-Type" ) )
- {
- // Do NOT map Content-Type entity header to DAV:getcontenttype!
- // Only DAV resources have this property.
-
- // Map DAV:getcontenttype to UCP:MediaType (1:1)
- (*m_xProps)[ OUString("MediaType") ]
- = PropertyValue( rValue, true );
- }
- // else if ( rName.equals( DAVProperties::GETETAG ) )
- // {
- // }
- else if ( rName == DAVProperties::GETLASTMODIFIED )
- {
- // Map the DAV:getlastmodified entity header to UCP:DateModified
- OUString aValue;
- rValue >>= aValue;
- util::DateTime aDate;
- DateTimeHelper::convert( aValue, aDate );
-
- (*m_xProps)[ OUString("DateModified") ]
- = PropertyValue( uno::makeAny( aDate ), true );
- }
- else if ( rName.equalsIgnoreAsciiCase( "Last-Modified" ) )
- {
- // Do not map Last-Modified entity header to DAV:getlastmodified!
- // Only DAV resources have this property.
-
- // Map the Last-Modified entity header to UCP:DateModified
- OUString aValue;
- rValue >>= aValue;
- util::DateTime aDate;
- DateTimeHelper::convert( aValue, aDate );
-
- (*m_xProps)[ OUString("DateModified") ]
- = PropertyValue( uno::makeAny( aDate ), true );
- }
- // else if ( rName.equals( DAVProperties::LOCKDISCOVERY ) )
- // {
- // }
- else if ( rName == DAVProperties::RESOURCETYPE )
- {
- OUString aValue;
- rValue >>= aValue;
-
- // Map DAV:resourcetype to UCP:IsFolder, UCP:IsDocument, UCP:ContentType
- bool bFolder = aValue.equalsIgnoreAsciiCase( "collection" );
-
- (*m_xProps)[ OUString("IsFolder") ]
- = PropertyValue( uno::makeAny( bFolder ), true );
- (*m_xProps)[ OUString("IsDocument") ]
- = PropertyValue( uno::makeAny( !bFolder ), true );
- (*m_xProps)[ OUString("ContentType") ]
- = PropertyValue( uno::makeAny( bFolder
- ? OUString( WEBDAV_COLLECTION_TYPE )
- : OUString( WEBDAV_CONTENT_TYPE ) ), true );
- }
- // else if ( rName.equals( DAVProperties::SOURCE ) )
- // {
- // }
- // else if ( rName.equals( DAVProperties::SUPPORTEDLOCK ) )
- // {
- // }
-
- // Save property.
- (*m_xProps)[ rName ] = PropertyValue( rValue, bIsCaseSensitive );
-}
-
-
-// CachableContentProperties Implementation.
-
-
-namespace
-{
- bool isCachable( OUString const & rName,
- bool isCaseSensitive )
- {
- static const OUString aNonCachableProps [] =
- {
- DAVProperties::LOCKDISCOVERY,
-
- DAVProperties::GETETAG,
- OUString( "ETag" ),
-
- OUString( "DateModified" ),
- OUString( "Last-Modified" ),
- DAVProperties::GETLASTMODIFIED,
-
- OUString( "Size" ),
- OUString( "Content-Length" ),
- DAVProperties::GETCONTENTLENGTH,
-
- OUString( "Date" )
- };
-
- for (const auto & rNonCachableProp : aNonCachableProps)
- {
- if ( isCaseSensitive )
- {
- if ( rName == rNonCachableProp )
- return false;
- }
- else
- if ( rName.equalsIgnoreAsciiCase( rNonCachableProp ) )
- return false;
- }
- return true;
- }
-
-} // namespace
-
-
-CachableContentProperties::CachableContentProperties(
- const ContentProperties & rProps )
-{
- addProperties( rProps );
-}
-
-
-void CachableContentProperties::addProperties(
- const ContentProperties & rProps )
-{
- const std::unique_ptr< PropertyValueMap > & props = rProps.getProperties();
-
- for ( const auto& rProp : *props )
- {
- if ( isCachable( rProp.first, rProp.second.isCaseSensitive() ) )
- m_aProps.addProperty( rProp.first,
- rProp.second.value(),
- rProp.second.isCaseSensitive() );
- }
-}
-
-
-void CachableContentProperties::addProperties(
- const std::vector< DAVPropertyValue > & rProps )
-{
- for ( const auto& rProp : rProps )
- {
- if ( isCachable( rProp.Name, rProp.IsCaseSensitive ) )
- m_aProps.addProperty( rProp );
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/ContentProperties.hxx b/ucb/source/ucp/webdav-neon/ContentProperties.hxx
deleted file mode 100644
index 8f11e8726286..000000000000
--- a/ucb/source/ucp/webdav-neon/ContentProperties.hxx
+++ /dev/null
@@ -1,183 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#pragma once
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include "DAVResource.hxx"
-
-namespace com::sun::star::beans {
- struct Property;
-}
-
-namespace webdav_ucp
-{
-
-struct DAVResource;
-
-// PropertyValueMap.
-class PropertyValue
-{
-private:
- css::uno::Any m_aValue;
- bool m_bIsCaseSensitive;
-
-public:
- PropertyValue()
- : m_bIsCaseSensitive( true ) {}
-
- PropertyValue( const css::uno::Any & rValue,
- bool bIsCaseSensitive )
- : m_aValue( rValue),
- m_bIsCaseSensitive( bIsCaseSensitive ) {}
-
- bool isCaseSensitive() const { return m_bIsCaseSensitive; }
- const css::uno::Any & value() const { return m_aValue; }
-
-};
-
-typedef std::unordered_map< OUString, PropertyValue> PropertyValueMap;
-
-class ContentProperties
-{
-public:
- ContentProperties();
-
- explicit ContentProperties( const DAVResource& rResource );
-
- // Mini props for transient contents.
- ContentProperties( const OUString & rTitle, bool bFolder );
-
- // Micro props for non-existing contents.
- explicit ContentProperties( const OUString & rTitle );
-
- ContentProperties( const ContentProperties & rOther );
-
- bool contains( const OUString & rName ) const;
-
- const css::uno::Any &
- getValue( const OUString & rName ) const;
-
- // Maps the UCB property names contained in rProps with their DAV property
- // counterparts, if possible. All unmappable properties will be included
- // unchanged in resulting vector.
- // The vector filled by this method can directly be handed over to
- // DAVResourceAccess::PROPFIND. The result from PROPFIND
- // (vector< DAVResource >) can be used to create a ContentProperties
- // instance which can map DAV properties back to UCB properties.
- static void UCBNamesToDAVNames( const css::uno::Sequence< css::beans::Property > & rProps,
- std::vector< OUString > & resources );
-
- // Maps the UCB property names contained in rProps with their HTTP header
- // counterparts, if possible. All unmappable properties will be included
- // unchanged in resulting vector.
- // The vector filled by this method can directly be handed over to
- // DAVResourceAccess::HEAD. The result from HEAD (vector< DAVResource >)
- // can be used to create a ContentProperties instance which can map header
- // names back to UCB properties.
- static void UCBNamesToHTTPNames( const css::uno::Sequence< css::beans::Property > & rProps,
- std::vector< OUString > & resources );
-
- // return true, if all properties contained in rProps are contained in
- // this ContentProperties instance. Otherwise, false will be returned.
- // rNamesNotContained contain the missing names.
- bool containsAllNames(
- const css::uno::Sequence< css::beans::Property >& rProps,
- std::vector< OUString > & rNamesNotContained ) const;
-
- // adds all properties described by rProps that are actually contained in
- // rContentProps to this instance. In case of duplicates the value
- // already contained in this will left unchanged.
- void addProperties( const std::vector< OUString > & rProps,
- const ContentProperties & rContentProps );
-
- // overwrites probably existing entry.
- void addProperty( const OUString & rName,
- const css::uno::Any & rValue,
- bool bIsCaseSensitive );
-
- // overwrites probably existing entry.
- void addProperty( const DAVPropertyValue & rProp );
-
- bool isTrailingSlash() const { return m_bTrailingSlash; }
-
- const OUString & getEscapedTitle() const { return m_aEscapedTitle; }
-
- // Not good to expose implementation details, but this is actually an
- // internal class.
- const std::unique_ptr< PropertyValueMap > & getProperties() const
- { return m_xProps; }
-
-private:
- OUString m_aEscapedTitle;
- std::unique_ptr< PropertyValueMap > m_xProps;
- bool m_bTrailingSlash;
-
- static css::uno::Any m_aEmptyAny;
-
- ContentProperties & operator=( const ContentProperties & ) = delete;
-
- const PropertyValue * get( const OUString & rName ) const;
-};
-
-class CachableContentProperties
-{
-private:
- ContentProperties m_aProps;
-
- CachableContentProperties & operator=( const CachableContentProperties & ) = delete;
- CachableContentProperties( const CachableContentProperties & ) = delete;
-
-public:
- explicit CachableContentProperties( const ContentProperties & rProps );
-
- void addProperties( const ContentProperties & rProps );
-
- void addProperties( const std::vector< DAVPropertyValue > & rProps );
-
- bool containsAllNames(
- const css::uno::Sequence< css::beans::Property >& rProps,
- std::vector< OUString > & rNamesNotContained ) const
- { return m_aProps.containsAllNames( rProps, rNamesNotContained ); }
-
- const css::uno::Any &
- getValue( const OUString & rName ) const
- { return m_aProps.getValue( rName ); }
-
- operator const ContentProperties & () const { return m_aProps; }
-};
-
-} // namespace webdav_ucp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/DAVAuthListener.hxx b/ucb/source/ucp/webdav-neon/DAVAuthListener.hxx
deleted file mode 100644
index 540ac788ca16..000000000000
--- a/ucb/source/ucp/webdav-neon/DAVAuthListener.hxx
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#pragma once
-
-#include
-#include
-#include
-
-namespace webdav_ucp
-{
-
-class DAVAuthListener : public salhelper::SimpleReferenceObject
-{
- public:
- virtual int authenticate(
- const OUString & inRealm,
- const OUString & inHostName,
- OUString & inoutUserName,
- OUString & outPassWord,
- bool bCanUseSystemCredentials ) = 0;
-};
-
-} // namespace webdav_ucp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/DAVAuthListenerImpl.hxx b/ucb/source/ucp/webdav-neon/DAVAuthListenerImpl.hxx
deleted file mode 100644
index b3d2a8ad601f..000000000000
--- a/ucb/source/ucp/webdav-neon/DAVAuthListenerImpl.hxx
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#pragma once
-
-#include
-#include
-#include "DAVAuthListener.hxx"
-
-
-namespace webdav_ucp
-{
-
-
-
-
- class DAVAuthListener_Impl : public DAVAuthListener
- {
- public:
-
- DAVAuthListener_Impl(
- const css::uno::Reference< css::ucb::XCommandEnvironment>& xEnv,
- const OUString & inURL )
- : m_xEnv( xEnv ), m_aURL( inURL )
- {
- }
-
- virtual int authenticate( const OUString & inRealm,
- const OUString & inHostName,
- OUString & inoutUserName,
- OUString & outPassWord,
- bool bCanUseSystemCredentials ) override;
- private:
-
- const css::uno::Reference< css::ucb::XCommandEnvironment > m_xEnv;
- const OUString m_aURL;
-
- OUString m_aPrevPassword;
- OUString m_aPrevUsername;
- };
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/DAVException.hxx b/ucb/source/ucp/webdav-neon/DAVException.hxx
deleted file mode 100644
index 4fdcac3f4f8e..000000000000
--- a/ucb/source/ucp/webdav-neon/DAVException.hxx
+++ /dev/null
@@ -1,174 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#pragma once
-
-#include
-#include
-
-namespace webdav_ucp
-{
-
-
-// HTTP/WebDAV status codes
-
-
-const sal_uInt16 SC_NONE = 0;
-
-// 1xx (Informational - no errors)
-const sal_uInt16 SC_CONTINUE = 100;
-const sal_uInt16 SC_SWITCHING_PROTOCOLS = 101;
-// DAV extensions
-const sal_uInt16 SC_PROCESSING = 102;
-
-//2xx (Successful - no errors)
-const sal_uInt16 SC_OK = 200;
-const sal_uInt16 SC_CREATED = 201;
-const sal_uInt16 SC_ACCEPTED = 202;
-const sal_uInt16 SC_NON_AUTHORITATIVE_INFORMATION = 203;
-const sal_uInt16 SC_NO_CONTENT = 204;
-const sal_uInt16 SC_RESET_CONTENT = 205;
-const sal_uInt16 SC_PARTIAL_CONTENT = 206;
-// DAV extensions
-const sal_uInt16 SC_MULTISTATUS = 207;
-
-//3xx (Redirection)
-const sal_uInt16 SC_MULTIPLE_CHOICES = 300;
-const sal_uInt16 SC_MOVED_PERMANENTLY = 301;
-const sal_uInt16 SC_MOVED_TEMPORARILY = 302;
-const sal_uInt16 SC_SEE_OTHER = 303;
-const sal_uInt16 SC_NOT_MODIFIED = 304;
-const sal_uInt16 SC_USE_PROXY = 305;
-const sal_uInt16 SC_TEMPORARY_REDIRECT = 307;
-
-//4xx (Client error)
-const sal_uInt16 SC_BAD_REQUEST = 400;
-const sal_uInt16 SC_UNAUTHORIZED = 401;
-const sal_uInt16 SC_PAYMENT_REQUIRED = 402;
-const sal_uInt16 SC_FORBIDDEN = 403;
-const sal_uInt16 SC_NOT_FOUND = 404;
-const sal_uInt16 SC_METHOD_NOT_ALLOWED = 405;
-const sal_uInt16 SC_NOT_ACCEPTABLE = 406;
-const sal_uInt16 SC_PROXY_AUTHENTICATION_REQUIRED = 407;
-const sal_uInt16 SC_REQUEST_TIMEOUT = 408;
-const sal_uInt16 SC_CONFLICT = 409;
-const sal_uInt16 SC_GONE = 410;
-const sal_uInt16 SC_LENGTH_REQUIRED = 411;
-const sal_uInt16 SC_PRECONDITION_FAILED = 412;
-const sal_uInt16 SC_REQUEST_ENTITY_TOO_LARGE = 413;
-const sal_uInt16 SC_REQUEST_URI_TOO_LONG = 414;
-const sal_uInt16 SC_UNSUPPORTED_MEDIA_TYPE = 415;
-const sal_uInt16 SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
-const sal_uInt16 SC_EXPECTATION_FAILED = 417;
-// DAV extensions
-const sal_uInt16 SC_UNPROCESSABLE_ENTITY = 422;
-const sal_uInt16 SC_LOCKED = 423;
-const sal_uInt16 SC_FAILED_DEPENDENCY = 424;
-
-//5xx (Server error, general )
-const sal_uInt16 SC_INTERNAL_SERVER_ERROR = 500;
-const sal_uInt16 SC_NOT_IMPLEMENTED = 501;
-const sal_uInt16 SC_BAD_GATEWAY = 502;
-const sal_uInt16 SC_SERVICE_UNAVAILABLE = 503;
-const sal_uInt16 SC_GATEWAY_TIMEOUT = 504;
-const sal_uInt16 SC_HTTP_VERSION_NOT_SUPPORTED = 505;
-// DAV extensions ()
-const sal_uInt16 SC_INSUFFICIENT_STORAGE = 507;
-
-// unofficial status codes only used internally by LO
-// used to cache the connection time out event
-const sal_uInt16 USC_CONNECTION_TIMED_OUT = 908;
- // name resolution failed
-const sal_uInt16 USC_LOOKUP_FAILED = 909;
-const sal_uInt16 USC_AUTH_FAILED = 910;
-const sal_uInt16 USC_AUTHPROXY_FAILED = 911;
-
-
-
-class DAVException : public std::exception
-{
- public:
- enum ExceptionCode {
- DAV_HTTP_ERROR = 0, // Generic error,
- // mData = server error message,
- // mStatusCode = HTTP status code
- DAV_HTTP_LOOKUP, // Name lookup failed,
- // mData = server[:port]
- DAV_HTTP_AUTH, // User authentication failed on server,
- // mData = server[:port]
- DAV_HTTP_AUTHPROXY, // User authentication failed on proxy,
- // mData = proxy server[:port]
- DAV_HTTP_CONNECT, // Could not connect to server,
- // mData = server[:port]
- DAV_HTTP_TIMEOUT, // Connection timed out
- // mData = server[:port]
- DAV_HTTP_FAILED, // The precondition failed
- // mData = server[:port]
- DAV_HTTP_RETRY, // Retry request
- // mData = server[:port]
- DAV_HTTP_REDIRECT, // Request was redirected,
- // mData = new URL
- DAV_SESSION_CREATE, // session creation error,
- // mData = server[:port]
- DAV_INVALID_ARG, // invalid argument
-
- DAV_LOCK_EXPIRED, // DAV lock expired
-
- DAV_NOT_LOCKED, // not locked
-
- DAV_LOCKED_SELF, // locked by this OOo session
-
- DAV_LOCKED // locked by third party
- };
-
- private:
- ExceptionCode mExceptionCode;
- OUString mData;
- sal_uInt16 mStatusCode;
-
- public:
- explicit DAVException( ExceptionCode inExceptionCode ) :
- mExceptionCode( inExceptionCode ), mStatusCode( SC_NONE ) {};
- DAVException( ExceptionCode inExceptionCode,
- const OUString & rData ) :
- mExceptionCode( inExceptionCode ), mData( rData ),
- mStatusCode( SC_NONE ) {};
- DAVException( ExceptionCode inExceptionCode,
- const OUString & rData,
- sal_uInt16 nStatusCode ) :
- mExceptionCode( inExceptionCode ), mData( rData ),
- mStatusCode( nStatusCode ) {};
-
- const ExceptionCode & getError() const { return mExceptionCode; }
- const OUString & getData() const { return mData; }
- sal_uInt16 getStatus() const { return mStatusCode; }
-};
-
-} // namespace webdav_ucp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/DAVProperties.cxx b/ucb/source/ucp/webdav-neon/DAVProperties.cxx
deleted file mode 100644
index b1a4a0273ef8..000000000000
--- a/ucb/source/ucp/webdav-neon/DAVProperties.cxx
+++ /dev/null
@@ -1,193 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include
-
-#include
-
-#include "DAVProperties.hxx"
-
-using namespace webdav_ucp;
-
-void DAVProperties::createNeonPropName( std::u16string_view rFullName,
- NeonPropName & rName )
-{
- if ( o3tl::starts_with( rFullName, u"DAV:" ) )
- {
- rName.nspace = "DAV:";
- rName.name
- = strdup( OUStringToOString(
- rFullName.substr( RTL_CONSTASCII_LENGTH( "DAV:" ) ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
- }
- else if ( o3tl::starts_with( rFullName, u"http://apache.org/dav/props/" ) )
- {
- rName.nspace = "http://apache.org/dav/props/";
- rName.name
- = strdup( OUStringToOString(
- rFullName.substr(
- RTL_CONSTASCII_LENGTH(
- "http://apache.org/dav/props/" ) ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
- }
- else if ( o3tl::starts_with( rFullName, u"http://ucb.openoffice.org/dav/props/" ) )
- {
- rName.nspace = "http://ucb.openoffice.org/dav/props/";
- rName.name
- = strdup( OUStringToOString(
- rFullName.substr(
- RTL_CONSTASCII_LENGTH(
- "http://ucb.openoffice.org/dav/props/" ) ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
- }
- else if ( o3tl::starts_with( rFullName, u"
-
- sal_Int32 nStart = RTL_CONSTASCII_LENGTH( "" ) - nStart;
- rName.nspace = strdup( aFullName.copy( nStart, nLen ).getStr() );
- }
- else
- {
- // Add our namespace to our own properties.
- rName.nspace = "http://ucb.openoffice.org/dav/props/";
- rName.name
- = strdup( OUStringToOString( rFullName,
- RTL_TEXTENCODING_UTF8 ).getStr() );
- }
-}
-
-void DAVProperties::createUCBPropName( const char * nspace,
- const char * name,
- OUString & rFullName )
-{
- OUString aNameSpace
- = OStringToOUString( nspace, RTL_TEXTENCODING_UTF8 );
- OUString aName
- = OStringToOUString( name, RTL_TEXTENCODING_UTF8 );
-
- if ( aNameSpace.isEmpty() )
- {
- // Some servers send XML without proper namespaces. Assume "DAV:"
- // in this case, if name is a well-known dav property name.
- // Although this is not 100% correct, it solves many problems.
- if ( o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::RESOURCETYPE).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::RESOURCETYPE).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::SUPPORTEDLOCK).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::LOCKDISCOVERY).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::CREATIONDATE).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::DISPLAYNAME).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::GETCONTENTLANGUAGE).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::GETCONTENTLENGTH).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::GETCONTENTTYPE).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::GETETAG).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::GETLASTMODIFIED).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::SOURCE).substr(4)) )
- aNameSpace = "DAV:";
- }
-
- // Note: Concatenating strings BEFORE comparing against known namespaces
- // is important. See RFC 2815 ( 23.4.2 Meaning of Qualified Names ).
- rFullName = aNameSpace;
- rFullName += aName;
-
- if ( rFullName.startsWith( "DAV:" ) )
- {
- // Okay, Just concat strings.
- }
- else if ( rFullName.startsWith( "http://apache.org/dav/props/" ) )
- {
- // Okay, Just concat strings.
- }
- else if ( rFullName.startsWith( "http://ucb.openoffice.org/dav/props/" ) )
- {
- // Remove namespace from our own properties.
- rFullName = rFullName.copy(
- RTL_CONSTASCII_LENGTH(
- "http://ucb.openoffice.org/dav/props/" ) );
- }
- else
- {
- // Create property name that encodes, namespace and name ( XML ).
- rFullName = "";
- }
-}
-
-bool DAVProperties::isUCBDeadProperty( const NeonPropName & rName )
-{
- return ( rName.nspace &&
- ( rtl_str_compareIgnoreAsciiCase(
- rName.nspace, "http://ucb.openoffice.org/dav/props/" )
- == 0 ) );
-}
-
-bool DAVProperties::isUCBSpecialProperty(
- const OUString& rFullName, OUString& rParsedName)
-{
- if ( !rFullName.startsWith( "" ) )
- return false;
-
- sal_Int32 nStart = strlen( "" ) )
- || nEnd == nStart )
- {
- return false;
- }
-
- rParsedName = rFullName.copy( nStart, nEnd - nStart );
- if ( !rParsedName.endsWith( "/" ) )
- rParsedName += "/";
- rParsedName += sPropName;
-
- return rParsedName.getLength();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/DAVProperties.hxx b/ucb/source/ucp/webdav-neon/DAVProperties.hxx
deleted file mode 100644
index 3eeddcb847e1..000000000000
--- a/ucb/source/ucp/webdav-neon/DAVProperties.hxx
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#pragma once
-
-#include
-
-#include
-
-#include
-#include
-#include "NeonTypes.hxx"
-
-namespace webdav_ucp
-{
-
-struct DAVProperties
-{
- static constexpr OUStringLiteral CREATIONDATE = u"DAV:creationdate";
- static constexpr OUStringLiteral DISPLAYNAME = u"DAV:displayname";
- static constexpr OUStringLiteral GETCONTENTLANGUAGE = u"DAV:getcontentlanguage";
- static constexpr OUStringLiteral GETCONTENTLENGTH = u"DAV:getcontentlength";
- static constexpr OUStringLiteral GETCONTENTTYPE = u"DAV:getcontenttype";
- static constexpr OUStringLiteral GETETAG = u"DAV:getetag";
- static constexpr OUStringLiteral GETLASTMODIFIED = u"DAV:getlastmodified";
- static constexpr OUStringLiteral LOCKDISCOVERY = u"DAV:lockdiscovery";
- static constexpr OUStringLiteral RESOURCETYPE = u"DAV:resourcetype";
- static constexpr OUStringLiteral SOURCE = u"DAV:source";
- static constexpr OUStringLiteral SUPPORTEDLOCK = u"DAV:supportedlock";
- static constexpr OUStringLiteral EXECUTABLE = u"http://apache.org/dav/props/executable";
-
- static void createNeonPropName( std::u16string_view rFullName,
- NeonPropName & rName );
- static void createUCBPropName ( const char * nspace,
- const char * name,
- OUString & rFullName );
-
- static bool isUCBDeadProperty( const NeonPropName & rName );
- static bool isUCBSpecialProperty( const OUString & rFullName,
- OUString & rParsedName );
-};
-
-} // namespace webdav_ucp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/DAVRequestEnvironment.hxx b/ucb/source/ucp/webdav-neon/DAVRequestEnvironment.hxx
deleted file mode 100644
index 9059f6162804..000000000000
--- a/ucb/source/ucp/webdav-neon/DAVRequestEnvironment.hxx
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#pragma once
-
-#include
-#include
-#include
-#include
-#include "DAVAuthListener.hxx"
-
-namespace webdav_ucp
-{
- typedef std::pair< OUString, OUString > DAVRequestHeader;
- typedef std::vector< DAVRequestHeader > DAVRequestHeaders;
-
-struct DAVRequestEnvironment
-{
- OUString m_aRequestURI;
- rtl::Reference< DAVAuthListener > m_xAuthListener;
-// rtl::Reference< DAVStatusListener > m_xStatusListener;
-// rtl::Reference< DAVProgressListener > m_xStatusListener;
- DAVRequestHeaders m_aRequestHeaders;
- uno::Reference< ucb::XCommandEnvironment > m_xEnv;
-
-DAVRequestEnvironment( const OUString & rRequestURI,
- const rtl::Reference< DAVAuthListener > & xListener,
- DAVRequestHeaders && rRequestHeaders,
- const uno::Reference< ucb::XCommandEnvironment > & xEnv)
- : m_aRequestURI( rRequestURI ),
- m_xAuthListener( xListener ),
- m_aRequestHeaders( std::move(rRequestHeaders) ),
- m_xEnv( xEnv ){}
-
- DAVRequestEnvironment() {}
-};
-
-} // namespace webdav_ucp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/DAVResource.hxx b/ucb/source/ucp/webdav-neon/DAVResource.hxx
deleted file mode 100644
index d26206de71e0..000000000000
--- a/ucb/source/ucp/webdav-neon/DAVResource.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#pragma once
-
-#include
-#include
-
-#include
-#include
-
-namespace webdav_ucp
-{
-
-struct DAVPropertyValue
-{
- OUString Name;
- css::uno::Any Value;
- bool IsCaseSensitive;
-
- DAVPropertyValue() : IsCaseSensitive( true ) {}
-};
-
-struct DAVResource
-{
- OUString uri;
- std::vector< DAVPropertyValue > properties;
-
- DAVResource() {}
- explicit DAVResource( const OUString & inUri ) : uri( inUri ) {}
-};
-
-struct DAVResourceInfo
-{
- std::vector < OUString > properties;
-
- bool operator==( const struct DAVResourceInfo& a ) const
- {
- return (properties == a.properties );
- }
-};
-
-} // namespace webdav_ucp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx b/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx
deleted file mode 100644
index b13edc253c0c..000000000000
--- a/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx
+++ /dev/null
@@ -1,1192 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include
-#include
-#include
-#include
-
-#include
-#include
-
-#include "DAVAuthListenerImpl.hxx"
-#include "DAVResourceAccess.hxx"
-
-using namespace webdav_ucp;
-using namespace com::sun::star;
-
-
-// DAVAuthListener_Impl Implementation.
-
-constexpr sal_uInt32 g_nRedirectLimit = 5;
-
-// virtual
-int DAVAuthListener_Impl::authenticate(
- const OUString & inRealm,
- const OUString & inHostName,
- OUString & inoutUserName,
- OUString & outPassWord,
- bool bCanUseSystemCredentials )
-{
- if ( m_xEnv.is() )
- {
- uno::Reference< task::XInteractionHandler > xIH
- = m_xEnv->getInteractionHandler();
-
- if ( xIH.is() )
- {
- // #102871# - Supply username and password from previous try.
- // Password container service depends on this!
- if ( inoutUserName.isEmpty() )
- inoutUserName = m_aPrevUsername;
-
- if ( outPassWord.isEmpty() )
- outPassWord = m_aPrevPassword;
-
- rtl::Reference< ucbhelper::SimpleAuthenticationRequest > xRequest
- = new ucbhelper::SimpleAuthenticationRequest(
- m_aURL, inHostName, inRealm, inoutUserName,
- outPassWord, bCanUseSystemCredentials );
- xIH->handle( xRequest );
-
- rtl::Reference< ucbhelper::InteractionContinuation > xSelection
- = xRequest->getSelection();
-
- if ( xSelection.is() )
- {
- // Handler handled the request.
- uno::Reference< task::XInteractionAbort > xAbort(
- xSelection.get(), uno::UNO_QUERY );
- if ( !xAbort.is() )
- {
- const rtl::Reference<
- ucbhelper::InteractionSupplyAuthentication > & xSupp
- = xRequest->getAuthenticationSupplier();
-
- bool bUseSystemCredentials = false;
-
- if ( bCanUseSystemCredentials )
- bUseSystemCredentials
- = xSupp->getUseSystemCredentials();
-
- if ( bUseSystemCredentials )
- {
- // This is the (strange) way to tell neon to use
- // system credentials.
- inoutUserName.clear();
- outPassWord.clear();
- }
- else
- {
- inoutUserName = xSupp->getUserName();
- outPassWord = xSupp->getPassword();
- }
-
- // #102871# - Remember username and password.
- m_aPrevUsername = inoutUserName;
- m_aPrevPassword = outPassWord;
-
- // go on.
- return 0;
- }
- }
- }
- }
- // Abort.
- return -1;
-}
-
-
-// DAVResourceAccess Implementation.
-
-
-DAVResourceAccess::DAVResourceAccess(
- const uno::Reference< uno::XComponentContext > & rxContext,
- rtl::Reference< DAVSessionFactory > const & rSessionFactory,
- const OUString & rURL )
-: m_aURL( rURL ),
- m_xSessionFactory( rSessionFactory ),
- m_xContext( rxContext )
-{
-}
-
-
-DAVResourceAccess::DAVResourceAccess( const DAVResourceAccess & rOther )
-: m_aURL( rOther.m_aURL ),
- m_aPath( rOther.m_aPath ),
- m_aFlags( rOther.m_aFlags ),
- m_xSession( rOther.m_xSession ),
- m_xSessionFactory( rOther.m_xSessionFactory ),
- m_xContext( rOther.m_xContext ),
- m_aRedirectURIs( rOther.m_aRedirectURIs )
-{
-}
-
-
-DAVResourceAccess & DAVResourceAccess::operator=(
- const DAVResourceAccess & rOther )
-{
- m_aURL = rOther.m_aURL;
- m_aPath = rOther.m_aPath;
- m_aFlags = rOther.m_aFlags;
- m_xSession = rOther.m_xSession;
- m_xSessionFactory = rOther.m_xSessionFactory;
- m_xContext = rOther.m_xContext;
- m_aRedirectURIs = rOther.m_aRedirectURIs;
-
- return *this;
-}
-
-void DAVResourceAccess::OPTIONS(
- DAVOptions & rOptions,
- const css::uno::Reference<
- css::ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
-
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- css::ucb::WebDAVHTTPMethod_OPTIONS,
- aHeaders );
-
- m_xSession->OPTIONS( getRequestURI(),
- rOptions,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-void DAVResourceAccess::PROPFIND(
- const Depth nDepth,
- const std::vector< OUString > & rPropertyNames,
- std::vector< DAVResource > & rResources,
- const uno::Reference< ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
-
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_PROPFIND,
- aHeaders );
-
- m_xSession->PROPFIND( getRequestURI(),
- nDepth,
- rPropertyNames,
- rResources,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-
-void DAVResourceAccess::PROPFIND(
- const Depth nDepth,
- std::vector< DAVResourceInfo > & rResInfo,
- const uno::Reference< ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_PROPFIND,
- aHeaders );
-
- m_xSession->PROPFIND( getRequestURI(),
- nDepth,
- rResInfo,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) ) ;
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-
-void DAVResourceAccess::PROPPATCH(
- const std::vector< ProppatchValue >& rValues,
- const uno::Reference< ucb::XCommandEnvironment >& xEnv )
-{
- initialize();
-
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_PROPPATCH,
- aHeaders );
-
- m_xSession->PROPPATCH( getRequestURI(),
- rValues,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-
-void DAVResourceAccess::HEAD(
- const std::vector< OUString > & rHeaderNames,
- DAVResource & rResource,
- const uno::Reference< ucb::XCommandEnvironment >& xEnv )
-{
- initialize();
-
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_HEAD,
- aHeaders );
-
- m_xSession->HEAD( getRequestURI(),
- rHeaderNames,
- rResource,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-
-uno::Reference< io::XInputStream > DAVResourceAccess::GET(
- const uno::Reference< ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- uno::Reference< io::XInputStream > xStream;
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_GET,
- aHeaders );
-
- xStream = m_xSession->GET( getRequestURI(),
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl(
- xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-
- return xStream;
-}
-
-
-void DAVResourceAccess::GET(
- uno::Reference< io::XOutputStream > & rStream,
- const uno::Reference< ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_GET,
- aHeaders );
-
- m_xSession->GET( getRequestURI(),
- rStream,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-uno::Reference< io::XInputStream > DAVResourceAccess::GET(
- const std::vector< OUString > & rHeaderNames,
- DAVResource & rResource,
- const uno::Reference< ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- uno::Reference< io::XInputStream > xStream;
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_GET,
- aHeaders );
-
- xStream = m_xSession->GET( getRequestURI(),
- rHeaderNames,
- rResource,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl(
- xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-
- return xStream;
-}
-
-// used as HEAD substitute when HEAD is not implemented on server
-void DAVResourceAccess::GET0(
- DAVRequestHeaders &rRequestHeaders,
- const std::vector< OUString > & rHeaderNames,
- DAVResource & rResource,
- const uno::Reference< ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_GET,
- rRequestHeaders );
-
- m_xSession->GET0( getRequestURI(),
- rHeaderNames,
- rResource,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl(
- xEnv, m_aURL ),
- DAVRequestHeaders(rRequestHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-
-void DAVResourceAccess::GET(
- uno::Reference< io::XOutputStream > & rStream,
- const std::vector< OUString > & rHeaderNames,
- DAVResource & rResource,
- const uno::Reference< ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- bool bRetry;
- int errorCount = 0;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_GET,
- aHeaders );
-
- m_xSession->GET( getRequestURI(),
- rStream,
- rHeaderNames,
- rResource,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-
-void DAVResourceAccess::abort()
-{
- initialize();
- m_xSession->abort();
-}
-
-
-namespace {
-
- /// @throws DAVException
- void resetInputStream( const uno::Reference< io::XInputStream > & rStream )
- {
- try
- {
- uno::Reference< io::XSeekable > xSeekable(
- rStream, uno::UNO_QUERY );
- if ( xSeekable.is() )
- {
- xSeekable->seek( 0 );
- return;
- }
- }
- catch ( lang::IllegalArgumentException const & )
- {
- }
- catch ( io::IOException const & )
- {
- }
-
- throw DAVException( DAVException::DAV_INVALID_ARG );
- }
-
-} // namespace
-
-
-void DAVResourceAccess::PUT(
- const uno::Reference< io::XInputStream > & rStream,
- const uno::Reference< ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- // Make stream seekable, if it not. Needed, if request must be retried.
- uno::Reference< io::XInputStream > xSeekableStream
- = comphelper::OSeekableInputWrapper::CheckSeekableCanWrap(
- rStream, m_xContext );
-
- int errorCount = 0;
- bool bRetry = false;
- do
- {
- if ( bRetry )
- resetInputStream( xSeekableStream );
-
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_PUT,
- aHeaders );
-
- m_xSession->PUT( getRequestURI(),
- xSeekableStream,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-
-uno::Reference< io::XInputStream > DAVResourceAccess::POST(
- const OUString & rContentType,
- const OUString & rReferer,
- const uno::Reference< io::XInputStream > & rInputStream,
- const uno::Reference< ucb::XCommandEnvironment >& xEnv )
-{
- initialize();
-
- // Make stream seekable, if it not. Needed, if request must be retried.
- uno::Reference< io::XInputStream > xSeekableStream
- = comphelper::OSeekableInputWrapper::CheckSeekableCanWrap(
- rInputStream, m_xContext );
-
- uno::Reference< io::XInputStream > xStream;
- int errorCount = 0;
- bool bRetry = false;
- do
- {
- if ( bRetry )
- {
- resetInputStream( xSeekableStream );
- bRetry = false;
- }
-
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_POST,
- aHeaders );
-
- xStream = m_xSession->POST( getRequestURI(),
- rContentType,
- rReferer,
- xSeekableStream,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl(
- xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
-
- if ( e.getError() == DAVException::DAV_HTTP_REDIRECT )
- {
- // #i74980# - Upon POST redirect, do a GET.
- return GET( xEnv );
- }
- }
- }
- while ( bRetry );
-
- return xStream;
-}
-
-
-void DAVResourceAccess::POST(
- const OUString & rContentType,
- const OUString & rReferer,
- const uno::Reference< io::XInputStream > & rInputStream,
- uno::Reference< io::XOutputStream > & rOutputStream,
- const uno::Reference< ucb::XCommandEnvironment >& xEnv )
-{
- initialize();
-
- // Make stream seekable, if it not. Needed, if request must be retried.
- uno::Reference< io::XInputStream > xSeekableStream
- = comphelper::OSeekableInputWrapper::CheckSeekableCanWrap(
- rInputStream, m_xContext );
-
- int errorCount = 0;
- bool bRetry = false;
- do
- {
- if ( bRetry )
- {
- resetInputStream( xSeekableStream );
- bRetry = false;
- }
-
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_POST,
- aHeaders );
-
- m_xSession->POST( getRequestURI(),
- rContentType,
- rReferer,
- xSeekableStream,
- rOutputStream,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
-
- if ( e.getError() == DAVException::DAV_HTTP_REDIRECT )
- {
- // #i74980# - Upon POST redirect, do a GET.
- GET( rOutputStream, xEnv );
- return;
- }
- }
- }
- while ( bRetry );
-}
-
-
-void DAVResourceAccess::MKCOL(
- const uno::Reference< ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_MKCOL,
- aHeaders );
-
- m_xSession->MKCOL( getRequestURI(),
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-
-void DAVResourceAccess::COPY(
- const OUString & rSourcePath,
- const OUString & rDestinationURI,
- bool bOverwrite,
- const uno::Reference< ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_COPY,
- aHeaders );
-
- m_xSession->COPY( rSourcePath,
- rDestinationURI,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ),
- bOverwrite );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-
-void DAVResourceAccess::MOVE(
- const OUString & rSourcePath,
- const OUString & rDestinationURI,
- bool bOverwrite,
- const uno::Reference< ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_MOVE,
- aHeaders );
-
- m_xSession->MOVE( rSourcePath,
- rDestinationURI,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ),
- bOverwrite );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-
-void DAVResourceAccess::DESTROY(
- const uno::Reference< ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_DELETE,
- aHeaders );
-
- m_xSession->DESTROY( getRequestURI(),
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-
-// set new lock.
-void DAVResourceAccess::LOCK(
- ucb::Lock & inLock,
- const uno::Reference< ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_LOCK,
- aHeaders );
-
- m_xSession->LOCK( getRequestURI(),
- inLock,
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-void DAVResourceAccess::UNLOCK(
- const uno::Reference< ucb::XCommandEnvironment > & xEnv )
-{
- initialize();
-
- int errorCount = 0;
- bool bRetry;
- do
- {
- bRetry = false;
- try
- {
- DAVRequestHeaders aHeaders;
- getUserRequestHeaders( xEnv,
- getRequestURI(),
- ucb::WebDAVHTTPMethod_UNLOCK,
- aHeaders );
-
- m_xSession->UNLOCK( getRequestURI(),
- DAVRequestEnvironment(
- getRequestURI(),
- new DAVAuthListener_Impl( xEnv, m_aURL ),
- std::move(aHeaders), xEnv ) );
- }
- catch ( const DAVException & e )
- {
- errorCount++;
- bRetry = handleException( e, errorCount );
- if ( !bRetry )
- throw;
- }
- }
- while ( bRetry );
-}
-
-
-void DAVResourceAccess::setFlags( const uno::Sequence< beans::NamedValue >& rFlags )
-{
- osl::Guard< osl::Mutex > aGuard( m_aMutex );
- m_aFlags = rFlags;
-}
-
-
-void DAVResourceAccess::setURL( const OUString & rNewURL )
-{
- osl::Guard< osl::Mutex > aGuard( m_aMutex );
- m_aURL = rNewURL;
- m_aPath.clear(); // Next initialize() will create new session.
-}
-
-
-// init dav session and path
-void DAVResourceAccess::initialize()
-{
- osl::Guard< osl::Mutex > aGuard( m_aMutex );
- if ( !m_aPath.isEmpty() )
- return;
-
- NeonUri aURI( m_aURL );
- const OUString& aPath( aURI.GetPath() );
-
- /* #134089# - Check URI */
- if ( aPath.isEmpty() )
- throw DAVException( DAVException::DAV_INVALID_ARG );
-
- /* #134089# - Check URI */
- if ( aURI.GetHost().isEmpty() )
- throw DAVException( DAVException::DAV_INVALID_ARG );
-
- if ( !m_xSession.is() || !m_xSession->CanUse( m_aURL, m_aFlags ) )
- {
- m_xSession.clear();
-
- // create new webdav session
- m_xSession
- = m_xSessionFactory->createDAVSession( m_aURL, m_aFlags, m_xContext );
-
- if ( !m_xSession.is() )
- return;
- }
-
- // Own URI is needed to redirect cycle detection.
- m_aRedirectURIs.push_back( aURI );
-
- // Success.
- m_aPath = aPath;
-
- // Not only the path has to be encoded
- m_aURL = aURI.GetURI();
-}
-
-
-const OUString & DAVResourceAccess::getRequestURI() const
-{
- assert( m_xSession.is() && "DAVResourceAccess::getRequestURI - Not initialized!" );
-
- // In case a proxy is used we have to use the absolute URI for a request.
- if ( m_xSession->UsesProxy() )
- return m_aURL;
-
- return m_aPath;
-}
-
-
-// static
-void DAVResourceAccess::getUserRequestHeaders(
- const uno::Reference< ucb::XCommandEnvironment > & xEnv,
- const OUString & rURI,
- ucb::WebDAVHTTPMethod eMethod,
- DAVRequestHeaders & rRequestHeaders )
-{
- if ( xEnv.is() )
- {
- uno::Reference< ucb::XWebDAVCommandEnvironment > xDAVEnv(
- xEnv, uno::UNO_QUERY );
-
- if ( xDAVEnv.is() )
- {
- const uno::Sequence< beans::StringPair > aRequestHeaders
- = xDAVEnv->getUserRequestHeaders( rURI, eMethod );
-
- for ( const auto& rRequestHeader : aRequestHeaders )
- {
- rRequestHeaders.emplace_back(
- rRequestHeader.First,
- rRequestHeader.Second );
- }
- }
- }
-
- // Make sure a User-Agent header is always included, as at least
- // en.wikipedia.org:80 forces back 403 "Scripts should use an informative
- // User-Agent string with contact information, or they may be IP-blocked
- // without notice" otherwise:
- if ( std::any_of(rRequestHeaders.begin(), rRequestHeaders.end(),
- [](const DAVRequestHeader& rHeader) { return rHeader.first.equalsIgnoreAsciiCase( "User-Agent" ); }) )
- {
- return;
- }
- rRequestHeaders.emplace_back( "User-Agent", "LibreOffice" );
-}
-
-// This function member implements the control on cyclical redirections
-bool DAVResourceAccess::detectRedirectCycle(
- const OUString& rRedirectURL )
-{
- osl::Guard< osl::Mutex > aGuard( m_aMutex );
-
- NeonUri aUri( rRedirectURL );
-
- // Check for maximum number of redirections
- // according to .
- // A practical limit may be 5, due to earlier specifications:
- //
- // it can be raised keeping in mind the added net activity.
- if( static_cast< size_t >( g_nRedirectLimit ) <= m_aRedirectURIs.size() )
- return true;
-
- // try to detect a cyclical redirection
- return std::any_of(m_aRedirectURIs.begin(), m_aRedirectURIs.end(),
- [&aUri](const NeonUri& rUri) {
- // if equal, cyclical redirection detected
- return aUri == rUri; });
-}
-
-
-void DAVResourceAccess::resetUri()
-{
- osl::Guard< osl::Mutex > aGuard( m_aMutex );
- if ( !m_aRedirectURIs.empty() )
- {
- std::vector< NeonUri >::const_iterator it = m_aRedirectURIs.begin();
-
- NeonUri aUri( *it );
- m_aRedirectURIs.clear();
- setURL ( aUri.GetURI() );
- initialize();
- }
-}
-
-
-bool DAVResourceAccess::handleException( const DAVException & e, int errorCount )
-{
- switch ( e.getError() )
- {
- case DAVException::DAV_HTTP_REDIRECT:
- if ( !detectRedirectCycle( e.getData() ) )
- {
- // set new URL and path.
- setURL( e.getData() );
- initialize();
- return true;
- }
- return false;
- // #67048# copy & paste images doesn't display. This bug refers
- // to an old OOo problem about getting resources from sites with a bad connection.
- // If we have a bad connection try again. Up to three times.
- case DAVException::DAV_HTTP_ERROR:
- // retry up to three times, if not a client-side error (4xx error codes)
- if ( e.getStatus() < SC_BAD_REQUEST && errorCount < 3 )
- return true;
- // check the server side errors
- switch( e.getStatus() )
- {
- // the HTTP server side response status codes that can be retried
- case SC_BAD_GATEWAY: // retry, can be an excessive load
- case SC_GATEWAY_TIMEOUT: // retry, may be we get lucky
- case SC_SERVICE_UNAVAILABLE: // retry, the service may become available
- case SC_INSUFFICIENT_STORAGE: // space may be freed, retry
- {
- return errorCount < 3;
- }
- break;
- // all the other HTTP server response status codes are NOT retry
- default:
- return false;
- }
- break;
- // if connection has said retry then retry!
- case DAVException::DAV_HTTP_RETRY:
- return true;
- default:
- return false; // Abort
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx b/ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx
deleted file mode 100644
index 03eeb879696b..000000000000
--- a/ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx
+++ /dev/null
@@ -1,231 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#pragma once
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include "DAVAuthListener.hxx"
-#include "DAVException.hxx"
-#include "DAVSession.hxx"
-#include "DAVResource.hxx"
-#include "DAVTypes.hxx"
-#include "NeonUri.hxx"
-
-namespace webdav_ucp
-{
-
-class DAVSessionFactory;
-
-class DAVResourceAccess
-{
- osl::Mutex m_aMutex;
- OUString m_aURL;
- OUString m_aPath;
- css::uno::Sequence< css::beans::NamedValue > m_aFlags;
- rtl::Reference< DAVSession > m_xSession;
- rtl::Reference< DAVSessionFactory > m_xSessionFactory;
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
- std::vector< NeonUri > m_aRedirectURIs;
-
-public:
- DAVResourceAccess( const css::uno::Reference< css::uno::XComponentContext > & rxContext,
- rtl::Reference< DAVSessionFactory > const & rSessionFactory,
- const OUString & rURL );
- DAVResourceAccess( const DAVResourceAccess & rOther );
-
- DAVResourceAccess & operator=( const DAVResourceAccess & rOther );
-
- /// @throws DAVException
- void setFlags( const css::uno::Sequence< css::beans::NamedValue >& rFlags );
-
- /// @throws DAVException
- void setURL( const OUString & rNewURL );
-
- void resetUri();
-
- const OUString & getURL() const { return m_aURL; }
-
- const rtl::Reference< DAVSessionFactory >& getSessionFactory() const
- { return m_xSessionFactory; }
-
- // DAV methods
-
- /// @throws DAVException
- void
- OPTIONS( DAVOptions & rOptions,
- const css::uno::Reference<
- css::ucb::XCommandEnvironment > & xEnv );
-
- // allprop & named
- /// @throws DAVException
- void
- PROPFIND( const Depth nDepth,
- const std::vector< OUString > & rPropertyNames,
- std::vector< DAVResource > & rResources,
- const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
-
- // propnames
- /// @throws DAVException
- void
- PROPFIND( const Depth nDepth,
- std::vector< DAVResourceInfo > & rResInfo,
- const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
-
- /// @throws DAVException
- void
- PROPPATCH( const std::vector< ProppatchValue > & rValues,
- const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
-
- /// @throws DAVException
- void
- HEAD( const std::vector< OUString > & rHeaderNames, // empty == 'all'
- DAVResource & rResource,
- const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
-
- /// @throws DAVException
- css::uno::Reference< css::io::XInputStream >
- GET( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
-
- /// @throws DAVException
- void
- GET( css::uno::Reference< css::io::XOutputStream > & rStream,
- const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
-
- /// @throws css::uno::RuntimeException
- /// @throws DAVException
- css::uno::Reference< css::io::XInputStream >
- GET( const std::vector< OUString > & rHeaderNames, // empty == 'all'
- DAVResource & rResource,
- const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
-
- // used as HEAD substitute when HEAD is not implemented on server
- /// @throws DAVException
- void
- GET0( DAVRequestHeaders & rRequestHeaders,
- const std::vector< OUString > & rHeaderNames, // empty == 'all'
- DAVResource & rResource,
- const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
-
- /// @throws DAVException
- void
- GET( css::uno::Reference< css::io::XOutputStream > & rStream,
- const std::vector< OUString > & rHeaderNames, // empty == 'all'
- DAVResource & rResource,
- const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
-
- /// @throws css::uno::RuntimeException
- /// @throws DAVException
- void
- PUT( const css::uno::Reference< css::io::XInputStream > & rStream,
- const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
-
- /// @throws css::uno::RuntimeException
- /// @throws DAVException
- css::uno::Reference< css::io::XInputStream >
- POST( const OUString & rContentType,
- const OUString & rReferer,
- const css::uno::Reference< css::io::XInputStream > & rInputStream,
- const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
-
- /// @throws css::uno::RuntimeException
- /// @throws DAVException
- void
- POST( const OUString & rContentType,
- const OUString & rReferer,
- const css::uno::Reference< css::io::XInputStream > & rInputStream,
- css::uno::Reference< css::io::XOutputStream > & rOutputStream,
- const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
-
- /// @throws DAVException
- void
- MKCOL( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
-
- /// @throws DAVException
- void
- COPY( const OUString & rSourcePath,
- const OUString & rDestinationURI,
- bool bOverwrite,
- const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
-
- /// @throws DAVException
- void
- MOVE( const OUString & rSourcePath,
- const OUString & rDestinationURI,
- bool bOverwrite,
- const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
-
- /// @throws DAVException
- void
- DESTROY( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
-
- // set new lock.
- /// @throws DAVException
- void
- LOCK( css::ucb::Lock & inLock,
- const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
-
- /// @throws DAVException
- void
- UNLOCK( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
-
- /// @throws DAVException
- void
- abort();
-
- // helper
- static void
- getUserRequestHeaders(
- const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv,
- const OUString & rURI,
- css::ucb::WebDAVHTTPMethod eMethod,
- DAVRequestHeaders & rRequestHeaders );
-
- /// @throws DAVException
- bool handleException( const DAVException & e, int errorCount );
-
-private:
- const OUString & getRequestURI() const;
- /// @throws DAVException
- bool detectRedirectCycle( const OUString& rRedirectURL );
- /// @throws DAVException
- void initialize();
-};
-
-} // namespace webdav_ucp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/DAVSession.hxx b/ucb/source/ucp/webdav-neon/DAVSession.hxx
deleted file mode 100644
index f61bbdb6ad90..000000000000
--- a/ucb/source/ucp/webdav-neon/DAVSession.hxx
+++ /dev/null
@@ -1,213 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#pragma once
-
-#include
-#include
-#include
-#include
-#include
-#include "DAVProperties.hxx"
-#include "DAVResource.hxx"
-#include "DAVSessionFactory.hxx"
-#include "DAVTypes.hxx"
-#include "DAVRequestEnvironment.hxx"
-
-namespace com::sun::star::beans {
- struct NamedValue;
-}
-
-namespace com::sun::star::ucb {
- struct Lock;
-}
-
-namespace webdav_ucp
-{
-
-class DAVSession
-{
-public:
- void acquire()
- {
- osl_atomic_increment( &m_nRefCount );
- }
-
- void release()
- {
- if ( osl_atomic_decrement( &m_nRefCount ) == 0 )
- {
- m_xFactory->releaseElement( this );
- delete this;
- }
- }
-
- virtual bool CanUse( const OUString & inPath,
- const css::uno::Sequence< css::beans::NamedValue >& rFlags ) = 0;
-
- virtual bool UsesProxy() = 0;
-
- // DAV methods
-
- /// @throws std::exception
- virtual void OPTIONS( const OUString & inPath,
- DAVOptions& rOptions,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- // allprop & named
- /// @throws std::exception
- virtual void PROPFIND( const OUString & inPath,
- const Depth inDepth,
- const std::vector< OUString > & inPropertyNames,
- std::vector< DAVResource > & ioResources,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- // propnames
- /// @throws std::exception
- virtual void PROPFIND( const OUString & inPath,
- const Depth inDepth,
- std::vector< DAVResourceInfo > & ioResInfo,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- /// @throws std::exception
- virtual void PROPPATCH( const OUString & inPath,
- const std::vector< ProppatchValue > & inValues,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- /// @throws std::exception
- virtual void HEAD( const OUString & inPath,
- const std::vector< OUString > & inHeaderNames,
- DAVResource & ioResource,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- /// @throws std::exception
- virtual css::uno::Reference< css::io::XInputStream >
- GET( const OUString & inPath,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- /// @throws std::exception
- virtual void GET( const OUString & inPath,
- css::uno::Reference< css::io::XOutputStream >& o,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- /// @throws std::exception
- virtual css::uno::Reference< css::io::XInputStream >
- GET( const OUString & inPath,
- const std::vector< OUString > & inHeaderNames,
- DAVResource & ioResource,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- // used as HEAD substitute when HEAD is not implemented on server
- /// @throws std::exception
- virtual void
- GET0( const OUString & inPath,
- const std::vector< OUString > & inHeaderNames,
- DAVResource & ioResource,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- /// @throws std::exception
- virtual void
- GET( const OUString & inPath,
- css::uno::Reference< css::io::XOutputStream >& o,
- const std::vector< OUString > & inHeaderNames,
- DAVResource & ioResource,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- /// @throws std::exception
- virtual void PUT( const OUString & inPath,
- const css::uno::Reference< css::io::XInputStream >& s,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- /// @throws std::exception
- virtual css::uno::Reference< css::io::XInputStream >
- POST( const OUString & inPath,
- const OUString & rContentType,
- const OUString & rReferer,
- const css::uno::Reference< css::io::XInputStream > & inInputStream,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- /// @throws std::exception
- virtual void POST( const OUString & inPath,
- const OUString & rContentType,
- const OUString & rReferer,
- const css::uno::Reference< css::io::XInputStream > & inInputStream,
- css::uno::Reference< css::io::XOutputStream > & oOutputStream,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- /// @throws std::exception
- virtual void MKCOL( const OUString & inPath,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- /// @throws std::exception
- virtual void COPY( const OUString & inSource,
- const OUString & inDestination,
- const DAVRequestEnvironment & rEnv,
- bool inOverwrite ) = 0;
-
- /// @throws std::exception
- virtual void MOVE( const OUString & inSource,
- const OUString & inDestination,
- const DAVRequestEnvironment & rEnv,
- bool inOverwrite ) = 0;
-
- /// @throws std::exception
- virtual void DESTROY( const OUString & inPath,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- // set new lock.
- /// @throws std::exception
- virtual void LOCK( const OUString & inPath,
- css::ucb::Lock & inLock,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- /// @throws std::exception
- virtual void UNLOCK( const OUString & inPath,
- const DAVRequestEnvironment & rEnv ) = 0;
-
- /// @throws std::exception
- virtual void abort() = 0;
-
-protected:
- rtl::Reference< DAVSessionFactory > m_xFactory;
-
- explicit DAVSession( rtl::Reference< DAVSessionFactory > const & rFactory )
- : m_xFactory( rFactory ), m_nRefCount( 0 ) {}
-
- virtual ~DAVSession() {}
-
-private:
- DAVSessionFactory::Map::iterator m_aContainerIt;
- oslInterlockedCount m_nRefCount;
-
- friend class DAVSessionFactory;
- friend struct std::default_delete< DAVSession >;
-};
-
-} // namespace webdav_ucp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx b/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx
deleted file mode 100644
index d58171bdef6e..000000000000
--- a/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include
-#include "DAVSessionFactory.hxx"
-#include "NeonSession.hxx"
-#include "NeonUri.hxx"
-#include
-
-using namespace webdav_ucp;
-using namespace com::sun::star;
-
-DAVSessionFactory::~DAVSessionFactory()
-{
-}
-
-rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession(
- const OUString & inUri,
- const uno::Sequence< beans::NamedValue >& rFlags,
- const uno::Reference< uno::XComponentContext > & rxContext )
-{
- std::scoped_lock aGuard( m_aMutex );
-
- m_xContext = rxContext;
-
- if (!m_xProxyDecider)
- m_xProxyDecider.reset( new ucbhelper::InternetProxyDecider( rxContext ) );
-
- Map::iterator aIt = std::find_if(m_aMap.begin(), m_aMap.end(),
- [&inUri, &rFlags](const Map::value_type& rEntry) { return rEntry.second->CanUse( inUri, rFlags ); });
-
- if ( aIt == m_aMap.end() )
- {
- NeonUri aURI( inUri );
-
- std::unique_ptr xElement(
- new NeonSession(this, inUri, rFlags, *m_xProxyDecider));
-
- aIt = m_aMap.emplace( inUri, xElement.get() ).first;
- aIt->second->m_aContainerIt = aIt;
- xElement.release();
- return aIt->second;
- }
- else if ( osl_atomic_increment( &aIt->second->m_nRefCount ) > 1 )
- {
- rtl::Reference< DAVSession > xElement( aIt->second );
- osl_atomic_decrement( &aIt->second->m_nRefCount );
- return xElement;
- }
- else
- {
- osl_atomic_decrement( &aIt->second->m_nRefCount );
- aIt->second->m_aContainerIt = m_aMap.end();
-
- // If URL scheme is different from http or https we definitely
- // have to use a proxy and therefore can optimize the getProxy
- // call a little:
- NeonUri aURI( inUri );
-
- aIt->second = new NeonSession(this, inUri, rFlags, *m_xProxyDecider);
- aIt->second->m_aContainerIt = aIt;
- return aIt->second;
- }
-}
-
-void DAVSessionFactory::releaseElement( DAVSession const * pElement )
-{
- OSL_ASSERT( pElement );
- std::scoped_lock aGuard( m_aMutex );
- if ( pElement->m_aContainerIt != m_aMap.end() )
- m_aMap.erase( pElement->m_aContainerIt );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/DAVSessionFactory.hxx b/ucb/source/ucp/webdav-neon/DAVSessionFactory.hxx
deleted file mode 100644
index fd185d11ae8a..000000000000
--- a/ucb/source/ucp/webdav-neon/DAVSessionFactory.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- *
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#pragma once
-
-#ifdef min
-#undef min // GNU libstdc++ includes which defines methods called min...
-#endif
-#include
-#include