├── .gitignore ├── .gitlab-ci.yml ├── .gitmodules ├── .mailmap ├── CMakeLists.txt ├── LICENSE ├── README.md ├── RELEASE-NOTES.md ├── ci ├── common-rpm-build.sh ├── debian │ └── packages.sh ├── fedora │ └── packages.sh └── replace-directory.sh ├── cmake └── modules │ ├── CMakeCXX11Support.cmake │ ├── CMakeGeneratePkgConfig.cmake │ ├── CMakeMacroParseArguments.cmake │ ├── CMakeStringHelpers.cmake │ ├── DefineInstallationPaths.cmake │ ├── FindROOT.cmake │ ├── FindgSOAP.cmake │ ├── Finduuid.cmake │ ├── MacroAddDoxygen.cmake │ ├── PortabilityGNUCheck.cmake │ ├── ReleaseDebugAutoFlags.cmake │ └── buildCurl.cmake ├── cmake_uninstall.cmake.in ├── curl-CVE-2022-32221.patch ├── curl-CVE-2023-38545_7.69.0.patch ├── deps ├── CMakeLists.txt ├── libneon │ ├── .package │ ├── .release.sh │ ├── .version │ ├── AUTHORS │ ├── BUGS │ ├── CMakeLists.txt │ ├── ChangeLog │ ├── ChangeLog.CVS │ ├── INSTALL.win32 │ ├── Makefile.in │ ├── NEWS │ ├── README │ ├── THANKS │ ├── TODO │ ├── aclocal.m4 │ ├── autogen.sh │ ├── config.cmake.in │ ├── config.guess │ ├── config.h.in │ ├── config.hw │ ├── config.hw.in │ ├── config.sub │ ├── configure │ ├── configure.in │ ├── doc │ │ ├── TODO │ │ ├── biblio.xml │ │ ├── date.xml │ │ ├── feat.xml │ │ ├── html.xsl │ │ ├── html │ │ │ ├── api.html │ │ │ ├── biblio.html │ │ │ ├── compliance.html │ │ │ ├── features.html │ │ │ ├── index.html │ │ │ ├── intro.html │ │ │ ├── ref.html │ │ │ ├── refalloc.html │ │ │ ├── refauth.html │ │ │ ├── refbuf.html │ │ │ ├── refbufapp.html │ │ │ ├── refbufcr.html │ │ │ ├── refbufdest.html │ │ │ ├── refbufutil.html │ │ │ ├── refcert.html │ │ │ ├── refclicert.html │ │ │ ├── refconfig.html │ │ │ ├── referr.html │ │ │ ├── reffeat.html │ │ │ ├── refgetst.html │ │ │ ├── refi18n.html │ │ │ ├── refiaddr.html │ │ │ ├── refneon.html │ │ │ ├── refopts.html │ │ │ ├── refreq.html │ │ │ ├── refreqbody.html │ │ │ ├── refreqflags.html │ │ │ ├── refreqhdr.html │ │ │ ├── refresolve.html │ │ │ ├── refresphdr.html │ │ │ ├── refsess.html │ │ │ ├── refsessflags.html │ │ │ ├── refshave.html │ │ │ ├── refsockinit.html │ │ │ ├── refsslca.html │ │ │ ├── refsslcert2.html │ │ │ ├── refsslcertio.html │ │ │ ├── refssldname.html │ │ │ ├── refsslvfy.html │ │ │ ├── refstatus.html │ │ │ ├── reftok.html │ │ │ ├── refvers.html │ │ │ ├── refxml.html │ │ │ ├── security.html │ │ │ ├── using.html │ │ │ └── xml.html │ │ ├── man.xsl │ │ ├── man │ │ │ ├── ne_add_request_header.3 │ │ │ ├── ne_addr_destroy.3 │ │ │ ├── ne_addr_error.3 │ │ │ ├── ne_addr_first.3 │ │ │ ├── ne_addr_next.3 │ │ │ ├── ne_addr_resolve.3 │ │ │ ├── ne_addr_result.3 │ │ │ ├── ne_buffer.3 │ │ │ ├── ne_buffer_altered.3 │ │ │ ├── ne_buffer_append.3 │ │ │ ├── ne_buffer_clear.3 │ │ │ ├── ne_buffer_concat.3 │ │ │ ├── ne_buffer_create.3 │ │ │ ├── ne_buffer_destroy.3 │ │ │ ├── ne_buffer_finish.3 │ │ │ ├── ne_buffer_grow.3 │ │ │ ├── ne_buffer_ncreate.3 │ │ │ ├── ne_buffer_zappend.3 │ │ │ ├── ne_calloc.3 │ │ │ ├── ne_close_connection.3 │ │ │ ├── ne_forget_auth.3 │ │ │ ├── ne_get_error.3 │ │ │ ├── ne_get_request_flag.3 │ │ │ ├── ne_get_response_header.3 │ │ │ ├── ne_get_scheme.3 │ │ │ ├── ne_get_server_hostport.3 │ │ │ ├── ne_get_session_flag.3 │ │ │ ├── ne_get_status.3 │ │ │ ├── ne_has_support.3 │ │ │ ├── ne_i18n_init.3 │ │ │ ├── ne_iaddr_cmp.3 │ │ │ ├── ne_iaddr_free.3 │ │ │ ├── ne_iaddr_make.3 │ │ │ ├── ne_iaddr_parse.3 │ │ │ ├── ne_iaddr_print.3 │ │ │ ├── ne_iaddr_raw.3 │ │ │ ├── ne_iaddr_reverse.3 │ │ │ ├── ne_iaddr_typeof.3 │ │ │ ├── ne_malloc.3 │ │ │ ├── ne_oom_callback.3 │ │ │ ├── ne_print_request_header.3 │ │ │ ├── ne_qtoken.3 │ │ │ ├── ne_realloc.3 │ │ │ ├── ne_request_create.3 │ │ │ ├── ne_request_destroy.3 │ │ │ ├── ne_request_dispatch.3 │ │ │ ├── ne_response_header_iterate.3 │ │ │ ├── ne_session_create.3 │ │ │ ├── ne_session_destroy.3 │ │ │ ├── ne_session_proxy.3 │ │ │ ├── ne_set_connect_timeout.3 │ │ │ ├── ne_set_error.3 │ │ │ ├── ne_set_proxy_auth.3 │ │ │ ├── ne_set_read_timeout.3 │ │ │ ├── ne_set_request_body_buffer.3 │ │ │ ├── ne_set_request_body_fd.3 │ │ │ ├── ne_set_request_body_fd64.3 │ │ │ ├── ne_set_request_flag.3 │ │ │ ├── ne_set_server_auth.3 │ │ │ ├── ne_set_session_flag.3 │ │ │ ├── ne_set_useragent.3 │ │ │ ├── ne_shave.3 │ │ │ ├── ne_sock_exit.3 │ │ │ ├── ne_sock_init.3 │ │ │ ├── ne_ssl_cert_cmp.3 │ │ │ ├── ne_ssl_cert_export.3 │ │ │ ├── ne_ssl_cert_free.3 │ │ │ ├── ne_ssl_cert_identity.3 │ │ │ ├── ne_ssl_cert_import.3 │ │ │ ├── ne_ssl_cert_issuer.3 │ │ │ ├── ne_ssl_cert_read.3 │ │ │ ├── ne_ssl_cert_signedby.3 │ │ │ ├── ne_ssl_cert_subject.3 │ │ │ ├── ne_ssl_cert_write.3 │ │ │ ├── ne_ssl_clicert_decrypt.3 │ │ │ ├── ne_ssl_clicert_encrypted.3 │ │ │ ├── ne_ssl_clicert_free.3 │ │ │ ├── ne_ssl_clicert_name.3 │ │ │ ├── ne_ssl_clicert_owner.3 │ │ │ ├── ne_ssl_clicert_read.3 │ │ │ ├── ne_ssl_dname_cmp.3 │ │ │ ├── ne_ssl_readable_dname.3 │ │ │ ├── ne_ssl_set_verify.3 │ │ │ ├── ne_ssl_trust_cert.3 │ │ │ ├── ne_ssl_trust_default_ca.3 │ │ │ ├── ne_status.3 │ │ │ ├── ne_strdup.3 │ │ │ ├── ne_strndup.3 │ │ │ ├── ne_token.3 │ │ │ ├── ne_version_match.3 │ │ │ ├── ne_version_string.3 │ │ │ ├── ne_xml_create.3 │ │ │ ├── ne_xml_destroy.3 │ │ │ ├── neon-config.1 │ │ │ └── neon.3 │ │ ├── manual.css │ │ ├── manual.xml │ │ ├── parsing-xml.txt │ │ ├── ref │ │ │ ├── alloc.xml │ │ │ ├── auth.xml │ │ │ ├── buf.xml │ │ │ ├── bufapp.xml │ │ │ ├── bufcr.xml │ │ │ ├── bufdest.xml │ │ │ ├── bufutil.xml │ │ │ ├── clicert.xml │ │ │ ├── config.xml │ │ │ ├── err.xml │ │ │ ├── feat.xml │ │ │ ├── getst.xml │ │ │ ├── i18n.xml │ │ │ ├── iaddr.xml │ │ │ ├── init.xml │ │ │ ├── neon.xml │ │ │ ├── opts.xml │ │ │ ├── req.xml │ │ │ ├── reqbody.xml │ │ │ ├── reqflags.xml │ │ │ ├── reqhdr.xml │ │ │ ├── resolve.xml │ │ │ ├── resphdr.xml │ │ │ ├── sess.xml │ │ │ ├── sessflags.xml │ │ │ ├── shave.xml │ │ │ ├── sslca.xml │ │ │ ├── sslcert.xml │ │ │ ├── sslcert2.xml │ │ │ ├── sslcertio.xml │ │ │ ├── ssldname.xml │ │ │ ├── ssltrust.xml │ │ │ ├── sslvfy.xml │ │ │ ├── status.xml │ │ │ ├── tok.xml │ │ │ ├── vers.xml │ │ │ └── xml.xml │ │ ├── refentry.xml │ │ ├── security.xml │ │ ├── ssl.xml │ │ ├── using.xml │ │ ├── version.xml │ │ └── xml.xml │ ├── install-sh │ ├── ltmain.sh │ ├── macros │ │ ├── ChangeLog │ │ ├── ld-version-script.m4 │ │ ├── neon-test.m4 │ │ ├── neon-xml-parser.m4 │ │ ├── neon.m4 │ │ └── socklen-arg-type.m4 │ ├── neon-config.in │ ├── neon.mak │ ├── neon.pc.in │ ├── po │ │ ├── cs.gmo │ │ ├── cs.po │ │ ├── de.gmo │ │ ├── de.po │ │ ├── fr.gmo │ │ ├── fr.po │ │ ├── ja.gmo │ │ ├── ja.po │ │ ├── neon.pot │ │ ├── nn.gmo │ │ ├── nn.po │ │ ├── pl.gmo │ │ ├── pl.po │ │ ├── ru.gmo │ │ ├── ru.po │ │ ├── tr.gmo │ │ ├── tr.po │ │ ├── zh_CN.gmo │ │ └── zh_CN.po │ ├── src │ │ ├── COPYING.LIB │ │ ├── ChangeLog │ │ ├── Makefile.in │ │ ├── README │ │ ├── davix_logger_c.h │ │ ├── memleak.h │ │ ├── ne_207.c │ │ ├── ne_207.h │ │ ├── ne_acl.h │ │ ├── ne_acl3744.c │ │ ├── ne_acl3744.h │ │ ├── ne_alloc.c │ │ ├── ne_alloc.h │ │ ├── ne_auth.c │ │ ├── ne_auth.h │ │ ├── ne_basic.c │ │ ├── ne_basic.h │ │ ├── ne_compress.c │ │ ├── ne_compress.h │ │ ├── ne_dates.c │ │ ├── ne_dates.h │ │ ├── ne_defs.h │ │ ├── ne_gnutls.c │ │ ├── ne_i18n.c │ │ ├── ne_i18n.h │ │ ├── ne_internal.h │ │ ├── ne_locks.c │ │ ├── ne_locks.h │ │ ├── ne_md5.c │ │ ├── ne_md5.h │ │ ├── ne_ntlm.c │ │ ├── ne_ntlm.h │ │ ├── ne_oldacl.c │ │ ├── ne_openssl.c │ │ ├── ne_openssl_internal.h │ │ ├── ne_pkcs11.c │ │ ├── ne_pkcs11.h │ │ ├── ne_private.h │ │ ├── ne_privssl.h │ │ ├── ne_props.c │ │ ├── ne_props.h │ │ ├── ne_redirect.c │ │ ├── ne_redirect.h │ │ ├── ne_request.c │ │ ├── ne_request.h │ │ ├── ne_session.c │ │ ├── ne_session.h │ │ ├── ne_socket.c │ │ ├── ne_socket.h │ │ ├── ne_socks.c │ │ ├── ne_ssl.h │ │ ├── ne_sspi.c │ │ ├── ne_sspi.h │ │ ├── ne_string.c │ │ ├── ne_string.h │ │ ├── ne_stubssl.c │ │ ├── ne_uri.c │ │ ├── ne_uri.h │ │ ├── ne_utils.c │ │ ├── ne_utils.h │ │ ├── ne_xml.c │ │ ├── ne_xml.h │ │ ├── ne_xmlreq.c │ │ ├── ne_xmlreq.h │ │ └── neon.vers │ └── test │ │ ├── COPYING │ │ ├── ChangeLog │ │ ├── Makefile.in │ │ ├── README │ │ ├── STATUS │ │ ├── acl3744.c │ │ ├── auth.c │ │ ├── basic.c │ │ ├── common │ │ ├── ChangeLog │ │ ├── README │ │ ├── child.c │ │ ├── child.h │ │ ├── run.sh │ │ ├── tests.c │ │ └── tests.h │ │ ├── compress.c │ │ ├── expired.pem │ │ ├── htdocs │ │ └── plain │ │ ├── largefile.c │ │ ├── lock.c │ │ ├── makekeys │ │ ├── makekeys.sh │ │ ├── notvalid.pem │ │ ├── nulca.pem │ │ ├── nulcn.pem │ │ ├── nulsan.pem │ │ ├── nulsrv.key │ │ ├── oldacl.c │ │ ├── openssl.conf │ │ ├── props.c │ │ ├── redirect.c │ │ ├── request.c │ │ ├── resolve.c │ │ ├── run-tests.sh │ │ ├── run.sh │ │ ├── server.key │ │ ├── session.c │ │ ├── skeleton.c │ │ ├── socket.c │ │ ├── ssl.c │ │ ├── string-tests.c │ │ ├── stubs.c │ │ ├── uri-tests.c │ │ ├── util-socks.c │ │ ├── util-tests.c │ │ ├── utils.c │ │ ├── utils.h │ │ ├── xml.c │ │ └── xmlreq.c └── system_utils │ └── env_utils.hpp ├── dist ├── CMakeLists.txt ├── abi │ ├── abi_checker_last.xml.in │ ├── abi_checker_std_version.xml │ ├── abi_checker_std_version_32.xml │ ├── abi_dumps │ │ ├── davix_0.2.8-gcc48-x86_64-linux-gnu.abi.tar.gz │ │ ├── davix_0.3.1-gcc43-i686-redhat-linux.abi.tar.gz │ │ ├── davix_0.3.1-gcc43-x86_64-redhat-linux.abi.tar.gz │ │ ├── davix_0.3.1-gcc48-x86_64-linux-gnu.abi.tar.gz │ │ ├── davix_0.3.6-gcc44-x86_64-redhat-linux.abi.tar.gz │ │ └── davix_0.5.0-gcc44-x86_64-redhat-linux.abi.tar.gz │ └── check_abi.sh.in ├── installDavix.sh ├── new-release.sh └── produce-artifacts.py ├── doc ├── CMakeLists.txt ├── Doxyfile.in ├── man │ ├── davix-get.1 │ ├── davix-http.1 │ ├── davix-ls.1 │ ├── davix-mkdir.1 │ ├── davix-mv.1 │ ├── davix-put.1 │ ├── davix-rm.1 │ └── libdavix.3 ├── sphinx │ ├── _themes │ │ └── sphinx_rtd_theme │ │ │ ├── __init__.py │ │ │ ├── breadcrumbs.html │ │ │ ├── footer.html │ │ │ ├── layout.html │ │ │ ├── layout_old.html │ │ │ ├── search.html │ │ │ ├── searchbox.html │ │ │ ├── static │ │ │ ├── css │ │ │ │ ├── badge_only.css │ │ │ │ ├── badge_only.css.map │ │ │ │ ├── theme.css │ │ │ │ └── theme.css.map │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── Inconsolata-Bold.ttf │ │ │ │ ├── Inconsolata-Regular.ttf │ │ │ │ ├── Lato-Bold.ttf │ │ │ │ ├── Lato-Regular.ttf │ │ │ │ ├── RobotoSlab-Bold.ttf │ │ │ │ ├── RobotoSlab-Regular.ttf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ └── fontawesome-webfont.woff │ │ │ └── js │ │ │ │ ├── modernizr.min.js │ │ │ │ └── theme.js │ │ │ ├── theme.conf │ │ │ └── versions.html │ ├── advanced.rst │ ├── api-file.rst │ ├── api-http.rst │ ├── api-posix.rst │ ├── authors.rst │ ├── cli-examples.rst │ ├── cloud-support.rst │ ├── compiling.rst │ ├── conf.py │ ├── contact.rst │ ├── index.rst │ ├── installation.rst │ ├── lib-examples.rst │ └── root.rst └── src │ ├── example_code_snippets.cpp │ └── mainpage.hpp ├── docker ├── Dockerfile ├── README.md └── davix.sh ├── genversion.py ├── include └── davix │ ├── auth │ ├── davixauth.hpp │ └── davixx509cred.hpp │ ├── compat │ ├── davix_ignored.hpp │ └── deprecated.hpp │ ├── copy │ └── davixcopy.hpp │ ├── davix.hpp │ ├── davix_file_types.hpp │ ├── davixcontext.hpp │ ├── features.hpp.in │ ├── file │ ├── davfile.hpp │ ├── davix_file_info.hpp │ └── davposix.hpp │ ├── hooks │ ├── davix_hooks.hpp │ ├── davix_hooks_fwd.hpp │ └── davix_hooks_impl.hpp │ ├── params │ ├── davix_request_params_types.hpp │ └── davixrequestparams.hpp │ ├── request │ └── httprequest.hpp │ ├── status │ └── davixstatusrequest.hpp │ └── utils │ ├── davix_azure_utils.hpp │ ├── davix_config.hpp │ ├── davix_gcloud_utils.hpp │ ├── davix_logger.hpp │ ├── davix_misc_utils.hpp │ ├── davix_nocopy.hpp │ ├── davix_s3_utils.hpp │ ├── davix_swift_utils.hpp │ ├── davix_types.hpp │ └── davix_uri.hpp ├── packaging ├── Makefile ├── davix.spec.in ├── debian │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── davix-dev.install │ ├── davix-doc.docs │ ├── davix-doc.install │ ├── davix-tests.install │ ├── davix.install │ ├── libdavix0.docs │ ├── libdavix0.install │ ├── rules │ └── source │ │ ├── format │ │ └── lintian-overrides ├── make-binary-dist.sh ├── make-deb.sh ├── make-dist.sh ├── make-docs.sh ├── make-srpm.sh ├── repo-manager.py └── update-repo.sh ├── patch-curl-clock-gettime.sh ├── release.cmake ├── src ├── CMakeLists.txt ├── auth │ ├── davix_openssl.cpp │ ├── davixauth.cpp │ ├── davixx509cred.cpp │ └── davixx509cred_internal.hpp ├── backend │ ├── BackendRequest.cpp │ ├── BackendRequest.hpp │ ├── BoundHooks.hpp │ ├── SessionFactory.cpp │ ├── SessionFactory.hpp │ ├── StandaloneNeonRequest.cpp │ ├── StandaloneNeonRequest.hpp │ └── StandaloneRequest.hpp ├── core │ ├── ContentProvider.cpp │ ├── ContentProvider.hpp │ ├── RedirectionResolver.cpp │ ├── RedirectionResolver.hpp │ └── SessionPool.hpp ├── curl │ ├── CurlSession.cpp │ ├── CurlSession.hpp │ ├── CurlSessionFactory.cpp │ ├── CurlSessionFactory.hpp │ ├── HeaderlineParser.cpp │ ├── HeaderlineParser.hpp │ ├── ResponseBuffer.cpp │ ├── ResponseBuffer.hpp │ ├── StandaloneCurlRequest.cpp │ └── StandaloneCurlRequest.hpp ├── davix_context_internal.hpp ├── davix_internal.hpp ├── davix_internal_config.in ├── davixcontext.cpp ├── deprecated │ └── httpcachetoken.cpp ├── file │ ├── davfile.cpp │ └── davposix.cpp ├── fileops │ ├── AzureIO.cpp │ ├── AzureIO.hpp │ ├── S3IO.cpp │ ├── S3IO.hpp │ ├── SwiftIO.cpp │ ├── SwiftIO.hpp │ ├── azure_meta_ops.hpp │ ├── chain_factory.cpp │ ├── chain_factory.hpp │ ├── davix_reliability_ops.cpp │ ├── davix_reliability_ops.hpp │ ├── davmeta.cpp │ ├── davmeta.hpp │ ├── fileutils.cpp │ ├── fileutils.hpp │ ├── httpiochain.cpp │ ├── httpiochain.hpp │ ├── httpiovec.cpp │ ├── httpiovec.hpp │ ├── iobuffmap.cpp │ └── iobuffmap.hpp ├── hooks │ └── davix_hooks.cpp ├── libs │ ├── IntervalTree.h │ ├── alibxx │ │ ├── algorithm │ │ │ └── algorithm.hpp │ │ ├── alibxx.hpp │ │ ├── base_types.hpp │ │ ├── chrono │ │ │ ├── chrono_exception.hpp │ │ │ ├── timepoint.cpp │ │ │ └── timepoint.hpp │ │ ├── containers │ │ │ └── cache.hpp │ │ ├── crypto │ │ │ ├── base64.cpp │ │ │ ├── base64.hpp │ │ │ ├── hmacsha.cpp │ │ │ └── hmacsha.hpp │ │ ├── operator.hpp │ │ ├── str │ │ │ ├── format.cpp │ │ │ └── format.hpp │ │ └── typeconv │ │ │ ├── typeconv.hpp │ │ │ └── typeconv_exception.hpp │ ├── datetime │ │ ├── datetime_utils.cpp │ │ └── datetime_utils.hpp │ ├── rapidjson │ │ ├── allocators.h │ │ ├── document.h │ │ ├── encodedstream.h │ │ ├── encodings.h │ │ ├── error │ │ │ ├── en.h │ │ │ └── error.h │ │ ├── filereadstream.h │ │ ├── filewritestream.h │ │ ├── fwd.h │ │ ├── internal │ │ │ ├── biginteger.h │ │ │ ├── diyfp.h │ │ │ ├── dtoa.h │ │ │ ├── ieee754.h │ │ │ ├── itoa.h │ │ │ ├── meta.h │ │ │ ├── pow10.h │ │ │ ├── regex.h │ │ │ ├── stack.h │ │ │ ├── strfunc.h │ │ │ ├── strtod.h │ │ │ └── swap.h │ │ ├── istreamwrapper.h │ │ ├── memorybuffer.h │ │ ├── memorystream.h │ │ ├── msinttypes │ │ │ ├── inttypes.h │ │ │ └── stdint.h │ │ ├── ostreamwrapper.h │ │ ├── pointer.h │ │ ├── prettywriter.h │ │ ├── rapidjson.h │ │ ├── reader.h │ │ ├── schema.h │ │ ├── stream.h │ │ ├── stringbuffer.h │ │ └── writer.h │ └── time_utils.h ├── modules │ ├── copy │ │ ├── CMakeLists.txt │ │ ├── copy.cpp │ │ ├── copy_internal.hpp │ │ ├── delegation │ │ │ ├── GRSTx509MakeProxyCert.cpp │ │ │ ├── GRSTx509MakeProxyCert.h │ │ │ ├── delegation-1.1.0.wsdl │ │ │ ├── delegation-2.0.0.wsdl │ │ │ ├── delegation.cpp │ │ │ ├── delegation.hpp │ │ │ ├── delegation1.cpp │ │ │ ├── delegation2.cpp │ │ │ └── typemap.dat │ │ └── perfmarker.cpp │ ├── modules_profiles.cpp │ └── modules_profiles.hpp ├── neon │ ├── neonrequest.cpp │ ├── neonrequest.hpp │ ├── neonsession.cpp │ ├── neonsession.hpp │ ├── neonsessionfactory.cpp │ └── neonsessionfactory.hpp ├── params │ └── davixrequestparams.cpp ├── request │ └── httprequest.cpp ├── status │ ├── DavixErrorInternal.hpp │ ├── DavixStatus.cpp │ ├── DavixStatus.hpp │ └── davixstatusrequest.cpp ├── tools │ ├── CMakeLists.txt │ ├── davix_config_parser.cpp │ ├── davix_config_parser.hpp │ ├── davix_mutex.hpp │ ├── davix_op.cpp │ ├── davix_op.hpp │ ├── davix_taskqueue.cpp │ ├── davix_taskqueue.hpp │ ├── davix_thread.cpp │ ├── davix_thread.hpp │ ├── davix_thread_pool.cpp │ ├── davix_thread_pool.hpp │ ├── davix_tool_copy_main.cpp │ ├── davix_tool_get_main.cpp │ ├── davix_tool_ls_main.cpp │ ├── davix_tool_main.cpp │ ├── davix_tool_mkcol_main.cpp │ ├── davix_tool_mv_main.cpp │ ├── davix_tool_params.cpp │ ├── davix_tool_params.hpp │ ├── davix_tool_put_main.cpp │ ├── davix_tool_rm_main.cpp │ ├── davix_tool_util.cpp │ └── davix_tool_util.hpp ├── utils │ ├── CompatibilityHacks.cpp │ ├── CompatibilityHacks.hpp │ ├── checksum_extractor.cpp │ ├── checksum_extractor.hpp │ ├── davix_azure_utils.cpp │ ├── davix_fileproperties.hpp │ ├── davix_gcloud_utils.cpp │ ├── davix_logger.cpp │ ├── davix_logger_internal.hpp │ ├── davix_misc_utils.cpp │ ├── davix_s3_utils.cpp │ ├── davix_swift_utils.cpp │ ├── davix_utils_internal.hpp │ ├── davixuri.cpp │ ├── simple_get_pass.cpp │ ├── simple_get_pass.h │ ├── stringutils.cpp │ └── stringutils.hpp └── xml │ ├── S3MultiPartInitiationParser.cpp │ ├── S3MultiPartInitiationParser.hpp │ ├── azurepropparser.cpp │ ├── azurepropparser.hpp │ ├── davdeletexmlparser.cpp │ ├── davdeletexmlparser.hpp │ ├── davix_ptree.cpp │ ├── davix_ptree.hpp │ ├── davpropxmlparser.cpp │ ├── davpropxmlparser.hpp │ ├── davxmlparser.cpp │ ├── davxmlparser.hpp │ ├── metalinkparser.cpp │ ├── metalinkparser.hpp │ ├── s3deleteparser.cpp │ ├── s3deleteparser.hpp │ ├── s3propparser.cpp │ ├── s3propparser.hpp │ ├── swiftpropparser.cpp │ └── swiftpropparser.hpp ├── test ├── CMakeLists.txt ├── TestcaseHandler.cpp ├── TestcaseHandler.hpp ├── bench │ ├── CMakeLists.txt │ ├── chunk_queue.cpp │ ├── chunk_queue.h │ ├── ctest_bench.cmake │ └── davix_bench.cpp ├── bench_inputfile_gen.sh ├── certs │ └── my_keycert.p12 ├── drunk-server │ ├── AssistedThread.hh │ ├── ConnectionInitiator.cpp │ ├── ConnectionInitiator.hpp │ ├── DrunkServer.cpp │ ├── DrunkServer.hpp │ ├── EventFD.hh │ ├── Interactors.cpp │ ├── Interactors.hpp │ ├── LineReader.cpp │ ├── LineReader.hpp │ └── Synchronized.hpp ├── functional │ ├── CMakeLists.txt │ ├── ctest_functional.cmake │ ├── davix-tester.cpp │ ├── davix_rw_test.cpp │ ├── davix_test_lib.cpp │ ├── davix_test_lib.h │ ├── lorem-ipsum.h │ ├── optionparser.h │ ├── test_auto_rmdir_unlink_delete.cpp │ ├── test_auto_stat_mkdir_check.cpp │ ├── test_checksum.cpp │ ├── test_mv.cpp │ ├── test_opendir.cpp │ ├── test_opendir.h │ ├── test_opendir_partial.cpp │ ├── test_opendir_partial.h │ ├── test_opendirpp.cpp │ ├── test_opendirpp.h │ ├── test_request.cpp │ ├── test_request.h │ ├── test_stat_session.cpp │ ├── test_stat_session.h │ ├── test_valid_read_generic_simple.cpp │ ├── test_valid_write_read_fd.cpp │ ├── test_valid_write_read_generic_simple.cpp │ ├── test_valid_write_read_vector_simple.cpp │ ├── tool_get_replica_simple.cpp │ └── tool_read_vector_simple.cpp ├── pywebdav │ ├── __init__.py │ ├── lib │ │ ├── AuthServer.py │ │ ├── INI_Parse.py │ │ ├── WebDAVServer.py │ │ ├── __init__.py │ │ ├── constants.py │ │ ├── davcmd.py │ │ ├── davcopy.py │ │ ├── davmove.py │ │ ├── dbconn.py │ │ ├── delete.py │ │ ├── errors.py │ │ ├── iface.py │ │ ├── locks.py │ │ ├── propfind.py │ │ ├── report.py │ │ ├── status.py │ │ └── utils.py │ └── server │ │ ├── __init__.py │ │ ├── config.ini │ │ ├── daemonize.py │ │ ├── fileauth.py │ │ ├── fshandler.py │ │ ├── mysqlauth.py │ │ └── server.py ├── root-tests │ ├── CMakeLists.txt │ └── h2fastnew_main.cpp ├── run-in-mock.sh ├── run-tests.sh ├── setup_test_env.sh ├── slow-unit │ ├── CMakeLists.txt │ ├── drunk-server.cpp │ ├── standalone-request.cpp │ └── test-utils.hpp └── unit │ ├── CMakeLists.txt │ ├── cache.cpp │ ├── chrono.cpp │ ├── config-parser.cpp │ ├── content-provider.cpp │ ├── context.cpp │ ├── datetime.cpp │ ├── digest-extractor.cpp │ ├── gcloud.cpp │ ├── metalink-replica.cpp │ ├── neon.cpp │ ├── parser.cpp │ ├── response-buffer.cpp │ ├── session-factory.cpp │ ├── session.cpp │ ├── status.cpp │ ├── testcert.cpp │ ├── typeconv.cpp │ ├── utils.cpp │ └── xml-parser.cpp └── version.cmake.in /.gitignore: -------------------------------------------------------------------------------- 1 | credentials/ 2 | build/ 3 | cmake-build*/ 4 | include/davix/features.hpp 5 | packaging/davix.spec 6 | version.cmake 7 | packaging/debian/changelog 8 | .clion* 9 | .vscode/ 10 | .idea/ 11 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "deps/curl"] 2 | path = deps/curl 3 | url = https://github.com/curl/curl 4 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Adrien Devresse 2 | Adrien Devresse 3 | Adrien Devresse 4 | Adrien Devresse 5 | Adrien Devresse 6 | Adrien Devresse 7 | Adrien Devresse 8 | Adrien Devresse 9 | Adrien Devresse 10 | Adrien Devresse 11 | Adrien Devresse 12 | Adrien Devresse 13 | Adrien Devresse 14 | Adrien Devresse 15 | Alejandro Alvarez Ayllon 16 | Alejandro Alvarez Ayllon 17 | Andrea Manzi 18 | Andrea Manzi 19 | Edward James Dambik 20 | Fabrizio Furano 21 | Fabrizio Furano 22 | Georgios Bitzes 23 | Georgios Bitzes 24 | Kwong Tat Cheung 25 | Mattias Ellert 26 | Rahul Chauhan 27 | Shiting Long 28 | Unknown 29 | -------------------------------------------------------------------------------- /ci/common-rpm-build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git submodule update --init --recursive 5 | ./packaging/make-srpm.sh 6 | cd build/ 7 | dnf builddep -y SRPMS/* 8 | 9 | rpmbuild --rebuild --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" SRPMS/* 10 | -------------------------------------------------------------------------------- /ci/debian/packages.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | apt-get update 5 | apt-get install -y git g++ cmake pbuilder devscripts equivs autoconf automake 6 | mk-build-deps --install --remove "packaging/debian/control" --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" 7 | -------------------------------------------------------------------------------- /ci/fedora/packages.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # Ensure "epel-release" package is installed 5 | if ! rpm -q --quiet epel-release ; then 6 | dnf install -y epel-release || true 7 | fi 8 | 9 | # Fedora rawhide (FC41) 10 | dnf install -y dnf5-plugins || true 11 | 12 | dnf install -y dnf-plugins-core git rpm-build tree which \ 13 | python3 cmake make gcc gcc-c++ 14 | 15 | # Additional packages for docs build 16 | if [[ "$1" == "--with-docs" ]]; then 17 | dnf install -y python3-sphinx python3-pip python3-breathe 18 | fi 19 | -------------------------------------------------------------------------------- /ci/replace-directory.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -ex 3 | 4 | STAGING_AREA="$1" 5 | TARGET="$2" 6 | SNAPSHOT="$3" 7 | 8 | if [[ -z "${SNAPSHOT}" ]]; then 9 | SNAPSHOT=$(date +%s) 10 | fi 11 | 12 | TARGET_OLD="${TARGET}-old-${SNAPSHOT}" 13 | 14 | if [[ -d "${TARGET}" ]]; then 15 | mv -v "${TARGET}" "${TARGET_OLD}" 16 | fi 17 | 18 | # Allow EOS FUSE grace time 19 | sleep 10 20 | 21 | mv -v "${STAGING_AREA}" "${TARGET}" 22 | 23 | if [[ -d "${TARGET_OLD}" ]]; then 24 | rm -rf "${TARGET_OLD}/" 25 | fi 26 | -------------------------------------------------------------------------------- /cmake/modules/CMakeCXX11Support.cmake: -------------------------------------------------------------------------------- 1 | include(CheckCXXSourceCompiles REQUIRED) 2 | 3 | 4 | if(CMAKE_COMPILER_IS_GNUCXX) 5 | execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) 6 | if(GCC_VERSION VERSION_GREATER 6.1 OR GCC_VERSION VERSION_EQUAL 6.1) 7 | SET(HAVE_CXX011_FULL_SUPPORT TRUE) 8 | SET(HAVE_CXX011_PARTIAL_SUPPORT TRUE) 9 | elseif(GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7) 10 | SET(HAVE_CXX011_FULL_SUPPORT TRUE) 11 | SET(HAVE_CXX011_PARTIAL_SUPPORT TRUE) 12 | SET(CXX11_FLAG_ENABLE "-std=c++11") 13 | elseif(GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3) 14 | message(STATUS "C++11 partial support") 15 | SET(HAVE_CXX011_PARTIAL_SUPPORT TRUE) 16 | SET(CXX11_FLAG_ENABLE "-std=c++0x") 17 | else () 18 | message(STATUS "C++11 no support ") 19 | SET(CXX11_FLAG_ENABLE "") 20 | endif() 21 | else(CMAKE_COMPILER_IS_GNUCXX) 22 | message(STATUS "C++11 activated full") 23 | SET(HAVE_CXX011_FULL_SUPPORT TRUE) 24 | SET(HAVE_CXX011_PARTIAL_SUPPORT TRUE) 25 | SET(CXX11_FLAG_ENABLE "-std=c++0x") 26 | endif(CMAKE_COMPILER_IS_GNUCXX) 27 | 28 | ## Check TR1 29 | CHECK_CXX_SOURCE_COMPILES(" 30 | #include 31 | int main() { return 0; }" 32 | HAVE_TR1_SUPPORT) 33 | 34 | if(HAVE_TR1_SUPPORT) 35 | message(STATUS "TR1 support detected") 36 | else(HAVE_TR1_SUPPORT) 37 | message(STATUS "no TR1 support") 38 | endif(HAVE_TR1_SUPPORT) 39 | -------------------------------------------------------------------------------- /cmake/modules/CMakeMacroParseArguments.cmake: -------------------------------------------------------------------------------- 1 | 2 | MACRO(PARSE_ARGUMENTS prefix arg_names option_names) 3 | SET(DEFAULT_ARGS) 4 | FOREACH(arg_name ${arg_names}) 5 | SET(${prefix}_${arg_name}) 6 | ENDFOREACH(arg_name) 7 | FOREACH(option ${option_names}) 8 | SET(${prefix}_${option} FALSE) 9 | ENDFOREACH(option) 10 | 11 | SET(current_arg_name DEFAULT_ARGS) 12 | SET(current_arg_list) 13 | FOREACH(arg ${ARGN}) 14 | SET(larg_names ${arg_names}) 15 | LIST(FIND larg_names "${arg}" is_arg_name) 16 | IF (is_arg_name GREATER -1) 17 | SET(${prefix}_${current_arg_name} ${current_arg_list}) 18 | SET(current_arg_name ${arg}) 19 | SET(current_arg_list) 20 | ELSE (is_arg_name GREATER -1) 21 | SET(loption_names ${option_names}) 22 | LIST(FIND loption_names "${arg}" is_option) 23 | IF (is_option GREATER -1) 24 | SET(${prefix}_${arg} TRUE) 25 | ELSE (is_option GREATER -1) 26 | SET(current_arg_list ${current_arg_list} ${arg}) 27 | ENDIF (is_option GREATER -1) 28 | ENDIF (is_arg_name GREATER -1) 29 | ENDFOREACH(arg) 30 | SET(${prefix}_${current_arg_name} ${current_arg_list}) 31 | ENDMACRO(PARSE_ARGUMENTS) 32 | -------------------------------------------------------------------------------- /cmake/modules/CMakeStringHelpers.cmake: -------------------------------------------------------------------------------- 1 | ##convenience function for string manipulation 2 | 3 | 4 | 5 | function(replace_occurence output input pattern replacer) 6 | string(REGEX REPLACE ${pattern} ${replacer} tmp_str ${input}) 7 | set(${output} ${tmp_str} PARENT_SCOPE) 8 | endfunction(replace_occurence output input pattern replacer) 9 | 10 | 11 | function(replace_all_occurence) 12 | PARSE_ARGUMENTS(REPLACE_ALL 13 | "LIST_PATTERN;LIST_REPLACER" 14 | "" 15 | ${ARGN} 16 | ) 17 | LIST(APPEND list_pattern ${REPLACE_ALL_LIST_PATTERN}) 18 | LIST(APPEND list_replacer ${REPLACE_ALL_LIST_REPLACER}) 19 | 20 | LIST(LENGTH list_pattern list_size ) 21 | LIST(LENGTH list_replacer list2_size ) 22 | math(EXPR list_size ${list_size}-1) 23 | LIST(GET REPLACE_ALL_DEFAULT_ARGS 0 output_var) 24 | LIST(GET REPLACE_ALL_DEFAULT_ARGS 1 intput_content ) 25 | 26 | SET(tmp_str ${intput_content}) 27 | SET(tmp_str2 "") 28 | 29 | foreach(i RANGE ${list_size}) 30 | list(GET list_pattern ${i} current_pattern ) 31 | list(GET list_replacer ${i} current_replacer ) 32 | replace_occurence(tmp_str2 ${tmp_str} ${current_pattern} ${current_replacer} ) 33 | SET(tmp_str ${tmp_str2}) 34 | endforeach(i RANGE ${list_size}) 35 | 36 | SET(${output_var} ${tmp_str} PARENT_SCOPE) 37 | endfunction(replace_all_occurence) 38 | 39 | function(STRING_APPEND var_name content) 40 | SET(${var_name} "${${var_name}}${content}" PARENT_SCOPE) 41 | 42 | endfunction(STRING_APPEND var_name content) 43 | -------------------------------------------------------------------------------- /cmake/modules/Finduuid.cmake: -------------------------------------------------------------------------------- 1 | #.rst: 2 | # Finduuid 3 | # ----------- 4 | # 5 | # Find libuuid, DCE compatible Universally Unique Identifier library. 6 | # 7 | # Result Variables 8 | # ^^^^^^^^^^^^^^^^ 9 | # 10 | # This module will set the following variables in your project: 11 | # 12 | # ``UUID_FOUND`` 13 | # True if libuuid has been found. 14 | # ``UUID_INCLUDE_DIRS`` 15 | # Where to find uuid/uuid.h. 16 | # ``UUID_LIBRARIES`` 17 | # The libraries to link against to use libuuid. 18 | # 19 | # Obsolete variables 20 | # ^^^^^^^^^^^^^^^^^^ 21 | # 22 | # The following variables may also be set, for backwards compatibility: 23 | # 24 | # ``UUID_LIBRARY`` 25 | # where to find the libuuid library (same as UUID_LIBRARIES). 26 | # ``UUID_INCLUDE_DIR`` 27 | # where to find the uuid/uuid.h header (same as UUID_INCLUDE_DIRS). 28 | 29 | include(CheckCXXSymbolExists) 30 | include(CheckLibraryExists) 31 | include(FindPackageHandleStandardArgs) 32 | 33 | if(NOT UUID_INCLUDE_DIR) 34 | find_path(UUID_INCLUDE_DIR uuid/uuid.h) 35 | endif() 36 | 37 | if(EXISTS "${UUID_INCLUDE_DIR}") 38 | set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR}) 39 | set(CMAKE_REQUIRED_INCLUDES ${UUID_INCLUDE_DIRS}) 40 | check_cxx_symbol_exists("uuid_generate_random" "uuid/uuid.h" _uuid_header_only) 41 | endif() 42 | 43 | if(NOT _uuid_header_only AND NOT UUID_LIBRARY) 44 | check_library_exists("uuid" "uuid_generate_random" "" _have_libuuid) 45 | if(_have_libuuid) 46 | set(UUID_LIBRARY "uuid") 47 | endif() 48 | endif() 49 | 50 | if(UUID_LIBRARY) 51 | set(UUID_LIBRARIES ${UUID_LIBRARY}) 52 | endif() 53 | 54 | unset(CMAKE_REQUIRED_INCLUDES) 55 | unset(_uuid_header_only) 56 | unset(_have_libuuid) 57 | 58 | find_package_handle_standard_args(uuid DEFAULT_MSG UUID_INCLUDE_DIR) 59 | mark_as_advanced(UUID_INCLUDE_DIR UUID_LIBRARY) 60 | -------------------------------------------------------------------------------- /cmake/modules/MacroAddDoxygen.cmake: -------------------------------------------------------------------------------- 1 | ## 2 | ## Doxygen macro, allow Doxygen generation from cmake 3 | ## do a ""make doc" for the generation 4 | 5 | 6 | macro(addDoxyGeneration DOXYFILE_LOCATION) 7 | 8 | 9 | find_package(Doxygen) 10 | if(DOXYGEN_FOUND) 11 | 12 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${DOXYFILE_LOCATION} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) 13 | 14 | add_custom_target(doxygen 15 | ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile 16 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 17 | COMMENT "Generating API documentation with Doxygen" VERBATIM 18 | ) 19 | endif(DOXYGEN_FOUND) 20 | 21 | 22 | endmacro(addDoxyGeneration DOXYFILE_LOCATION) 23 | -------------------------------------------------------------------------------- /cmake/modules/ReleaseDebugAutoFlags.cmake: -------------------------------------------------------------------------------- 1 | ## debug / release autoManagement 2 | 3 | 4 | if(MSVC) 5 | set(CMAKE_C_FLAGS_RELEASE "-O2") 6 | set(CMAKE_C_FLAGS_DEBUG "-Wall") 7 | set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -Wall") 8 | 9 | set(CMAKE_CXX_FLAGS_RELEASE "-O2") 10 | set(CMAKE_CXX_FLAGS_DEBUG "-Wall") 11 | set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -Wall") 12 | elseif (CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") 13 | set(CMAKE_C_FLAGS_RELEASE "-O2 -Wno-unused-parameter") 14 | set(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra -pedantic -Wno-unused-parameter") 15 | set(CMAKE_C_FLAGS_RELWITHDEBINFO " -Wall -g -O2") 16 | 17 | set(CMAKE_CXX_FLAGS_RELEASE "-Wall -Wextra -Wno-unused-parameter -O2") 18 | set(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -Wextra -Wno-unused-parameter") 19 | set(CMAKE_CXX_FLAGS_RELWITHDEBINFO " -Wall -Wextra -Wno-unused-parameter -g -O2") 20 | else() 21 | set(CMAKE_C_FLAGS_RELEASE "-O2 -Wno-unused-parameter") 22 | set(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra -pedantic -fstack-protector-all -Wno-unused-parameter") 23 | set(CMAKE_C_FLAGS_RELWITHDEBINFO " -Wall -g -O2") 24 | 25 | set(CMAKE_CXX_FLAGS_RELEASE "-Wall -Wextra -Wno-unused-parameter -O2") 26 | set(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -Wextra -Wno-unused-parameter -fstack-protector-all") 27 | set(CMAKE_CXX_FLAGS_RELWITHDEBINFO " -Wall -Wextra -Wno-unused-parameter -g -O2") 28 | endif() -------------------------------------------------------------------------------- /cmake/modules/buildCurl.cmake: -------------------------------------------------------------------------------- 1 | macro(buildCurl) 2 | include(ExternalProject) 3 | 4 | set(SECURE_TRANSPORT_FLAGS "") 5 | if(APPLE) 6 | set(SECURE_TRANSPORT_FLAGS "-DCMAKE_USE_SECTRANSP=ON -DCMAKE_USE_OPENSSL=OFF -DCURL_CA_PATH=none") 7 | endif() 8 | 9 | ExternalProject_Add(BuildCurlBundled 10 | SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/curl" 11 | BINARY_DIR "${CMAKE_BINARY_DIR}/deps/curl" 12 | PREFIX "${CMAKE_BINARY_DIR}/deps/curl" 13 | PATCH_COMMAND bash -c "(test -f .git && git checkout -q lib/setopt.c lib/socks.c tests/data/Makefile.inc || true) && set -x && git apply ${CMAKE_SOURCE_DIR}/curl-CVE-2022-32221.patch ${CMAKE_SOURCE_DIR}/curl-CVE-2023-38545_7.69.0.patch" 14 | CONFIGURE_COMMAND bash -c "${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_INSTALL_LIBDIR=lib -DHTTP_ONLY=ON -DBUILD_CURL_EXE=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_USE_LIBSSH2=OFF ${SECURE_TRANSPORT_FLAGS} ${CMAKE_SOURCE_DIR}/deps/curl && ${CMAKE_SOURCE_DIR}/patch-curl-clock-gettime.sh" 15 | BUILD_COMMAND make 16 | INSTALL_COMMAND make DESTDIR=${CMAKE_BINARY_DIR}/deps/curl-install install 17 | ) 18 | 19 | add_library(libcurl STATIC IMPORTED) 20 | set_property(TARGET libcurl PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/deps/curl-install/usr/lib/libcurl.a) 21 | add_dependencies(libcurl BuildCurlBundled) 22 | 23 | # Replace with the following when possible: 24 | # target_include_directories(libcurl INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/deps/curl/include) 25 | set_property(TARGET libcurl APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/deps/curl/include) 26 | 27 | endmacro() 28 | -------------------------------------------------------------------------------- /cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 2 | MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") 3 | ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 4 | 5 | FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 6 | STRING(REGEX REPLACE "\n" ";" files "${files}") 7 | FOREACH(file ${files}) 8 | MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 9 | IF(EXISTS "$ENV{DESTDIR}${file}") 10 | EXEC_PROGRAM( 11 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 12 | OUTPUT_VARIABLE rm_out 13 | RETURN_VALUE rm_retval 14 | ) 15 | IF(NOT "${rm_retval}" STREQUAL 0) 16 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 17 | ENDIF(NOT "${rm_retval}" STREQUAL 0) 18 | ELSE(EXISTS "$ENV{DESTDIR}${file}") 19 | MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 20 | ENDIF(EXISTS "$ENV{DESTDIR}${file}") 21 | ENDFOREACH(file) 22 | 23 | -------------------------------------------------------------------------------- /curl-CVE-2022-32221.patch: -------------------------------------------------------------------------------- 1 | diff --git a/lib/setopt.c b/lib/setopt.c 2 | index 2e494a6df..e64dc23a3 100644 3 | --- a/lib/setopt.c 4 | +++ b/lib/setopt.c 5 | @@ -486,6 +486,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) 6 | } 7 | else 8 | data->set.httpreq = HTTPREQ_GET; 9 | + data->set.upload = FALSE; 10 | break; 11 | 12 | case CURLOPT_COPYPOSTFIELDS: 13 | -------------------------------------------------------------------------------- /deps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### 2 | ## compile dependencies of davix 3 | 4 | add_subdirectory(libneon) 5 | 6 | -------------------------------------------------------------------------------- /deps/libneon/.package: -------------------------------------------------------------------------------- 1 | announce-list=neon@lists.manyfish.co.uk 2 | -------------------------------------------------------------------------------- /deps/libneon/.release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -ex 4 | 5 | major=`echo $1 | awk -F. '{print $1;}'` 6 | minor=`echo $1 | awk -F. '{print $2;}'` 7 | release=`echo $1 | awk -F. '{print $3;}'` 8 | version=$1 9 | 10 | for f in config.hw; do 11 | in=$f.in 12 | out=$f 13 | sed -e "s/@VERSION@/$version/g" \ 14 | -e "s/@MAJOR@/$major/g" \ 15 | -e "s/@MINOR@/$minor/g" \ 16 | -e "s/@RELEASE@/$release/g" \ 17 | -e "s,@top_srcdir@,`pwd`,g" < $in > $out 18 | done 19 | 20 | echo $1 > .version 21 | 22 | # for the documentation: 23 | date +"%e %B %Y" | tr -d '\n' > doc/date.xml 24 | echo -n $1 > doc/version.xml 25 | 26 | ALL_LINGUAS=`echo po/*.po | sed 's,po/,,g;s,\.po,,g'` 27 | 28 | # Try to create a valid Makefile 29 | tmp=`mktemp /tmp/neon-XXXXXX` 30 | sed -e 's,@SET_MAKE@,,;s,@SHELL@,/bin/sh,' \ 31 | -e "s,@top_srcdir@,`pwd`," \ 32 | -e "s,@ALL_LINGUAS@,${ALL_LINGUAS}," \ 33 | < Makefile.in > $tmp 34 | make -f $tmp docs compile-gmo 35 | rm -f $tmp 36 | -------------------------------------------------------------------------------- /deps/libneon/.version: -------------------------------------------------------------------------------- 1 | 0.29.6 2 | -------------------------------------------------------------------------------- /deps/libneon/AUTHORS: -------------------------------------------------------------------------------- 1 | neon is Copyright (C) 1999-2007 Joe Orton 2 | Portions are: 3 | Copyright (C) 1999-2000 Tommi Komulainen 4 | Copyright (C) 1999-2000 Peter Boos 5 | Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. 6 | Copyright (C) 2004 Aleix Conchillo Flaque 7 | Copyright (C) 2004 Jiang Lei 8 | Copyright (C) 2004-2005 Vladimir Berezniker @ http://public.xdi.org/=vmpn 9 | -------------------------------------------------------------------------------- /deps/libneon/BUGS: -------------------------------------------------------------------------------- 1 | 2 | Known problems/bugs in neon -*- text -*- 3 | --------------------------- 4 | 5 | * several reports of issues with long-lived sessions causing problems 6 | with GSSAPI auth using mod_auth_kerb. May be a server problem, but 7 | needs further investigation to be sure. 8 | 9 | * 2818 requires that a on rejection of the SSL server cert, a "bad certificate" 10 | message should be sent - this is not being done currently (and can probably 11 | only be done with OpenSSL by actually doing cert verification in the verify 12 | callback) 13 | 14 | * ne_lock_discover does not handle multiple (shared) locks on 15 | a single resource. 16 | 17 | * SSL session caching issues; only cache for clean shutdowns, and 18 | only cache on shutdown, since the SSL_SESSION may change during 19 | an ne_session? 20 | 21 | * perhaps allow a per-Server-header hack for "Darwin Streaming Server 22 | 4.0" which doesn't terminate the response headers: 23 | http://bugzilla.gnome.org/show_bug.cgi?id=366331 24 | 25 | HTTP/1.1 200 OK 26 | Server: Darwin Streaming Server 4.0 27 | Content-Type: audio/mpeg 28 | Cache-Control: no-cache 29 | Pragma: no-cache 30 | Connection: close 31 | W8޳����s0�� 32 | 33 | * for a server with multiple A addresses, a successful connect() will 34 | "pin" that address for future attempts to connect. If subsequently 35 | a connect() fails, neon should at least iterate through the entire 36 | address list and at best should do the DNS lookup again. 37 | 38 | * should 207 code strclean the error string from the response body? 39 | 40 | * load_client_cert fails with: 41 | 42 | load_client_cert: (did not fail to load clicert without pkey) 43 | 44 | on RHEL4 openssl. 45 | 46 | * --with-ca-bundle only allows trusting a PEM bundle; support 47 | by directory as well 48 | -------------------------------------------------------------------------------- /deps/libneon/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(libneon-tuned) 2 | cmake_minimum_required (VERSION 3.0) 3 | # main file for src 4 | 5 | set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/") 6 | 7 | # load module 8 | include(ReleaseDebugAutoFlags REQUIRED) 9 | include(PortabilityGNUCheck REQUIRED) 10 | set(OUTPUT_NAME_DAVIX "neon") 11 | set(VERSION_MAJOR 0) 12 | set(VERSION_MINOR 0) 13 | set(VERSION_PATCH 29) 14 | set(VERSION_STRING ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) 15 | 16 | set(HAVE_LIBXML 1) 17 | set(HAVE_IPV6 ${ENABLE_IPV6}) 18 | set(TCP_NODELAY ${ENABLE_TCP_NODELAY}) 19 | 20 | configure_file(config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY) 21 | 22 | add_library(LibNeonObjects OBJECT 23 | src/ne_207.c 24 | src/ne_acl3744.c 25 | src/ne_alloc.c 26 | src/ne_auth.c 27 | src/ne_basic.c 28 | src/ne_compress.c 29 | src/ne_dates.c 30 | src/ne_i18n.c 31 | src/ne_locks.c 32 | src/ne_md5.c 33 | src/ne_ntlm.c 34 | src/ne_oldacl.c 35 | src/ne_pkcs11.c 36 | src/ne_props.c 37 | src/ne_redirect.c 38 | src/ne_request.c 39 | src/ne_session.c 40 | src/ne_socket.c 41 | src/ne_socks.c 42 | src/ne_sspi.c 43 | src/ne_string.c 44 | src/ne_uri.c 45 | src/ne_utils.c 46 | src/ne_xml.c 47 | src/ne_xmlreq.c 48 | src/ne_openssl.c 49 | ) 50 | 51 | target_compile_options(LibNeonObjects PRIVATE 52 | -std=gnu99 -fPIC -DNEON_VERSION="${VERSION_STRING}" 53 | -DNE_VERSION_MAJOR=${VERSION_MAJOR} -DNE_VERSION_MINOR=${VERSION_MINOR} 54 | -Wno-unused-parameter -fvisibility=hidden 55 | ) 56 | 57 | target_include_directories(LibNeonObjects 58 | PRIVATE ${LIBXML2_INCLUDE_DIR} 59 | ${CMAKE_CURRENT_SOURCE_DIR} 60 | ${CMAKE_CURRENT_BINARY_DIR} 61 | ${CMAKE_CURRENT_SOURCE_DIR}/../ 62 | ${OPENSSL_INCLUDE_DIR} 63 | ) 64 | -------------------------------------------------------------------------------- /deps/libneon/ChangeLog.CVS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/ChangeLog.CVS -------------------------------------------------------------------------------- /deps/libneon/NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/NEWS -------------------------------------------------------------------------------- /deps/libneon/THANKS: -------------------------------------------------------------------------------- 1 | Thanks go to the following people for contributing to neon development 2 | with code, patches, or good bug reports or suggestions. 3 | 4 | Arun Garg, Blair Zajac, Branko Èibej, Daniel Berlin, David Sloat, 5 | David Reid, Dirk Bergstrom, Ulrich Drepper, Gerald Richter, Greg 6 | Stein, Gregor Bornemann, Jeff Johnson, Jeremy Elson, Jim Whitehead, 7 | Johan Lindh, Justin Erenkrantz, Kai Sommerfeld, Keith Wannamaker, Lee 8 | Mallabone, Magnus Sirwiö, Markus Mueller, Max Bowsher, Michael 9 | Sobolev, Mike Rosellini, Mo DeJong, Noriaki Takamiya, Olof Oberg, 10 | Pawel Golaszewski, Peter Boos, Peter Moulder, rado, Risko Gergely, 11 | Rodney Dawes, Sam TH, Sander Alberink, Sander Striker, Stefan Esser, 12 | Shane Mayer, Taisuke Yamada, Teng Xu, Tom Bednarz, Tom Lee, Tommi 13 | Komulainen, Torsten Kalix, Wilfredo Sánchez, Daniel Veillard, Vladimir 14 | Berezniker, Jiang Lei, Werner Baumann, Mike DiCuccio, Gisle Vanem, 15 | Hans Meine, Laszlo Boszormenyi, Matthias Miller, Albert Chin, 16 | Kiyo Kelvin Lee, D.J. Heap, Dongsheng Song, Aleix Conchillo Flaque. 17 | -------------------------------------------------------------------------------- /deps/libneon/TODO: -------------------------------------------------------------------------------- 1 | 2 | To Do List for neon -*- text -*- 3 | =================== 4 | 5 | Please submit feature requests to 6 | 7 | For one-point-oh 8 | ---------------- 9 | 10 | Longer term 11 | ----------- 12 | 13 | 6. PUT with ranges... ne_put_range 14 | 15 | 9. DeltaV support (http://www.webdav.org/deltav/). See also the 16 | subversion project (http://subversion.tigris.org/) who might build 17 | a versioning system over DAV. 18 | 19 | 14. Improved request-header manipulation... some kind of indexed table 20 | (a la Apache, libghttp, so we're sure we don't add the same header 21 | to the request twice. Better control over adding Cache-Control 22 | headers would be good too. 23 | 24 | 21. Storing multiple authentication "sessions" within an actual 25 | auth_session, so I can log into e.g. /foo/ and /bar/ (which are 26 | not in the same authentication domain) and switch between them 27 | without having to re-enter passwords all the time. 28 | 29 | 46. Asynchronous request-dispatching? Makes integration into GUI loop 30 | easy... any other reasons? Must leave existing request_dispatch 31 | interface intact. 32 | 33 | 50. opendir/readdir/closedir-esque interface for PROPFIND depth 1, 34 | a la EZDAV. (cadaver has it already) 35 | 36 | -------------------------------------------------------------------------------- /deps/libneon/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -f ltconfig ltmain.sh config.cache aclocal.m4 config.guess config.sub 3 | # remove the autoconf cache 4 | rm -rf autom4te*.cache 5 | # create a .version file for configure.in 6 | if test ! -f .version; then 7 | # Building from SVN rather than in a release 8 | echo 0.0.0-dev > .version 9 | # for the documentation: 10 | date +"%e %B %Y" | tr -d '\n' > doc/date.xml 11 | echo -n 0.0.0-dev > doc/version.xml 12 | fi 13 | set -e 14 | echo -n "libtoolize... " 15 | LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} 16 | if ${LIBTOOLIZE} --help | grep -- --install > /dev/null; then 17 | ${LIBTOOLIZE} --copy --force --install >/dev/null; 18 | else 19 | ${LIBTOOLIZE} --copy --force >/dev/null 20 | fi 21 | echo -n "aclocal... " 22 | ${ACLOCAL:-aclocal} -I macros 23 | echo -n "autoheader... " 24 | ${AUTOHEADER:-autoheader} 25 | echo -n "autoconf... " 26 | ${AUTOCONF:-autoconf} -Wall 27 | echo okay. 28 | # remove the autoconf cache 29 | rm -rf autom4te*.cache 30 | -------------------------------------------------------------------------------- /deps/libneon/doc/date.xml: -------------------------------------------------------------------------------- 1 | 3 May 2011 -------------------------------------------------------------------------------- /deps/libneon/doc/man.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_addr_destroy.3: -------------------------------------------------------------------------------- 1 | .so ne_addr_resolve.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_addr_error.3: -------------------------------------------------------------------------------- 1 | .so ne_addr_resolve.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_addr_first.3: -------------------------------------------------------------------------------- 1 | .so ne_addr_resolve.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_addr_next.3: -------------------------------------------------------------------------------- 1 | .so ne_addr_resolve.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_addr_result.3: -------------------------------------------------------------------------------- 1 | .so ne_addr_resolve.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_buffer_altered.3: -------------------------------------------------------------------------------- 1 | .so ne_buffer_clear.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_buffer_concat.3: -------------------------------------------------------------------------------- 1 | .so ne_buffer_append.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_buffer_finish.3: -------------------------------------------------------------------------------- 1 | .so ne_buffer_destroy.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_buffer_grow.3: -------------------------------------------------------------------------------- 1 | .so ne_buffer_clear.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_buffer_ncreate.3: -------------------------------------------------------------------------------- 1 | .so ne_buffer_create.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_buffer_zappend.3: -------------------------------------------------------------------------------- 1 | .so ne_buffer_append.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_calloc.3: -------------------------------------------------------------------------------- 1 | .so ne_malloc.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_close_connection.3: -------------------------------------------------------------------------------- 1 | .so ne_session_create.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_forget_auth.3: -------------------------------------------------------------------------------- 1 | .so ne_set_server_auth.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_get_request_flag.3: -------------------------------------------------------------------------------- 1 | .so ne_set_request_flag.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_get_scheme.3: -------------------------------------------------------------------------------- 1 | .so ne_set_useragent.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_get_server_hostport.3: -------------------------------------------------------------------------------- 1 | .so ne_set_useragent.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_get_session_flag.3: -------------------------------------------------------------------------------- 1 | .so ne_set_session_flag.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_iaddr_cmp.3: -------------------------------------------------------------------------------- 1 | .so ne_iaddr_make.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_iaddr_free.3: -------------------------------------------------------------------------------- 1 | .so ne_iaddr_make.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_iaddr_parse.3: -------------------------------------------------------------------------------- 1 | .so ne_iaddr_make.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_iaddr_print.3: -------------------------------------------------------------------------------- 1 | .so ne_iaddr_make.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_iaddr_raw.3: -------------------------------------------------------------------------------- 1 | .so ne_iaddr_make.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_iaddr_reverse.3: -------------------------------------------------------------------------------- 1 | .so ne_iaddr_make.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_iaddr_typeof.3: -------------------------------------------------------------------------------- 1 | .so ne_iaddr_make.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_oom_callback.3: -------------------------------------------------------------------------------- 1 | .so ne_malloc.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_print_request_header.3: -------------------------------------------------------------------------------- 1 | .so ne_add_request_header.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_qtoken.3: -------------------------------------------------------------------------------- 1 | .so ne_token.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_realloc.3: -------------------------------------------------------------------------------- 1 | .so ne_malloc.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_request_destroy.3: -------------------------------------------------------------------------------- 1 | .so ne_request_create.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_request_dispatch.3: -------------------------------------------------------------------------------- 1 | .so ne_request_create.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_response_header_iterate.3: -------------------------------------------------------------------------------- 1 | .so ne_get_response_header.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_session_destroy.3: -------------------------------------------------------------------------------- 1 | .so ne_session_create.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_session_proxy.3: -------------------------------------------------------------------------------- 1 | .so ne_session_create.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_set_connect_timeout.3: -------------------------------------------------------------------------------- 1 | .so ne_set_useragent.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_set_error.3: -------------------------------------------------------------------------------- 1 | .so ne_get_error.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_set_proxy_auth.3: -------------------------------------------------------------------------------- 1 | .so ne_set_server_auth.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_set_read_timeout.3: -------------------------------------------------------------------------------- 1 | .so ne_set_useragent.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_set_request_body_fd.3: -------------------------------------------------------------------------------- 1 | .so ne_set_request_body_buffer.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_set_request_body_fd64.3: -------------------------------------------------------------------------------- 1 | .so ne_set_request_body_buffer.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_sock_exit.3: -------------------------------------------------------------------------------- 1 | .so ne_sock_init.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_ssl_cert_export.3: -------------------------------------------------------------------------------- 1 | .so ne_ssl_cert_read.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_ssl_cert_free.3: -------------------------------------------------------------------------------- 1 | .so ne_ssl_cert_cmp.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_ssl_cert_import.3: -------------------------------------------------------------------------------- 1 | .so ne_ssl_cert_read.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_ssl_cert_issuer.3: -------------------------------------------------------------------------------- 1 | .so ne_ssl_cert_identity.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_ssl_cert_signedby.3: -------------------------------------------------------------------------------- 1 | .so ne_ssl_cert_identity.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_ssl_cert_subject.3: -------------------------------------------------------------------------------- 1 | .so ne_ssl_cert_identity.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_ssl_cert_write.3: -------------------------------------------------------------------------------- 1 | .so ne_ssl_cert_read.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_ssl_clicert_decrypt.3: -------------------------------------------------------------------------------- 1 | .so ne_ssl_clicert_read.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_ssl_clicert_encrypted.3: -------------------------------------------------------------------------------- 1 | .so ne_ssl_clicert_read.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_ssl_clicert_free.3: -------------------------------------------------------------------------------- 1 | .so ne_ssl_clicert_read.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_ssl_clicert_name.3: -------------------------------------------------------------------------------- 1 | .so ne_ssl_clicert_read.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_ssl_clicert_owner.3: -------------------------------------------------------------------------------- 1 | .so ne_ssl_clicert_read.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_ssl_dname_cmp.3: -------------------------------------------------------------------------------- 1 | .so ne_ssl_readable_dname.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_ssl_trust_default_ca.3: -------------------------------------------------------------------------------- 1 | .so ne_ssl_trust_cert.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_strdup.3: -------------------------------------------------------------------------------- 1 | .so ne_malloc.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_strndup.3: -------------------------------------------------------------------------------- 1 | .so ne_malloc.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_version_string.3: -------------------------------------------------------------------------------- 1 | .so ne_version_match.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/man/ne_xml_destroy.3: -------------------------------------------------------------------------------- 1 | .so ne_xml_create.3 2 | -------------------------------------------------------------------------------- /deps/libneon/doc/manual.css: -------------------------------------------------------------------------------- 1 | 2 | p, pre.funcsynopsisinfo { margin-left: 0.4em; margin-right: 0.4em; } 3 | 4 | span.term { margin-left: 0.6em; margin-bottom: 0.0em } 5 | 6 | div.legalnotice { font-size: 80%; margin-left: 2em; } 7 | 8 | a:visited { color: darkgreen; } 9 | 10 | div.navheader { border-top: 1px solid #bbf2bb; } 11 | div.navfooter { border-bottom: 1px solid #bbf2bb; } 12 | 13 | div.funcprototype { margin-top: 0.2em; margin-left: 0.4em; margin-bottom: 0.2em; } 14 | 15 | pre.programlisting, pre.screen { 16 | background-color: #dddddd; 17 | margin-left: 0.6em; margin-right: 1em; 18 | padding: 0.3em; width: 50em; 19 | } 20 | 21 | div.funcsynopsis, div.cmdsynopsis { 22 | background-color: #dddddd; 23 | margin-left: 0.4em; margin-right: 0.4em; 24 | padding: 0.1em; 25 | } 26 | 27 | div.warning { 28 | border: 1px solid #777777; 29 | } 30 | 31 | h1.title { border-bottom: thick solid #bbf2bb; padding-bottom: 0.1em; } 32 | 33 | div.toc { 34 | border-left: thick solid #bbf2bb; padding-left: 0.5em; 35 | } 36 | 37 | h2, h3 { padding-left: 0.2em; padding-top: -0.1em; } 38 | 39 | h2 { background-color: #bbf2bb; font-size: 110%; 40 | padding-bottom: 0.3em; padding-top: 0.2em; spacing-top: 0.1em; } 41 | 42 | h3 { border-bottom: 1px solid #bbf2bb; } 43 | -------------------------------------------------------------------------------- /deps/libneon/doc/ref/buf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ne_buffer 5 | 3 6 | 7 | 8 | 9 | ne_buffer 10 | string buffer handling 11 | 12 | 13 | 14 | 15 | #include <ne_string.h> 16 | 17 | typedef struct { 18 | char *data; 19 | size_t used; 20 | size_t length; 21 | } ne_buffer; 22 | 23 | 24 | 25 | 26 | Description 27 | 28 | The ne_buffer type represents an expandable 29 | memory buffer for holding &nul;-terminated strings. The 30 | data field points to the beginnning of the 31 | string, the length of which is given by the 32 | used field. The current size of memory 33 | allocated is given by the length field. It 34 | is not recommended that the fields of a buffer are manipulated 35 | directly. The data pointer may change when 36 | the buffer is modified. 37 | 38 | A buffer is created using or , and destroyed using or . 42 | The functions , and are 44 | used to append data to a buffer. 45 | 46 | If the string referenced by the 47 | data pointer is modified directly (rather 48 | than using one of the functions listed above), 49 | ne_buffer_altered must be called. 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /deps/libneon/doc/ref/bufcr.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ne_buffer_create 5 | 3 6 | 7 | 8 | 9 | ne_buffer_create 10 | ne_buffer_ncreate 11 | create a string buffer 12 | 13 | 14 | 15 | 16 | 17 | 18 | #include <ne_alloc.h> 19 | 20 | 21 | ne_buffer *ne_buffer_create 22 | 23 | 24 | 25 | 26 | ne_buffer *ne_buffer_ncreate 27 | size_t size 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | Description 36 | 37 | ne_buffer_create creates a new 38 | buffer object, with an implementation-defined initial size. 39 | ne_buffer_ncreate creates an 40 | ne_buffer where the minimum initial size is given in the 41 | size parameter. The buffer created will 42 | contain the empty string (""). 43 | 44 | 45 | 46 | 47 | Return value 48 | 49 | Both functions return a pointer to a new buffer object, 50 | and never &null;. 51 | 52 | 53 | 54 | 55 | See also 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /deps/libneon/doc/ref/shave.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ne_shave 5 | 3 6 | 7 | 8 | 9 | ne_shave 10 | trim whitespace from a string 11 | 12 | 13 | 14 | 15 | 16 | 17 | #include <ne_string.h> 18 | 19 | 20 | char *ne_shave 21 | char *str 22 | const char *whitespace 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | Description 31 | 32 | ne_shave returns a portion of 33 | str with any leading or trailing characters in 34 | the whitespace array removed. 35 | str may be modified. Note that the return 36 | value may not be equal to str. 37 | 38 | 39 | 40 | 41 | Examples 42 | 43 | The following code segment will output 44 | "fish": 45 | 46 | char s[] = ".!.fish!.!"; 47 | puts(ne_shave(s, ".!")); 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /deps/libneon/doc/ref/sslcert2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ne_ssl_cert_cmp 5 | 3 6 | 7 | 8 | 9 | ne_ssl_cert_cmp 10 | ne_ssl_cert_free 11 | functions to operate on certificate objects 12 | 13 | 14 | 15 | 16 | 17 | 18 | #include <ne_header.h> 19 | 20 | 21 | int ne_ssl_cert_cmp 22 | const ne_ssl_certificate *c1 23 | const ne_ssl_certificate *c2 24 | 25 | 26 | 27 | void ne_ssl_cert_free 28 | ne_ssl_certificate *cert 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | Description 37 | 38 | The ne_ssl_cert_cmp function can be 39 | used to compare two certificate objects; it returns zero if they 40 | refer to the same certificate, and non-zero otherwise. 41 | 42 | The ne_ssl_cert_free function can be 43 | used to destroy a certificate object when it is no longer 44 | needed. 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /deps/libneon/doc/ref/xml.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ne_xml_create 5 | 3 6 | 7 | 8 | 9 | ne_xml_create 10 | ne_xml_destroy 11 | create and destroy an XML parser 12 | 13 | 14 | 15 | 16 | 17 | 18 | #include <ne_xml.h> 19 | 20 | 21 | ne_xml_parser *ne_xml_create 22 | 23 | 24 | 25 | 26 | void ne_xml_destroy 27 | ne_xml_parser *parser 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | Description 36 | 37 | The ne_xml_create function creates an 38 | XML parser object, which can be used for parsing XML documents 39 | using stacked SAX handlers. 40 | 41 | 42 | 43 | 44 | Return value 45 | 46 | ne_xml_create returns a pointer to an 47 | XML parser object, and never &null; 48 | 49 | 50 | See also 51 | 52 | XXX 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /deps/libneon/doc/refentry.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ne_foo 5 | 3 6 | 7 | 8 | 9 | ne_foo 10 | ne_bar 11 | functions which do foo and bar 12 | 13 | 14 | 15 | 16 | 17 | 18 | #include <ne_header.h> 19 | 20 | 21 | void ne_set_useragent 22 | ne_session *session 23 | const char *product 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | Description 32 | 33 | XXX 34 | 35 | 36 | 37 | 38 | Return value 39 | 40 | XXX 41 | 42 | 43 | 44 | Examples 45 | 46 | XXX 47 | 48 | 49 | 50 | See also 51 | 52 | XXX 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /deps/libneon/doc/ssl.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Secure connections: HTTP over SSL 4 | 5 | This section gives an introduction to SSL. The text is 6 | inspired by . 7 | 8 | &neon; supports the use of HTTP over SSLThe 9 | term SSL is used throughout this section to refer in 10 | general to both the SSL protocol developed by Netscape and its 11 | successor TLS, as adopted by the IETF. to implement 12 | secure connections. A secure connection in 13 | this context means a connection which has 14 | integrity, secrecy and is 15 | authenticated. Applications must go to some 16 | effort to correctly support secure connections—an application 17 | based on &neon; does not magically become secure simply 18 | by flicking a switch and enabling the use of SSL. 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /deps/libneon/doc/version.xml: -------------------------------------------------------------------------------- 1 | 0.29.6 -------------------------------------------------------------------------------- /deps/libneon/macros/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/macros/ChangeLog -------------------------------------------------------------------------------- /deps/libneon/macros/ld-version-script.m4: -------------------------------------------------------------------------------- 1 | # ld-version-script.m4 serial 1 2 | dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Simon Josefsson 8 | 9 | # FIXME: The test below returns a false positive for mingw 10 | # cross-compiles, 'local:' statements does not reduce number of 11 | # exported symbols in a DLL. Use --disable-ld-version-script to work 12 | # around the problem. 13 | 14 | # gl_LD_VERSION_SCRIPT 15 | # -------------------- 16 | # Check if LD supports linker scripts, and define automake conditional 17 | # HAVE_LD_VERSION_SCRIPT if so. 18 | AC_DEFUN([gl_LD_VERSION_SCRIPT], 19 | [ 20 | AC_ARG_ENABLE([ld-version-script], 21 | AS_HELP_STRING([--enable-ld-version-script], 22 | [enable linker version script (default is enabled when possible)]), 23 | [have_ld_version_script=$enableval], []) 24 | if test -z "$have_ld_version_script"; then 25 | AC_MSG_CHECKING([if LD -Wl,--version-script works]) 26 | save_LDFLAGS="$LDFLAGS" 27 | LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" 28 | cat > conftest.map < -*- autoconf -*- 2 | # 3 | # This file is free software; you may copy and/or distribute it with 4 | # or without modifications, as long as this notice is preserved. 5 | # This software is distributed in the hope that it will be useful, but 6 | # WITHOUT ANY WARRANTY, to the extent permitted by law; without even 7 | # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 8 | # PURPOSE. 9 | 10 | # The above license applies to THIS FILE ONLY, the neon library code 11 | # itself may be copied and distributed under the terms of the GNU 12 | # LGPL, see COPYING.LIB for more details 13 | 14 | # This file is part of the neon HTTP/WebDAV client library. 15 | # See http://www.webdav.org/neon/ for the latest version. 16 | # Please send any feedback to 17 | 18 | # Tests needed for the neon-test common test code. 19 | 20 | AC_DEFUN([NE_FORMAT_TIMET], [ 21 | NEON_FORMAT(time_t, [ 22 | #ifdef HAVE_SYS_TIME_H 23 | #include 24 | #endif]) 25 | ]) 26 | 27 | AC_DEFUN([NEON_TEST], [ 28 | 29 | AC_REQUIRE([NEON_COMMON_CHECKS]) 30 | AC_REQUIRE([NE_FORMAT_TIMET]) 31 | 32 | AC_REQUIRE([AC_TYPE_PID_T]) 33 | AC_REQUIRE([AC_HEADER_TIME]) 34 | 35 | dnl NEON_XML_PARSER may add things (e.g. -I/usr/local/include) to 36 | dnl CPPFLAGS which make "gcc -Werror" fail in NEON_FORMAT; suggest 37 | dnl this macro is used first. 38 | AC_BEFORE([$0], [NEON_XML_PARSER]) 39 | 40 | AC_CHECK_HEADERS(sys/time.h stdint.h locale.h signal.h) 41 | 42 | AC_CHECK_FUNCS(pipe isatty usleep shutdown setlocale gethostname) 43 | 44 | AC_REQUIRE([NE_FIND_AR]) 45 | 46 | ]) 47 | -------------------------------------------------------------------------------- /deps/libneon/macros/socklen-arg-type.m4: -------------------------------------------------------------------------------- 1 | dnl This function is (C) 1997,98,99 Stephan Kulow (coolo@kde.org) 2 | dnl Modifications (C) Joe Orton 1999,2000 3 | 4 | AC_DEFUN([SOCKLEN_ARG_TYPE],[ 5 | 6 | dnl Check for the type of the third argument of getsockname 7 | AC_MSG_CHECKING(for the third argument of getsockname) 8 | AC_CACHE_VAL(ac_cv_ksize_t, 9 | [AC_TRY_COMPILE([ 10 | #include 11 | #include 12 | ],[ 13 | socklen_t a=0; 14 | getsockname(0,(struct sockaddr*)0, &a); 15 | ], 16 | ac_cv_ksize_t=socklen_t, 17 | ac_cv_ksize_t=) 18 | if test -z "$ac_cv_ksize_t"; then 19 | ac_safe_cflags="$CFLAGS" 20 | if test "$GCC" = "yes"; then 21 | CFLAGS="-Werror $CFLAGS" 22 | fi 23 | AC_TRY_COMPILE([ 24 | #include 25 | #include 26 | ],[ 27 | int a=0; 28 | getsockname(0,(struct sockaddr*)0, &a); 29 | ], 30 | ac_cv_ksize_t=int, 31 | ac_cv_ksize_t=size_t) 32 | CFLAGS="$ac_safe_cflags" 33 | fi 34 | ]) 35 | 36 | if test -z "$ac_cv_ksize_t"; then 37 | ac_cv_ksize_t=int 38 | fi 39 | 40 | AC_MSG_RESULT($ac_cv_ksize_t) 41 | AC_DEFINE_UNQUOTED(ksize_t, $ac_cv_ksize_t, [Define to be the type of the third argument to getsockname]) 42 | 43 | ]) -------------------------------------------------------------------------------- /deps/libneon/neon.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: neon 7 | Description: HTTP/WebDAV client library 8 | Version: @NEON_VERSION@ 9 | Libs.private: @NEON_LIBS@ 10 | Libs: -L${libdir} -lneon @NEON_PC_LIBS@ 11 | Cflags: -I${includedir}/neon @NEON_CFLAGS@ 12 | -------------------------------------------------------------------------------- /deps/libneon/po/cs.gmo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/cs.gmo -------------------------------------------------------------------------------- /deps/libneon/po/cs.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/cs.po -------------------------------------------------------------------------------- /deps/libneon/po/de.gmo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/de.gmo -------------------------------------------------------------------------------- /deps/libneon/po/de.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/de.po -------------------------------------------------------------------------------- /deps/libneon/po/fr.gmo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/fr.gmo -------------------------------------------------------------------------------- /deps/libneon/po/fr.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/fr.po -------------------------------------------------------------------------------- /deps/libneon/po/ja.gmo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/ja.gmo -------------------------------------------------------------------------------- /deps/libneon/po/ja.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/ja.po -------------------------------------------------------------------------------- /deps/libneon/po/nn.gmo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/nn.gmo -------------------------------------------------------------------------------- /deps/libneon/po/pl.gmo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/pl.gmo -------------------------------------------------------------------------------- /deps/libneon/po/ru.gmo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/ru.gmo -------------------------------------------------------------------------------- /deps/libneon/po/ru.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/ru.po -------------------------------------------------------------------------------- /deps/libneon/po/tr.gmo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/tr.gmo -------------------------------------------------------------------------------- /deps/libneon/po/tr.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/tr.po -------------------------------------------------------------------------------- /deps/libneon/po/zh_CN.gmo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/po/zh_CN.gmo -------------------------------------------------------------------------------- /deps/libneon/src/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/src/ChangeLog -------------------------------------------------------------------------------- /deps/libneon/src/README: -------------------------------------------------------------------------------- 1 | 2 | This is the source directory of the 'neon' HTTP/WebDAV client library, 3 | which can be bundled inside other packages. For the complete neon 4 | package, see: 5 | 6 | http://www.webdav.org/neon/ 7 | 8 | This source directory may be distributed and/or modified under the 9 | terms of the GNU Library General Public License, as given in 10 | COPYING.LIB. 11 | 12 | Please send questions, bug reports, feature requests, etc, regarding 13 | the neon library, to the mailing list at: 14 | 15 | neon@lists.manyfish.co.uk 16 | -------------------------------------------------------------------------------- /deps/libneon/src/ne_acl.h: -------------------------------------------------------------------------------- 1 | /* 2 | Access control 3 | Copyright (C) 2001-2006, Joe Orton 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with this library; if not, write to the Free 17 | Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 18 | MA 02111-1307, USA 19 | 20 | */ 21 | 22 | /* 23 | * DEPRECATED ACL Interface. See ne_acl3744.h for replacement API. 24 | */ 25 | 26 | #ifndef NE_ACL_H 27 | #define NE_ACL_H 28 | 29 | #include "ne_session.h" 30 | 31 | NE_BEGIN_DECLS 32 | 33 | typedef struct 34 | { 35 | enum { 36 | ne_acl_href, 37 | ne_acl_property, 38 | ne_acl_all 39 | } apply; 40 | 41 | enum { 42 | ne_acl_grant, 43 | ne_acl_deny 44 | } type; 45 | 46 | char *principal; 47 | int read; 48 | int read_acl; 49 | int write; 50 | int write_acl; 51 | int read_cuprivset; 52 | } ne_acl_entry; 53 | 54 | /* Set the ACL for the given resource to the list of ACL entries. */ 55 | int ne_acl_set(ne_session *sess, const char *uri, 56 | const ne_acl_entry entries[], int numentries); 57 | 58 | NE_END_DECLS 59 | 60 | #endif /* NE_ACL_H */ 61 | -------------------------------------------------------------------------------- /deps/libneon/src/ne_compress.h: -------------------------------------------------------------------------------- 1 | /* 2 | Compressed HTTP response handling 3 | Copyright (C) 2001-2004, Joe Orton 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with this library; if not, write to the Free 17 | Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 18 | MA 02111-1307, USA 19 | 20 | */ 21 | 22 | #ifndef NE_COMPRESS_H 23 | #define NE_COMPRESS_H 24 | 25 | #include "ne_request.h" 26 | 27 | NE_BEGIN_DECLS 28 | 29 | typedef struct ne_decompress_s ne_decompress; 30 | 31 | /* Call this to register a 'reader' callback which will be passed 32 | * blocks of response body (if the 'acceptance' callback is 33 | * successful). If the response body is returned compressed by the 34 | * server, this reader will receive UNCOMPRESSED blocks. 35 | * 36 | * Returns pointer to context object which must be passed to 37 | * ne_decompress_destroy after the request has been dispatched, to 38 | * free any internal state. If an error occurs during decompression, 39 | * the request will be aborted and session error string set. */ 40 | ne_decompress *ne_decompress_reader(ne_request *req, ne_accept_response accpt, 41 | ne_block_reader rdr, void *userdata); 42 | 43 | /* Destroys decompression state. */ 44 | void ne_decompress_destroy(ne_decompress *ctx); 45 | 46 | NE_END_DECLS 47 | 48 | #endif /* NE_COMPRESS_H */ 49 | -------------------------------------------------------------------------------- /deps/libneon/src/ne_dates.h: -------------------------------------------------------------------------------- 1 | /* 2 | Date manipulation routines 3 | Copyright (C) 1999-2002, 2005, Joe Orton 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with this library; if not, write to the Free 17 | Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 18 | MA 02111-1307, USA 19 | 20 | */ 21 | 22 | #ifndef NE_DATES_H 23 | #define NE_DATES_H 24 | 25 | #include 26 | 27 | #include "ne_defs.h" 28 | 29 | NE_BEGIN_DECLS 30 | 31 | /* Date manipulation routines as per RFC1123 and RFC1036 */ 32 | 33 | /* Return current date/time in RFC1123 format */ 34 | char *ne_rfc1123_date(time_t anytime); 35 | 36 | /* Returns time from date/time using the subset of the ISO8601 format 37 | * referenced in RFC2518 (e.g as used in the creationdate property in 38 | * the DAV: namespace). */ 39 | time_t ne_iso8601_parse(const char *date); 40 | 41 | /* Returns time from date/time in RFC1123 format */ 42 | time_t ne_rfc1123_parse(const char *date); 43 | 44 | time_t ne_rfc1036_parse(const char *date); 45 | 46 | /* Parses asctime date string */ 47 | time_t ne_asctime_parse(const char *date); 48 | 49 | /* Parse an HTTP-date as per RFC2616 */ 50 | time_t ne_httpdate_parse(const char *date); 51 | 52 | NE_END_DECLS 53 | 54 | #endif /* NE_DATES_H */ 55 | -------------------------------------------------------------------------------- /deps/libneon/src/ne_i18n.c: -------------------------------------------------------------------------------- 1 | /* 2 | Internationalization of neon 3 | Copyright (C) 1999-2005, Joe Orton 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with this library; if not, write to the Free 17 | Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 18 | MA 02111-1307, USA 19 | 20 | */ 21 | 22 | #include "config.h" 23 | 24 | #include "ne_i18n.h" 25 | 26 | #ifdef HAVE_LIBINTL_H 27 | #include 28 | #endif 29 | 30 | void ne_i18n_init(const char *encoding) 31 | { 32 | #if defined(NE_HAVE_I18N) && defined(NEON_IS_LIBRARY) 33 | /* The bindtextdomain call is only enabled if neon is built as a 34 | * library rather than as a bundled source; it would be possible 35 | * in the future to allow it for bundled builds too, if the neon 36 | * message catalogs could be installed alongside the app's own 37 | * message catalogs. */ 38 | bindtextdomain("neon", LOCALEDIR); 39 | 40 | #ifdef HAVE_BIND_TEXTDOMAIN_CODESET 41 | if (encoding) { 42 | bind_textdomain_codeset("neon", encoding); 43 | } 44 | #endif /* HAVE_BIND_TEXTDOMAIN_CODESET */ 45 | 46 | #endif 47 | } 48 | -------------------------------------------------------------------------------- /deps/libneon/src/ne_ntlm.h: -------------------------------------------------------------------------------- 1 | /* 2 | Handling of NTLM Authentication 3 | Copyright (C) 2009, Kai Sommerfeld 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with this library; if not, write to the Free 17 | Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 18 | MA 02111-1307, USA 19 | 20 | */ 21 | #ifndef NE_NTLM_H 22 | #define NE_NTLM_H 23 | 24 | #include "config.h" 25 | 26 | /* PRIVATE TO NEON -- NOT PART OF THE EXTERNAL API. */ 27 | 28 | #ifdef HAVE_NTLM 29 | 30 | #include "ne_defs.h" 31 | 32 | typedef struct ne_ntlm_context_s ne_ntlm_context; 33 | 34 | NE_PRIVATE ne_ntlm_context *ne__ntlm_create_context(const char *userName, const char *password); 35 | 36 | NE_PRIVATE int ne__ntlm_clear_context(ne_ntlm_context *context); 37 | 38 | NE_PRIVATE void ne__ntlm_destroy_context(ne_ntlm_context *context); 39 | 40 | NE_PRIVATE int ne__ntlm_authenticate(ne_ntlm_context *context, const char *responseToken); 41 | 42 | NE_PRIVATE char *ne__ntlm_getRequestToken(ne_ntlm_context *context); 43 | 44 | #endif /* HAVE_NTLM */ 45 | 46 | #endif /* NE_NTLM_H */ 47 | -------------------------------------------------------------------------------- /deps/libneon/src/ne_openssl_internal.h: -------------------------------------------------------------------------------- 1 | #ifndef DAVIX_OPENSSL_INTERNAL_H 2 | #define DAVIX_OPENSSL_INTERNAL_H 3 | 4 | /// internal openssl declaration 5 | 6 | 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | struct ne_ssl_dname_s { 23 | X509_NAME *dn; 24 | }; 25 | 26 | 27 | struct ne_ssl_certificate_s { 28 | ne_ssl_dname subj_dn, issuer_dn; 29 | X509 *subject; 30 | STACK_OF(X509) *chain; 31 | ne_ssl_certificate *issuer; 32 | char *identity; 33 | }; 34 | 35 | struct ne_ssl_client_cert_s { 36 | PKCS12 *p12; 37 | int decrypted; /* non-zero if successfully decrypted. */ 38 | ne_ssl_certificate cert; 39 | EVP_PKEY *pkey; 40 | char *friendly_name; 41 | }; 42 | 43 | 44 | ne_ssl_certificate *populate_cert(ne_ssl_certificate *cert, X509 *x5); 45 | 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif // DAVIX_OPENSSL_INTERNAL_H 52 | -------------------------------------------------------------------------------- /deps/libneon/src/ne_redirect.h: -------------------------------------------------------------------------------- 1 | /* 2 | HTTP-redirect support 3 | Copyright (C) 1999-2002, Joe Orton 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with this library; if not, write to the Free 17 | Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 18 | MA 02111-1307, USA 19 | 20 | */ 21 | 22 | #ifndef NE_REDIRECT_H 23 | #define NE_REDIRECT_H 24 | 25 | #include "ne_request.h" 26 | 27 | NE_BEGIN_DECLS 28 | 29 | /* Register redirect handling for the session: if a valid redirect 30 | * (30x) response is given for any request in this session, the 31 | * request will fail with the NE_REDIRECT code, and the destination of 32 | * the redirect can be retrieved using ne_redirect_location(). */ 33 | void ne_redirect_register(ne_session *sess); 34 | 35 | /* Returns location of last redirect for the session. Returns NULL if 36 | * no redirect has been encountered for given session, or the last 37 | * redirect encountered could not be parsed. */ 38 | const ne_uri *ne_redirect_location(ne_session *sess); 39 | 40 | NE_END_DECLS 41 | 42 | #endif /* NE_REDIRECT_H */ 43 | -------------------------------------------------------------------------------- /deps/libneon/src/ne_sspi.h: -------------------------------------------------------------------------------- 1 | /* 2 | Microsoft SSPI based authentication routines 3 | Copyright (C) 2004-2005, Vladimir Berezniker @ http://public.xdi.org/=vmpn 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with this library; if not, write to the Free 17 | Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 18 | MA 02111-1307, USA 19 | 20 | */ 21 | 22 | #ifndef NE_SSPI_H 23 | #define NE_SSPI_H 24 | 25 | /* Win32 SSPI-based authentication interfaces. PRIVATE TO NEON -- NOT 26 | * PART OF THE EXTERNAL API. */ 27 | 28 | #ifdef HAVE_SSPI 29 | 30 | #include 31 | #define SECURITY_WIN32 32 | #include 33 | 34 | int ne_sspi_init(void); 35 | int ne_sspi_deinit(void); 36 | 37 | int ne_sspi_create_context(void **context, char * serverName, int ntlm); 38 | 39 | int ne_sspi_destroy_context(void *context); 40 | 41 | int ne_sspi_clear_context(void *context); 42 | 43 | int ne_sspi_authenticate(void *context, const char *base64Token, 44 | char **responseToken); 45 | 46 | #endif /* HAVE_SSPI */ 47 | 48 | #endif /* NE_SSPI_H */ 49 | -------------------------------------------------------------------------------- /deps/libneon/src/neon.vers: -------------------------------------------------------------------------------- 1 | # GNU linker version script for neon. 2 | # All symbols in <= 0.28.x use default unversioned. 3 | 4 | NEON_0_29 { 5 | ne_iaddr_raw; 6 | ne_sock_writev; 7 | ne_sock_fullwritev; 8 | ne_sock_set_error; 9 | ne_sock_proxy; 10 | ne_session_system_proxy; 11 | ne_session_socks_proxy; 12 | ne_acl3744_set; 13 | ne_buffer_qappend; 14 | ne_strnqdup; 15 | ne_iaddr_parse; 16 | }; 17 | -------------------------------------------------------------------------------- /deps/libneon/test/README: -------------------------------------------------------------------------------- 1 | 2 | Stupidly Simple Test Suite for neon 3 | ----------------------------------- 4 | 5 | The aim of the test suite is two-fold: 6 | 7 | 1. ensure compliance to the relevant RFCs in network behaviour. 8 | 9 | 2. ensure that the promises made by the public API are met 10 | by the current implementation. 11 | 12 | The file `STATUS' makes an attempt at listing RFC requirements and how 13 | the test suite tests whether neon meets them or not (it's not finished 14 | yet). 15 | 16 | The test suite is licensed under the GPL. 17 | 18 | Important Note About Test Failures 19 | ---------------------------------- 20 | 21 | Note that a test failure either means a bug in the test or a bug in 22 | the code itself. On platforms without pipe(), there is a race 23 | condition in the code which forks a server process: if you get random 24 | failures on a slow or loaded box, increase the sleep time in 25 | common/child.c:minisleep(). 26 | 27 | Extra Stuff 28 | ----------- 29 | 30 | server-tests requires that you have a running HTTP server on localhost 31 | port 80, and you have copied htdocs/* to server-htdocs-root/test/* 32 | 33 | Credits 34 | ------- 35 | 36 | This test suite is inspired by the Subversion project, discussion on 37 | the subversion mailing list, and seeing chromatic's talks on XP. The 38 | presentation is inspired by the standard Perl test suite. Imitation 39 | is the greatest form of flattery, right? 40 | -------------------------------------------------------------------------------- /deps/libneon/test/common/README: -------------------------------------------------------------------------------- 1 | 2 | Simple test framework for neon; licensed under the GNU GPL. 3 | 4 | Copyright (C) 2001-2002 Joe Orton 5 | -------------------------------------------------------------------------------- /deps/libneon/test/common/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -f debug.log 4 | rm -f child.log 5 | 6 | # for shared builds. 7 | LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH 8 | export LD_LIBRARY_PATH 9 | 10 | for f in $*; do 11 | if ./$f; then 12 | : 13 | else 14 | echo FAILURE 15 | exit 1 16 | fi 17 | done 18 | 19 | exit 0 20 | -------------------------------------------------------------------------------- /deps/libneon/test/expired.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDODCCAuKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBoTELMAkGA1UEBhMCR0Ix 3 | FzAVBgNVBAgTDkNhbWJyaWRnZXNoaXJlMRIwEAYDVQQHEwlDYW1icmlkZ2UxGjAY 4 | BgNVBAoTEU5lb24gSGFja2VycyBMdGQuMRUwEwYDVQQLEwxOZW9uIFFBIERlcHQx 5 | EjAQBgNVBAMTCWxvY2FsaG9zdDEeMBwGCSqGSIb3DQEJARYPbmVvbkB3ZWJkYXYu 6 | b3JnMB4XDTAyMDEyMTIwMzkwNFoXDTAyMDEzMTIwMzkwNFowgaExCzAJBgNVBAYT 7 | AkdCMRcwFQYDVQQIEw5DYW1icmlkZ2VzaGlyZTESMBAGA1UEBxMJQ2FtYnJpZGdl 8 | MRowGAYDVQQKExFOZW9uIEhhY2tlcnMgTHRkLjEVMBMGA1UECxMMTmVvbiBRQSBE 9 | ZXB0MRIwEAYDVQQDEwlsb2NhbGhvc3QxHjAcBgkqhkiG9w0BCQEWD25lb25Ad2Vi 10 | ZGF2Lm9yZzBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDzRU5sZ8+CWQPvPkqJw9Kl 11 | oEgT2FqzZR9RT/qbJuRBmRphiRr0g7JOh5Mr7LXaKShedFLhGidutyKKwIZJnRht 12 | AgMBAAGjggEBMIH+MB0GA1UdDgQWBBRFA3ktzHSuD9uB6mJOWoElmOtknzCBzgYD 13 | VR0jBIHGMIHDgBRFA3ktzHSuD9uB6mJOWoElmOtkn6GBp6SBpDCBoTELMAkGA1UE 14 | BhMCR0IxFzAVBgNVBAgTDkNhbWJyaWRnZXNoaXJlMRIwEAYDVQQHEwlDYW1icmlk 15 | Z2UxGjAYBgNVBAoTEU5lb24gSGFja2VycyBMdGQuMRUwEwYDVQQLEwxOZW9uIFFB 16 | IERlcHQxEjAQBgNVBAMTCWxvY2FsaG9zdDEeMBwGCSqGSIb3DQEJARYPbmVvbkB3 17 | ZWJkYXYub3JnggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADQQBDSFbe 18 | 9EjP+IyZ4vhJSk66gLSN8CnafoGm5JHpNOHy5gWLh7j0a/dxWRd4gpoBYBB6Y9rO 19 | YV6Eq3njdj0gu+NN 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /deps/libneon/test/htdocs/plain: -------------------------------------------------------------------------------- 1 | Test file. 2 | -------------------------------------------------------------------------------- /deps/libneon/test/notvalid.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDODCCAuKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBoTELMAkGA1UEBhMCR0Ix 3 | FzAVBgNVBAgTDkNhbWJyaWRnZXNoaXJlMRIwEAYDVQQHEwlDYW1icmlkZ2UxGjAY 4 | BgNVBAoTEU5lb24gSGFja2VycyBMdGQuMRUwEwYDVQQLEwxOZW9uIFFBIERlcHQx 5 | EjAQBgNVBAMTCWxvY2FsaG9zdDEeMBwGCSqGSIb3DQEJARYPbmVvbkB3ZWJkYXYu 6 | b3JnMB4XDTIzMTIyNzIwNDAyOVoXDTIzMTIyODIwNDAyOVowgaExCzAJBgNVBAYT 7 | AkdCMRcwFQYDVQQIEw5DYW1icmlkZ2VzaGlyZTESMBAGA1UEBxMJQ2FtYnJpZGdl 8 | MRowGAYDVQQKExFOZW9uIEhhY2tlcnMgTHRkLjEVMBMGA1UECxMMTmVvbiBRQSBE 9 | ZXB0MRIwEAYDVQQDEwlsb2NhbGhvc3QxHjAcBgkqhkiG9w0BCQEWD25lb25Ad2Vi 10 | ZGF2Lm9yZzBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDzRU5sZ8+CWQPvPkqJw9Kl 11 | oEgT2FqzZR9RT/qbJuRBmRphiRr0g7JOh5Mr7LXaKShedFLhGidutyKKwIZJnRht 12 | AgMBAAGjggEBMIH+MB0GA1UdDgQWBBRFA3ktzHSuD9uB6mJOWoElmOtknzCBzgYD 13 | VR0jBIHGMIHDgBRFA3ktzHSuD9uB6mJOWoElmOtkn6GBp6SBpDCBoTELMAkGA1UE 14 | BhMCR0IxFzAVBgNVBAgTDkNhbWJyaWRnZXNoaXJlMRIwEAYDVQQHEwlDYW1icmlk 15 | Z2UxGjAYBgNVBAoTEU5lb24gSGFja2VycyBMdGQuMRUwEwYDVQQLEwxOZW9uIFFB 16 | IERlcHQxEjAQBgNVBAMTCWxvY2FsaG9zdDEeMBwGCSqGSIb3DQEJARYPbmVvbkB3 17 | ZWJkYXYub3JnggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADQQA80TYV 18 | 2F4QLveuldmxGoIOq5hHGxCR6aVsdtm4PGY49R5/ObCAgdWw/JV/Tc448JAz5QvU 19 | ahr1x9kA4Vo5NZ4q 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /deps/libneon/test/nulsrv.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEogIBAAKCAQEAzSZwlqmmXT6c7Q8IFVp8FyVoaK8Tua1B+hJU4oRyfVjR4kBC 3 | wVntBT2qEFNwAIg6d6DAVp6sfSEqcURRCLwXB9qoo3bcUbwbivYCGlW/RrREayde 4 | vuUXi1ayxoI2EYOov/cvDRf2zUe1byumQbaNM1/q6ouxGuKZOP9ZWwqhcRPKNz+5 5 | sB6RmsiTNQxK4J300mHHTltBCnwxVJnb9WXOgNPCAjdk/VQSe+qshVlcF+Eu9tCo 6 | 8tAulFkvwqZf2gfeey4UB+3kJyQ3nQkusflaSLmAJEPmy8duNd/VaTT/5tae6HZm 7 | bl9ZATyWO+xyCzwelQ/OaBOcIt0btUQoUEoFfwIDAQABAoIBAF55tl3b8O5+GDyf 8 | sIRM8FqkconLHtViccDdUlQi1KrfDYEZQOTUKfBA7qGoGytTkUFoOUtqtVrGvEn/ 9 | QSY5oI2QaBsncNz/ONvs4RkJphXEjMGgFuTokcgsfBYo/wdfz4XgKr3n7FOrE2YH 10 | /v/CNxKSuJedD0mnUxLJnXfs1F5DAE+nE88T2LsWLqo8Jxr/6wFnazaAYmtkQd3/ 11 | BNBn9a7K79G81e7FkRSIc+7De7iju6UMy010qY6UNyFw9hSWQgjxzxwiyFvRuu4C 12 | w4xRJo2z0vEL6TSnNZEpTVVAbBd8XYSjh/627uXBah8W50X4BWLOd1umgU1hJDXe 13 | cXIWVZkCgYEA9QXcOdOPzuQ6wQYEi7qvTKSRdUJ+D3BCbqSHyWEe4RotWqs9WV1F 14 | FFpaRO/aiIdqpVZE8YJlcAcKtIXBS/byKUfOFzHX2QvROmPlcavXrVtFnNsBQpIn 15 | hyYjs/z/vbFDgugLBKVsgEaZzlJeygbI61r2NjVnst7NzP9L8ZxFgDsCgYEA1ldI 16 | nZcXekaqpUAMCSdZPDcfocVUb8UjvRZf90EruWymbrJQxzym5HaX20MFFh1BKC+a 17 | JEexxhlbfth/zgX6Pux7fqxSJM11DBG1aik7t4GMRu1bfflpQjdQUXGn2YPI5Quz 18 | R6QPcXhLVLY8b8PJu2jSKjV0cDN02dFwEFv9340CgYBRpUhDBJow6KAjXav6G5T6 19 | RwQpPKTg5Ble4PhWREST4bMnOVRSCOBR7eGSgxIg2G7S9TI3/6lpcQ9CJCfK9liv 20 | JLwpwnQYYPWxLURxYj+WBonlwJxk4GrHgA/5k95sCTtjzYqOW8kR3XS26X+odiZR 21 | NphAa/9H/TI6kv9tXRNTrQKBgGoREVciwLR6qdFSq2IQPcFlidq02r7gsHnOy7iA 22 | YJHGqWmYBg9B/ViLM0SGmsrBuU+Yls+jRt7AB53ypvQd0yM2RTp/LbsWjPhm/v5E 23 | 309E5VTn+mGRfbwNwUo8UxJ5e32U16f5EMdW/vgxoiCwo3CBQ5ctkqw/WnC7ipgd 24 | 3bi1AoGAbJSdtaFdF0kSikqvcPEJMFBR24dT7W+JIXeuFHYbRkQGSVZLGxuAkbL5 25 | 1mY+qclcvzfijH0wNFRP1Z3M5eFERALwI25YOrZGtI1ncIeKV+yFwkYC54XfZUvr 26 | hQO0wVIbTaE3N9fDIs0rHbSc1GJUhVr+2IsTW/ybHgdfDZMuXOI= 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /deps/libneon/test/resolve.c: -------------------------------------------------------------------------------- 1 | /* 2 | Test program for the neon resolver interface 3 | Copyright (C) 2002-2003, Joe Orton 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | 19 | */ 20 | 21 | #include "config.h" 22 | 23 | #include 24 | 25 | #include "ne_socket.h" 26 | 27 | int main(int argc, char **argv) 28 | { 29 | ne_sock_addr *addr; 30 | char buf[256]; 31 | int ret = 0; 32 | 33 | if (argc < 2) { 34 | printf("Usage: %s hostname\n", argv[0]); 35 | return 1; 36 | } 37 | 38 | if (ne_sock_init()) { 39 | printf("%s: Failed to initialize socket library.\n", argv[0]); 40 | return 1; 41 | } 42 | 43 | addr = ne_addr_resolve(argv[1], 0); 44 | if (ne_addr_result(addr)) { 45 | printf("Could not resolve `%s': %s\n", argv[1], 46 | ne_addr_error(addr, buf, sizeof buf)); 47 | ret = 2; 48 | } else { 49 | const ne_inet_addr *ia; 50 | printf("Resolved `%s' OK:", argv[1]); 51 | for (ia = ne_addr_first(addr); ia; ia = ne_addr_next(addr)) { 52 | printf(" <%s>", ne_iaddr_print(ia, buf, sizeof buf)); 53 | } 54 | putchar('\n'); 55 | } 56 | ne_addr_destroy(addr); 57 | 58 | return ret; 59 | } 60 | -------------------------------------------------------------------------------- /deps/libneon/test/run-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This script can be used to run the installed neon test suite 4 | # against an installed copy of the neon library. 5 | # 6 | 7 | # enable glibc malloc safety checks 8 | MALLOC_CHECK_=2 9 | export MALLOC_CHECK_ 10 | 11 | cd data 12 | 13 | if test -x ../bin/ssl; then 14 | rm -rf ca 15 | 16 | echo "INIT: generating SSL ceritifcates..." 17 | if sh ./makekeys.sh 2> makekeys.out; then :; else 18 | echo FAIL: could not generate SSL certificates 19 | exit 2 20 | fi 21 | fi 22 | 23 | for t in ../bin/*; do 24 | if ${t}; then :; else 25 | echo FAIL: ${t} 26 | exit 1 27 | fi 28 | done 29 | 30 | echo "PASS: all tests passed" 31 | 32 | exit 0 33 | -------------------------------------------------------------------------------- /deps/libneon/test/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -f debug.log child.log 4 | 5 | ulimit -c unlimited 6 | ulimit -t 120 7 | 8 | unset LANG 9 | unset LC_MESSAGES 10 | 11 | # Enable glibc heap consistency checks, and memory randomization. 12 | MALLOC_CHECK_=2 13 | MALLOC_PERTURB_=`expr $RANDOM % 255 2>/dev/null` 14 | export MALLOC_CHECK_ MALLOC_PERTURB_ 15 | 16 | export TEST_QUIET=${TEST_QUIET:-1} 17 | 18 | RETVAL=0 19 | 20 | for f in $*; do 21 | if ${HARNESS} ./$f ${SRCDIR}; then 22 | : 23 | else 24 | RETVAL=$? 25 | fi 26 | done 27 | 28 | exit $RETVAL 29 | -------------------------------------------------------------------------------- /deps/libneon/test/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIBOwIBAAJBAPNFTmxnz4JZA+8+SonD0qWgSBPYWrNlH1FP+psm5EGZGmGJGvSD 3 | sk6HkyvstdopKF50UuEaJ263IorAhkmdGG0CAwEAAQJAJBhYdoVAqNqEVu8rKB3C 4 | F4kcqLUlYBDVAL+ZM4QlwgWncAKk2C53BwH4PVWIIfyysleyt3bTAtqg/tgMNM06 5 | AQIhAP1HKbuppa+UY4rNP4Xcyj5BrCU4wVz77sg/ygW+mWIhAiEA9eKcUnnaIpig 6 | hlWtx9qz++85/JtahA85j6T48v0hBM0CIQCa8ByUg2wq45CdSX+xiOZjfVMslfKb 7 | yjZBY9xW9UjpYQIgdy9j5JqKANEIpnTran95VLot2mMXagHTPeySe331PlUCIQD0 8 | rL1AXeIR3Vd4D8dgab/FVbg4i94qBiY0731nyPJRoQ== 9 | -----END RSA PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /deps/libneon/test/skeleton.c: -------------------------------------------------------------------------------- 1 | /* 2 | neon test suite 3 | Copyright (C) 2002-2003, Joe Orton 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | 19 | */ 20 | 21 | #include "config.h" 22 | 23 | #include 24 | 25 | #ifdef HAVE_STDLIB_H 26 | #include 27 | #endif 28 | #ifdef HAVE_UNISTD_H 29 | #include 30 | #endif 31 | 32 | #include "ne_request.h" 33 | #include "ne_socket.h" 34 | 35 | #include "tests.h" 36 | #include "child.h" 37 | #include "utils.h" 38 | 39 | static int foo(void) 40 | { 41 | /* This is a skeleton test suite file. */ 42 | return OK; 43 | } 44 | 45 | ne_test tests[] = { 46 | T(foo), /* test functions here */ 47 | 48 | /* end of test functions. */ 49 | T(NULL) 50 | }; 51 | 52 | -------------------------------------------------------------------------------- /deps/libneon/test/uri-tests.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/deps/libneon/test/uri-tests.c -------------------------------------------------------------------------------- /deps/system_utils/env_utils.hpp: -------------------------------------------------------------------------------- 1 | #ifndef ENV_UTILS_HPP 2 | #define ENV_UTILS_HPP 3 | 4 | 5 | #include 6 | 7 | namespace EnvUtils{ 8 | 9 | inline std::string getEnv(const std::string & key, const std::string & default_value){ 10 | char* env = getenv(key.c_str()); 11 | return ((env!=NULL)?(std::string(env)):default_value); 12 | } 13 | 14 | } 15 | 16 | #endif // ENV_UTILS_HPP 17 | -------------------------------------------------------------------------------- /dist/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | # configure abi checker 4 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/abi/abi_checker_last.xml.in ${CMAKE_CURRENT_BINARY_DIR}/abi/abi_checker_last.xml) 5 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/abi/check_abi.sh.in ${CMAKE_CURRENT_BINARY_DIR}/abi/check_abi.sh) 6 | add_custom_target(abi-check 7 | "${CMAKE_CURRENT_BINARY_DIR}/abi/check_abi.sh") 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /dist/abi/abi_checker_last.xml.in: -------------------------------------------------------------------------------- 1 | 2 | @VERSION_FULL@ 3 | 4 | 5 | 6 | @CMAKE_SOURCE_DIR@/include/davix/ 7 | 8 | 9 | 10 | @CMAKE_BINARY_DIR@/src/ 11 | 12 | 13 | 14 | 15 | 16 | _ZN5Davix19httpcodeToDavixCodeEiRKSsS1_PPNS_10DavixErrorE 17 | _ZN5Davix15httpcodeIsValidEi 18 | 19 | 20 | _ZN5Davix4HookINS_17HookReceiveHeaderEE7getTypeEPS2_ 21 | _ZN5Davix4HookINS_17HookReceiveHeaderEE7getTypeEv 22 | _ZN5Davix4HookINS_19HookRequestPostExecEE7getTypeEPS2_ 23 | _ZN5Davix4HookINS_19HookRequestPostExecEE7getTypeEv 24 | _ZN5Davix4HookINS_18HookRequestPreExecEE7getTypeEPS2_ 25 | _ZN5Davix4HookINS_18HookRequestPreExecEE7getTypeEv 26 | _ZN5Davix4HookINS_14HookSendHeaderEE7getTypeEPS2_ 27 | _ZN5Davix4HookINS_14HookSendHeaderEE7getTypeEv 28 | 29 | 30 | _ZlsRSoRKN5Davix3UriE 31 | 32 | -------------------------------------------------------------------------------- /dist/abi/abi_checker_std_version.xml: -------------------------------------------------------------------------------- 1 | 2 | stdversion 3 | 4 | 5 | 6 | /usr/include/davix/ 7 | 8 | 9 | 10 | /usr/lib/ 11 | /usr/lib64/ 12 | 13 | 14 | 15 | 16 | 17 | _ZN5Davix19httpcodeToDavixCodeEiRKSsS1_PPNS_10DavixErrorE 18 | _ZN5Davix15httpcodeIsValidEi 19 | 20 | 21 | _ZN5Davix4HookINS_17HookReceiveHeaderEE7getTypeEPS2_ 22 | _ZN5Davix4HookINS_19HookRequestPostExecEE7getTypeEPS2_ 23 | _ZN5Davix4HookINS_18HookRequestPreExecEE7getTypeEPS2_ 24 | _ZN5Davix4HookINS_14HookSendHeaderEE7getTypeEPS2_ 25 | 26 | 27 | _ZlsRSoRKN5Davix3UriE 28 | 29 | -------------------------------------------------------------------------------- /dist/abi/abi_checker_std_version_32.xml: -------------------------------------------------------------------------------- 1 | 2 | stdversion 3 | 4 | 5 | 6 | /usr/include/davix/ 7 | 8 | 9 | 10 | /usr/lib/ 11 | 12 | 13 | 14 | 15 | 16 | _ZN5Davix19httpcodeToDavixCodeEiRKSsS1_PPNS_10DavixErrorE 17 | _ZN5Davix15httpcodeIsValidEi 18 | 19 | 20 | _ZN5Davix4HookINS_17HookReceiveHeaderEE7getTypeEPS2_ 21 | _ZN5Davix4HookINS_19HookRequestPostExecEE7getTypeEPS2_ 22 | _ZN5Davix4HookINS_18HookRequestPreExecEE7getTypeEPS2_ 23 | _ZN5Davix4HookINS_14HookSendHeaderEE7getTypeEPS2_ 24 | 25 | 26 | _ZlsRSoRKN5Davix3UriE 27 | 28 | -------------------------------------------------------------------------------- /dist/abi/abi_dumps/davix_0.2.8-gcc48-x86_64-linux-gnu.abi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/dist/abi/abi_dumps/davix_0.2.8-gcc48-x86_64-linux-gnu.abi.tar.gz -------------------------------------------------------------------------------- /dist/abi/abi_dumps/davix_0.3.1-gcc43-i686-redhat-linux.abi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/dist/abi/abi_dumps/davix_0.3.1-gcc43-i686-redhat-linux.abi.tar.gz -------------------------------------------------------------------------------- /dist/abi/abi_dumps/davix_0.3.1-gcc43-x86_64-redhat-linux.abi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/dist/abi/abi_dumps/davix_0.3.1-gcc43-x86_64-redhat-linux.abi.tar.gz -------------------------------------------------------------------------------- /dist/abi/abi_dumps/davix_0.3.1-gcc48-x86_64-linux-gnu.abi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/dist/abi/abi_dumps/davix_0.3.1-gcc48-x86_64-linux-gnu.abi.tar.gz -------------------------------------------------------------------------------- /dist/abi/abi_dumps/davix_0.3.6-gcc44-x86_64-redhat-linux.abi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/dist/abi/abi_dumps/davix_0.3.6-gcc44-x86_64-redhat-linux.abi.tar.gz -------------------------------------------------------------------------------- /dist/abi/abi_dumps/davix_0.5.0-gcc44-x86_64-redhat-linux.abi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/dist/abi/abi_dumps/davix_0.5.0-gcc44-x86_64-redhat-linux.abi.tar.gz -------------------------------------------------------------------------------- /dist/abi/check_abi.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | set -e 5 | CHECK_ABI=abi-compliance-checker 6 | 7 | 8 | LAST_ABI_XML_FILE=@CMAKE_BINARY_DIR@/dist/abi/abi_checker_last.xml 9 | LAST_ABI_DUMP=@CMAKE_BINARY_DIR@/abi_dump_last.abi.tar.gz 10 | 11 | echo "Generate new ABI dump...." 12 | $CHECK_ABI -l davix -dump $LAST_ABI_XML_FILE -dump-path $LAST_ABI_DUMP 13 | 14 | echo "Looking for abi dumps in @CMAKE_SOURCE_DIR@/dist/abi/abi_dumps/" 15 | ls @CMAKE_SOURCE_DIR@/dist/abi/abi_dumps/ 16 | shopt -s nullglob 17 | for i in @CMAKE_SOURCE_DIR@/dist/abi/abi_dumps/*$(gcc -dumpversion | sed 's/^\([0-9]*\)\.\([0-9]*\)\.*.*/\1\2/g')*$(gcc -dumpmachine)*.abi.tar.gz 18 | do 19 | echo "Scan for $i with $LAST_ABI_DUMP" 20 | $CHECK_ABI -l davix -old $i -new $LAST_ABI_DUMP 21 | echo "Scan with success" 22 | 23 | done 24 | 25 | echo "Finish !" 26 | -------------------------------------------------------------------------------- /doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/build/html/") 5 | 6 | if(ENABLE_HTML_DOCS) 7 | addDoxyGeneration("Doxyfile.in") 8 | add_custom_target(doc DEPENDS) 9 | add_dependencies(doc doxygen) 10 | 11 | SET( l_doc "${CMAKE_CURRENT_BINARY_DIR}/build/html/") 12 | install(DIRECTORY ${l_doc} DESTINATION ${DOC_INSTALL_DIR}/html) 13 | endif(ENABLE_HTML_DOCS) 14 | 15 | FILE(GLOB man1_page ${CMAKE_CURRENT_SOURCE_DIR}/man/*.1) 16 | install(FILES ${man1_page} 17 | DESTINATION ${MAN_INSTALL_DIR}/man1/) 18 | 19 | FILE(GLOB man3_page ${CMAKE_CURRENT_SOURCE_DIR}/man/*.3) 20 | install(FILES ${man3_page} 21 | DESTINATION ${MAN_INSTALL_DIR}/man3/) 22 | 23 | 24 | -------------------------------------------------------------------------------- /doc/man/libdavix.3: -------------------------------------------------------------------------------- 1 | .\" @(#)$RCSfile: libdavix.man,v $ $Revision: 1 $ $Date: 2014/05/24 $ CERN Adrien Devresse 2 | .\" Copyright (C) 2014 by CERN 3 | .\" All rights reserved 4 | .\" 5 | .TH LIBDAVIX 3 "$Date: 2014/05/24 $" libdavix 6 | .SH NAME 7 | libdavix \- shared library for HTTP I/O 8 | 9 | .SH DESCRIPTION 10 | libdavix is a C++ shared library for high performance remote I/O and resources management with HTTP Based protocols. 11 | .br 12 | .PP 13 | libdavix aims to be a complete, reliable and performant I/O layer for Cloud, Grid and Web storage systems. 14 | .br 15 | It supports the protocol Http (http(s)://), WebDav (dav(s)://) and S3 (s3(s)://). 16 | .br 17 | .PP 18 | See libdavix doxygen documentation for more details. 19 | .PP 20 | 21 | 22 | .SH SEE ALSO 23 | .BR davix-get(1), davix-put(1), davix-mkdir(1), davix-rm(1), davix-ls(1) 24 | .BR 25 | 26 | .SH LINKS 27 | .BR http://dmc.web.cern.ch/projects/davix/home 28 | 29 | 30 | .SH AUTHORS 31 | Adrien Devresse , IT-SDC-ID, CERN 32 | -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/__init__.py: -------------------------------------------------------------------------------- 1 | """Sphinx ReadTheDocs theme. 2 | 3 | From https://github.com/ryan-roemer/sphinx-bootstrap-theme. 4 | 5 | """ 6 | import os 7 | 8 | VERSION = (0, 1, 9) 9 | 10 | __version__ = ".".join(str(v) for v in VERSION) 11 | __version_full__ = __version__ 12 | 13 | 14 | def get_html_theme_path(): 15 | """Return list of HTML theme paths.""" 16 | cur_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) 17 | return cur_dir 18 | -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | {# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #} 2 | 3 | {% if page_source_suffix %} 4 | {% set suffix = page_source_suffix %} 5 | {% else %} 6 | {% set suffix = source_suffix %} 7 | {% endif %} 8 | 9 |
10 |
    11 |
  • Docs »
  • 12 | {% for doc in parents %} 13 |
  • {{ doc.title }} »
  • 14 | {% endfor %} 15 |
  • {{ title }}
  • 16 |
  • 17 | {% if pagename != "search" %} 18 | {% if display_github %} 19 | Edit on GitHub 20 | {% elif display_bitbucket %} 21 | Edit on Bitbucket 22 | {% elif show_source and source_url_prefix %} 23 | View page source 24 | {% elif show_source and has_source and sourcename %} 25 | View page source 26 | {% endif %} 27 | {% endif %} 28 |
  • 29 |
30 |
31 |
32 | -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/search.html: -------------------------------------------------------------------------------- 1 | {# 2 | basic/search.html 3 | ~~~~~~~~~~~~~~~~~ 4 | 5 | Template for the search page. 6 | 7 | :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. 8 | :license: BSD, see LICENSE for details. 9 | #} 10 | {%- extends "layout.html" %} 11 | {% set title = _('Search') %} 12 | {% set script_files = script_files + ['_static/searchtools.js'] %} 13 | {% block footer %} 14 | 17 | {# this is used when loading the search index using $.ajax fails, 18 | such as on Chrome for documents on localhost #} 19 | 20 | {{ super() }} 21 | {% endblock %} 22 | {% block body %} 23 | 31 | 32 | {% if search_performed %} 33 |

{{ _('Search Results') }}

34 | {% if not search_results %} 35 |

{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}

36 | {% endif %} 37 | {% endif %} 38 |
39 | {% if search_results %} 40 |
    41 | {% for href, caption, context in search_results %} 42 |
  • 43 | {{ caption }} 44 |

    {{ context|e }}

    45 |
  • 46 | {% endfor %} 47 |
48 | {% endif %} 49 |
50 | {% endblock %} 51 | -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/searchbox.html: -------------------------------------------------------------------------------- 1 | {%- if builder != 'singlehtml' %} 2 |
3 |
4 | 5 | 6 | 7 |
8 |
9 | {%- endif %} 10 | -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/Inconsolata-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/Inconsolata-Bold.ttf -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/Inconsolata-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/Inconsolata-Regular.ttf -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/Lato-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/Lato-Bold.ttf -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/Lato-Regular.ttf -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/RobotoSlab-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/RobotoSlab-Bold.ttf -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/RobotoSlab-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/RobotoSlab-Regular.ttf -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/doc/sphinx/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = css/theme.css 4 | 5 | [options] 6 | typekit_id = hiw1hhg 7 | analytics_id = 8 | sticky_navigation = False 9 | logo_only = 10 | collapse_navigation = False 11 | display_version = True 12 | -------------------------------------------------------------------------------- /doc/sphinx/_themes/sphinx_rtd_theme/versions.html: -------------------------------------------------------------------------------- 1 | {% if READTHEDOCS %} 2 | {# Add rst-badge after rst-versions for small badge style. #} 3 |
4 | 5 | Read the Docs 6 | v: {{ current_version }} 7 | 8 | 9 |
10 |
11 |
Versions
12 | {% for slug, url in versions %} 13 |
{{ slug }}
14 | {% endfor %} 15 |
16 |
17 |
Downloads
18 | {% for type, url in downloads %} 19 |
{{ type }}
20 | {% endfor %} 21 |
22 |
23 |
On Read the Docs
24 |
25 | Project Home 26 |
27 |
28 | Builds 29 |
30 |
31 |
32 | Free document hosting provided by Read the Docs. 33 | 34 |
35 |
36 | {% endif %} 37 | 38 | -------------------------------------------------------------------------------- /doc/sphinx/api-file.rst: -------------------------------------------------------------------------------- 1 | File-based API 2 | ============== 3 | 4 | #.. doxygenclass:: Davix::DavFile 5 | # :members: 6 | 7 | -------------------------------------------------------------------------------- /doc/sphinx/api-http.rst: -------------------------------------------------------------------------------- 1 | HTTP-based API 2 | ============== 3 | 4 | #.. doxygenclass:: Davix::HttpRequest 5 | # :members: 6 | 7 | #.. doxygenclass:: Davix::GetRequest 8 | # :members: 9 | 10 | #.. doxygenclass:: Davix::PutRequest 11 | # :members: 12 | 13 | #.. doxygenclass:: Davix::HeadRequest 14 | # :members: 15 | 16 | #.. doxygenclass:: Davix::DeleteRequest 17 | # :members: 18 | 19 | #.. doxygenclass:: Davix::PropfindRequest 20 | # :members: 21 | -------------------------------------------------------------------------------- /doc/sphinx/api-posix.rst: -------------------------------------------------------------------------------- 1 | POSIX-based API 2 | =============== 3 | 4 | # .. doxygenclass:: Davix::DavPosix 5 | # :members: 6 | 7 | 8 | -------------------------------------------------------------------------------- /doc/sphinx/authors.rst: -------------------------------------------------------------------------------- 1 | Authors 2 | ============================= 3 | 4 | todo 5 | -------------------------------------------------------------------------------- /doc/sphinx/cloud-support.rst: -------------------------------------------------------------------------------- 1 | Cloud support 2 | ============= 3 | 4 | Currently, there is support for the Amazon S3 and Microsoft Azure cloud services. 5 | 6 | Amazon S3 7 | --------- 8 | 9 | Amazon S3 has two signature calculation algorithms, called v2 and v4. The first one 10 | is being deprecated, and new Amazon data-centers only support the second one. 11 | 12 | Using v2 requires that you know an access key and its associated secret key. Your 13 | secret key is never transmitted to the network; instead, it's used to calculate a 14 | signature to sign each request. 15 | 16 | The v4 algorithm requires an extra parameter, which is the region your bucket is located 17 | in. If you specify a region, davix will use v4 to authenticate your requests, otherwise, v2. 18 | 19 | An S3 URL can take two forms: :: 20 | 21 | https://bucket-name.example.org/dir/file 22 | https://s3-region.example.org/bucket-name/dir/file 23 | 24 | The authentication algorithm needs to know which one of the two forms you are using, otherwise 25 | you'll encounter errors. Davix assumes by default that S3 URLs have the first form; specify 26 | ``s3alternate`` to use the second. :: 27 | 28 | $ davix-get --s3accesskey xxx --s3secretkey yyy --s3region zzz --s3alternate https://s3-region.example.org/bucket-name/dir/file 29 | 30 | Microsoft Azure 31 | --------------- 32 | 33 | We currently support Microsoft Azure blob storage. It's very similar to S3 and acts as a key-value store, 34 | letting you retrieve objects (blobs) by specifying their path. All you need is an azure key: :: 35 | 36 | $ davix-ls --azurekey xxx https://your-username.blob.core.windows.net/example-bucket/ 37 | -------------------------------------------------------------------------------- /doc/sphinx/contact.rst: -------------------------------------------------------------------------------- 1 | How to get in touch with us 2 | ============================= 3 | 4 | e-mail 5 | ------ 6 | 7 | Send us an e-mail to davix-devel cern ch e-group. 8 | 9 | Github 10 | ------ 11 | 12 | Feel free to create an issue or a pull request in our github repository_. 13 | 14 | .. _repository: https://github.com/cern-fts/davix 15 | 16 | Jira 17 | ---- 18 | 19 | If you have a CERN account, you could also create a ticket in our internal jira_ issue tracker. 20 | 21 | .. _jira: https://its.cern.ch/jira/browse/DMC 22 | 23 | -------------------------------------------------------------------------------- /doc/sphinx/index.rst: -------------------------------------------------------------------------------- 1 | Welcome to davix documentation 2 | ============================== 3 | 4 | Davix aims to make the task of managing files over HTTP-based protocols simple. It is being developed by the IT-SDC-ID section at CERN, and while the project's purpose is its use on the CERN grid, the functionality offered is generic. 5 | 6 | There is support for the following authentication methods: 7 | 8 | * x509 user certificate 9 | * VOMS proxy 10 | * RFC proxy with VOMS extensions support 11 | * username / password 12 | * AWS S3 compatible services 13 | * Microsoft Azure compatible services 14 | 15 | 16 | .. toctree:: 17 | :caption: Getting started 18 | :maxdepth: 2 19 | 20 | installation 21 | compiling 22 | 23 | .. toctree:: 24 | :caption: Guides 25 | :maxdepth: 2 26 | 27 | root 28 | cloud-support 29 | advanced 30 | 31 | .. toctree:: 32 | :caption: Examples 33 | :maxdepth: 2 34 | 35 | cli-examples 36 | lib-examples 37 | 38 | .. toctree:: 39 | :caption: API Reference 40 | :maxdepth: 2 41 | 42 | File-based API 43 | POSIX-based API 44 | HTTP-based API 45 | 46 | .. toctree:: 47 | :caption: About us 48 | :maxdepth: 2 49 | 50 | contact 51 | authors 52 | 53 | .. toctree:: 54 | :caption: Development 55 | :maxdepth: 2 56 | 57 | 58 | Indices and tables 59 | ================== 60 | 61 | * :ref:`genindex` 62 | * :ref:`modindex` 63 | * :ref:`search` 64 | -------------------------------------------------------------------------------- /doc/sphinx/installation.rst: -------------------------------------------------------------------------------- 1 | Installation 2 | ============ 3 | 4 | Scientific Linux/CentOS7 5 | ------------------------ 6 | 7 | You will find packages for davix in all of these_ repositories. Once you have enabled one of the repositories, run: :: 8 | 9 | sudo yum install davix 10 | 11 | .. _these: https://dmc.web.cern.ch/repositories 12 | 13 | Ubuntu 14 | ------ 15 | 16 | You can install davix from the default ubuntu repositories. :: 17 | 18 | sudo apt-get install davix 19 | 20 | Compiling from source 21 | --------------------- 22 | 23 | If you need to have the most recent version, you could try our unstable repository_, which will automatically pull the latest build. 24 | Otherwise, see :ref:`compiling` for instructions. 25 | 26 | .. _repository: https://dmc.web.cern.ch/repositories 27 | 28 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:stretch-slim 2 | # The default is to build the development branch, set this to a release tag such 3 | # as R_0_7_2 to get a Docker image for that version. 4 | ARG DAVIX_RELEASE=devel 5 | 6 | RUN \ 7 | apt-get update && \ 8 | DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 9 | git ca-certificates cmake g++ build-essential \ 10 | libxml2-dev libssl-dev uuid-dev python && \ 11 | git clone --branch "$DAVIX_RELEASE" https://github.com/cern-fts/davix.git && \ 12 | cd davix && \ 13 | git submodule update --recursive --init && \ 14 | mkdir build && cd build && \ 15 | cmake -Wno-dev .. && \ 16 | make && \ 17 | make install && \ 18 | ldconfig && \ 19 | DEBIAN_FRONTEND=noninteractive apt-get remove --purge -y \ 20 | git cmake g++ libxml2-dev libssl-dev build-essential uuid-dev python && \ 21 | DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 22 | libxml2 && \ 23 | DEBIAN_FRONTEND=noninteractive apt-get autoremove -y && \ 24 | apt-get clean -y && \ 25 | rm -rf /var/lib/apt/lists/* && \ 26 | cd ../.. && \ 27 | rm -rf davix 28 | COPY *.sh /usr/local/bin/ 29 | ENTRYPOINT [ "/usr/local/bin/davix.sh" ] -------------------------------------------------------------------------------- /docker/README.md: -------------------------------------------------------------------------------- 1 | # Dockerised davix 2 | 3 | Files in this directory enable the creation of a Docker image for davix. The 4 | Dockerfile is able to build all branches and tags from the repository. The 5 | branch/tag to build is controlled by the `DAVIX_RELEASE` [build argument]. 6 | 7 | [build argument]: https://docs.docker.com/engine/reference/commandline/build#set-build-time-variables---build-arg 8 | 9 | ## Building 10 | 11 | To build this image with the default branch, which is the `devel` branch, run 12 | the following command. This will create an image called `davix`: 13 | 14 | ```shell 15 | docker build -t davix . 16 | ``` 17 | 18 | To build this image at a given release instead, run a command similar to the 19 | following one. This will create an image tagged after the name of the release: 20 | 21 | ```shell 22 | docker build -t davix:0.7.2 --build-arg DAVIX_RELEASE=R_0_7_2 . 23 | ``` 24 | 25 | ## Running 26 | 27 | Given a Docker image called `davix`, you should be able to call the various 28 | `davix` binaries without their leading `davix-` preamble in the binary name. 29 | This is achieved through declaring [`davix.sh`] as the [ENTRYPOINT] of the 30 | image. 31 | 32 | [`davix.sh`]: ./davix.sh 33 | [ENTRYPOINT]: https://docs.docker.com/engine/reference/builder/#entrypoint 34 | 35 | For example, to call the `davix-ls` binary inside the Docker image `davix`, you 36 | could run a command similar to the following: 37 | 38 | ```shell 39 | docker run -it --rm davix ls --help 40 | ``` 41 | -------------------------------------------------------------------------------- /docker/davix.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ##### 4 | # This script provides a sub-command type access to the various davix binaries 5 | # installed in /usr/local/bin. Instead of calling /usr/local/bin/davix-ls, the 6 | # script makes it possible to call /usr/local/bin/davix.sh ls with exactly the 7 | # same set of options. The script is tuned to be used as the entrypoint of the 8 | # Dockerfile, allowing to run commands such as the following, which is slightly 9 | # more convenient: docker run -it --rm ... davix ls ... 10 | ##### 11 | 12 | cmd=$1 13 | shift 14 | 15 | if [ -x "/usr/local/bin/davix-$cmd" ]; then 16 | exec /usr/local/bin/davix-$cmd $@ 17 | else 18 | echo "$cmd is an unknown subcommand!" >& 2 19 | commands= 20 | cd /usr/local/bin 21 | for binary in $(ls -1 davix-*); do 22 | commands="$commands ${binary#*-}" 23 | done 24 | echo "Should be one of: $commands" >& 2 25 | fi 26 | -------------------------------------------------------------------------------- /include/davix/compat/davix_ignored.hpp: -------------------------------------------------------------------------------- 1 | #ifndef DAVIX_IGNORED_HPP 2 | #define DAVIX_IGNORED_HPP 3 | 4 | 5 | // WARNING 6 | // This file contains functions / variables that will be removed from the official API 7 | // This file is maintained for compatbility only 8 | // Please, do not use any function of this header in a new program 9 | 10 | #include "../davix.hpp" 11 | 12 | std::ostream& operator<< (std::ostream& stream, const Davix::Uri & _u); 13 | 14 | 15 | #endif // DAVIX_IGNORED_HPP 16 | -------------------------------------------------------------------------------- /include/davix/features.hpp.in: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2016 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef DAVIX_FEATURES 22 | #define DAVIX_FEATURES 23 | 24 | #define DAVIX_MAJOR @VERSION_MAJOR@ 25 | #define DAVIX_MINOR @VERSION_MINOR@ 26 | #define DAVIX_PATCH @VERSION_PATCH@ 27 | #define DAVIX_MINIPATCH @VERSION_MINIPATCH@ 28 | #define DAVIX_VERSION @VERSION_FULL@ 29 | #define DAVIX_VERSION_STRING "@VERSION_FULL@" 30 | 31 | #define DAVIX_API_VERSION 20160621 32 | 33 | #define DAVIX_HAS_AWS_V4 1 34 | #define DAVIX_HAS_AWS_TOKENS 1 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /include/davix/file/davix_file_info.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2013 4 | * Author: Adrien Devresse 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #ifndef DAVIX_FILE_INFO_HPP 23 | #define DAVIX_FILE_INFO_HPP 24 | 25 | 26 | #include 27 | #include 28 | 29 | 30 | 31 | #endif // DAVIX_FILE_INFO_HPP 32 | -------------------------------------------------------------------------------- /include/davix/hooks/davix_hooks.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2013 4 | * Author: Adrien Devresse 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | 23 | #ifndef DAVIX_HOOKS_HPP 24 | #define DAVIX_HOOKS_HPP 25 | 26 | // See davix_hooks_fwd.hpp for Hooks declarations 27 | 28 | /** 29 | @file davix_hooks.hpp 30 | @author Devresse Adrien 31 | @brief Hook (callback) functions of davix 32 | */ 33 | 34 | 35 | #include 36 | #include 37 | 38 | #endif // DAVIX_HOOKS_HPP 39 | -------------------------------------------------------------------------------- /include/davix/utils/davix_misc_utils.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2016 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef DAVIX_MISC_UTILS_HPP 22 | #define DAVIX_MISC_UTILS_HPP 23 | 24 | namespace Davix { 25 | 26 | namespace WebdavSupport { 27 | typedef enum { 28 | UNKNOWN, 29 | YES, 30 | NO 31 | } Type; 32 | } 33 | 34 | WebdavSupport::Type detect_webdav_support(Context &, const RequestParams&, const Uri & uri, DavixError**); 35 | } 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /include/davix/utils/davix_nocopy.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2013 4 | * Author: Adrien Devresse 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #pragma once 23 | #ifndef DAVIX_NOCOPY_HPP 24 | #define DAVIX_NOCOPY_HPP 25 | 26 | 27 | /// @class NonCopyable 28 | /// @brief Simple NonCopyableProtector 29 | class NonCopyable{ 30 | protected: 31 | NonCopyable() {} 32 | ~NonCopyable() {} 33 | private: // emphasize the following members are private 34 | NonCopyable( const NonCopyable& ); 35 | const NonCopyable& operator=( const NonCopyable& ); 36 | }; 37 | 38 | 39 | #endif // DAVIX_NOCOPY_HPP 40 | -------------------------------------------------------------------------------- /include/davix/utils/davix_swift_utils.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2021 4 | * Author: Shiting Long (Forschungszentrum Juelich) 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #ifndef DAVIX_DAVIX_SWIFT_UTILS_H 23 | #define DAVIX_DAVIX_SWIFT_UTILS_H 24 | 25 | #include 26 | 27 | namespace Davix { 28 | 29 | namespace Swift { 30 | 31 | Uri signURI(const RequestParams & params, const Uri & url); 32 | 33 | Uri swiftUriTransformer(const Uri & original_url, const RequestParams & params, const bool addDelimiter); 34 | 35 | std::string extract_swift_path(const Uri & uri); 36 | 37 | std::string extract_swift_container(const Uri & uri); 38 | 39 | } //Swift 40 | 41 | } //Davix 42 | 43 | #endif //DAVIX_DAVIX_SWIFT_UTILS_H 44 | -------------------------------------------------------------------------------- /packaging/debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /packaging/debian/control: -------------------------------------------------------------------------------- 1 | Source: davix 2 | Priority: optional 3 | Maintainer: Mattias Ellert 4 | Build-Depends: debhelper (>= 8.0.0), cmake, libxml2-dev, libssl-dev, gsoap, abi-compliance-checker, pkg-config, doxygen, zlib1g-dev, uuid-dev, libgsoap-dev, libgtest-dev 5 | Standards-Version: 3.9.6 6 | Section: net 7 | Homepage: http://dmc.web.cern.ch/projects/davix/home 8 | 9 | Package: davix 10 | Architecture: any 11 | Depends: ${shlibs:Depends}, ${misc:Depends}, libdavix0 (= ${binary:Version}) 12 | Description: Toolkit for http based file management 13 | Davix is a toolkit designed for file operations with http based protocols 14 | (WebDav, Amazon S3, ...). 15 | 16 | Package: libdavix0 17 | Section: libs 18 | Architecture: any 19 | Depends: ${shlibs:Depends}, ${misc:Depends} 20 | Description: Runtime library for davix 21 | Library for davix. Davix is a toolkit designed for file operations with 22 | http based protocols (WebDav, Amazon S3, ...). 23 | 24 | Package: davix-dev 25 | Section: libdevel 26 | Architecture: any 27 | Depends: ${shlibs:Depends}, ${misc:Depends}, libdavix0 (= ${binary:Version}) 28 | Description: Development files for davix 29 | Development files for davix. Davix is a toolkit designed for file operations 30 | with http based protocols (WebDav, Amazon S3, ...). 31 | 32 | Package: davix-doc 33 | Section: doc 34 | Architecture: all 35 | Depends: ${misc:Depends} 36 | Description: Documentation for davix 37 | Documentation and examples for davix. Davix is a toolkit designed for file 38 | operations with Http based protocols (WebDav, Amazon S3, ...). 39 | 40 | Package: davix-tests 41 | Section: libs 42 | Architecture: any 43 | Depends: ${shlibs:Depends}, ${misc:Depends}, libdavix0 (= ${binary:Version}) 44 | Description: Test suite for davix 45 | Test suite for davix. Davix is a toolkit designed for file operations 46 | with http based protocols (WebDav, Amazon S3, ...). 47 | -------------------------------------------------------------------------------- /packaging/debian/davix-dev.install: -------------------------------------------------------------------------------- 1 | usr/include/davix 2 | usr/lib/libdavix.so 3 | usr/lib/libdavix_copy.so 4 | usr/lib/pkgconfig/davix.pc 5 | usr/lib/pkgconfig/davix_copy.pc 6 | usr/share/man/man3/libdavix.3 7 | -------------------------------------------------------------------------------- /packaging/debian/davix-doc.docs: -------------------------------------------------------------------------------- 1 | #DOCS# 2 | -------------------------------------------------------------------------------- /packaging/debian/davix-doc.install: -------------------------------------------------------------------------------- 1 | usr/share/doc/davix/html 2 | -------------------------------------------------------------------------------- /packaging/debian/davix-tests.install: -------------------------------------------------------------------------------- 1 | usr/bin/davix-unit-tests 2 | usr/bin/davix-tester 3 | -------------------------------------------------------------------------------- /packaging/debian/davix.install: -------------------------------------------------------------------------------- 1 | usr/bin/davix-cp 2 | usr/bin/davix-get 3 | usr/bin/davix-http 4 | usr/bin/davix-ls 5 | usr/bin/davix-mkdir 6 | usr/bin/davix-put 7 | usr/bin/davix-rm 8 | usr/bin/davix-mv 9 | usr/share/man/man1/davix-get.1 10 | usr/share/man/man1/davix-http.1 11 | usr/share/man/man1/davix-ls.1 12 | usr/share/man/man1/davix-mkdir.1 13 | usr/share/man/man1/davix-put.1 14 | usr/share/man/man1/davix-rm.1 15 | usr/share/man/man1/davix-mv.1 16 | -------------------------------------------------------------------------------- /packaging/debian/libdavix0.docs: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /packaging/debian/libdavix0.install: -------------------------------------------------------------------------------- 1 | usr/lib/libdavix.so.* 2 | usr/lib/libdavix_copy.so.* 3 | usr/share/doc/davix/RELEASE-NOTES.md 4 | -------------------------------------------------------------------------------- /packaging/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | 4 | -include /usr/share/dpkg/buildflags.mk 5 | 6 | CFLAGS += $(CPPFLAGS) 7 | CXXFLAGS += $(CPPFLAGS) 8 | 9 | export CFLAGS CXXFLAGS LDFLAGS 10 | 11 | %: 12 | dh $@ 13 | 14 | override_dh_auto_configure: 15 | # Remove bundled stuff 16 | rm -rf test/pywebdav 17 | dh_auto_configure -- -DLIB_SUFFIX="" \ 18 | -DENABLE_THIRD_PARTY_COPY=TRUE -DENABLE_HTML_DOCS=TRUE 19 | 20 | override_dh_auto_build: 21 | dh_auto_build -- all doc 22 | 23 | override_dh_install: 24 | rm debian/tmp/usr/share/doc/davix/LICENSE 25 | dh_install --fail-missing 26 | 27 | override_dh_auto_test: 28 | dh_auto_test -- ARGS+="-V -T Test" 29 | -------------------------------------------------------------------------------- /packaging/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /packaging/debian/source/lintian-overrides: -------------------------------------------------------------------------------- 1 | # The autotools files are not used - build uses cmake 2 | davix source: outdated-autotools-helper-file deps/libneon/config.* 3 | 4 | -------------------------------------------------------------------------------- /packaging/make-dist.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | #------------------------------------------------------------------------------- 5 | # Generate a release tarball - run this from the root of the git repository. 6 | #------------------------------------------------------------------------------- 7 | 8 | git submodule update --recursive --init 9 | mkdir -p build 10 | ./genversion.py --template include/davix/features.hpp.in --out include/davix/features.hpp 11 | ./genversion.py --template packaging/davix.spec.in --out packaging/davix.spec 12 | ./genversion.py --template version.cmake.in --out version.cmake 13 | 14 | #------------------------------------------------------------------------------- 15 | # Extract version number, we need this for the archive name 16 | #------------------------------------------------------------------------------- 17 | VERSION_FULL=$(./genversion.py --template-string "@VERSION_FULL@") 18 | printf "Version: ${VERSION_FULL}\n" 19 | FILENAME="davix-${VERSION_FULL}" 20 | 21 | #------------------------------------------------------------------------------- 22 | # Make the archive 23 | #------------------------------------------------------------------------------- 24 | TARGET_PATH=$(basename "$PWD") 25 | 26 | pushd "$PWD"/.. 27 | tar --exclude '*/.git' --exclude "${TARGET_PATH}/build" --exclude "${TARGET_PATH}/credentials" --exclude "${TARGET_PATH}/_book" --exclude '.vscode' --exclude '.gitlab-ci.yml' --exclude '.gitignore' --exclude '.gitmodules' --exclude 'my*.sh' -pcvzf "${TARGET_PATH}/build/${FILENAME}.tar.gz" "${TARGET_PATH}" --transform "s!^${TARGET_PATH}!${FILENAME}!" --show-transformed-names 28 | popd 29 | -------------------------------------------------------------------------------- /packaging/make-docs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | #------------------------------------------------------------------------------- 5 | # Make SRPM to get a list of build dependencies 6 | #------------------------------------------------------------------------------- 7 | git submodule update --init --recursive 8 | ./packaging/make-srpm.sh 9 | dnf builddep -y build/SRPMS/* 10 | 11 | #------------------------------------------------------------------------------- 12 | # Generate a docs folder - run this from the root of the git repository. 13 | #------------------------------------------------------------------------------- 14 | SPHINX_DIR="${PWD}/doc/sphinx" 15 | 16 | rm -rf build 17 | mkdir build && cd build 18 | sphinx-build-3 -q -b html "${SPHINX_DIR}" "${PWD}/doc/build/html/" 19 | 20 | cmake -DENABLE_HTML_DOCS=TRUE .. 21 | make doc 22 | -------------------------------------------------------------------------------- /packaging/make-srpm.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | #------------------------------------------------------------------------------- 5 | # Generate a source RPM - run this from the root of the git repository. 6 | #------------------------------------------------------------------------------- 7 | VERSION_FULL=$(./genversion.py --template-string "@VERSION_FULL@") 8 | printf "Version: ${VERSION_FULL}\n" 9 | 10 | ./packaging/make-dist.sh 11 | TARBALL="davix-${VERSION_FULL}.tar.gz" 12 | BUILD_DIR="$PWD"/build 13 | 14 | pushd build 15 | rpmbuild --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" -ts "${TARBALL}" --define "_topdir ${PWD}" 16 | -------------------------------------------------------------------------------- /packaging/update-repo.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | #------------------------------------------------------------------------------- 4 | # This script tries to improve robustness when regenerating a repo 5 | # which lives on EOS. 6 | #------------------------------------------------------------------------------- 7 | 8 | if [ -z "$1" ]; then 9 | echo "syntax: $0 " 10 | exit 1 11 | fi 12 | 13 | REPO="$1" 14 | createrepo -v "${REPO}" --update --workers 1 15 | 16 | if [[ $? != 0 ]]; then 17 | exit $? 18 | fi 19 | 20 | # Force to access the file, or the size will be right, but the file empty 21 | cat "${REPO}/repodata/repomd.xml" > /dev/null 22 | # Stat the repomd.xml 23 | REPOSIZE=$(stat --printf "%s" "${REPO}/repodata/repomd.xml") 24 | # If 0, the bug is still there, so move ourselves from .repodata to the final destination 25 | if [[ $REPOSIZE == 0 ]]; then 26 | echo "Trigger workaround for EOS" 27 | mv "${REPO}/.repodata/repomd.xml" "${REPO}/repodata/repomd.xml" 28 | fi 29 | -------------------------------------------------------------------------------- /patch-curl-clock-gettime.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # An important user of davix (ROOT project) does not want to depend on librt. 4 | # This means we can only use clock_gettime on CC7, not SLC6. 5 | # 6 | # (clock_gettime was moved from librt onto glibc proper, starting from CC7) 7 | # 8 | # This script patches out libcurl support for clock_gettime entirely when building on SLC6. 9 | 10 | set -x 11 | 12 | if [ -f lib/curl_config.h ]; then 13 | echo '#include 14 | int main() { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); return 0; }' &> test.c 15 | gcc test.c -o /dev/null 16 | 17 | if [ $? -ne 0 ]; then 18 | grep "HAVE_CLOCK_GETTIME" lib/curl_config.h 19 | sed -i "" 's|^#define HAVE_CLOCK_GETTIME_MONOTONIC 1|// #define HAVE_CLOCK_GETTIME_MONOTONIC 1|g' lib/curl_config.h 20 | grep "HAVE_CLOCK_GETTIME" lib/curl_config.h 21 | fi 22 | 23 | rm test.c 24 | fi 25 | 26 | -------------------------------------------------------------------------------- /release.cmake: -------------------------------------------------------------------------------- 1 | set(VERSION_MAJOR 0) 2 | set(VERSION_MINOR 8) 3 | set(VERSION_PATCH 10) 4 | set(VERSION_MINIPATCH @VERSION_MINIPATCH@) 5 | set(VERSION_FULL 0.8.10) 6 | -------------------------------------------------------------------------------- /src/auth/davixauth.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2013 4 | * Author: Adrien Devresse 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #include 23 | #include 24 | namespace Davix{ 25 | 26 | std::vector v; 27 | 28 | SessionInfo::SessionInfo() : data(NULL){ 29 | 30 | } 31 | 32 | std::vector & SessionInfo::getReadableDN() const{ 33 | // TODO: implement proper DN mapping 34 | return v; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/auth/davixx509cred_internal.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2013 4 | * Author: Adrien Devresse 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #ifndef DAVIX_X509CRED_INTERNAL_HPP 23 | #define DAVIX_X509CRED_INTERNAL_HPP 24 | 25 | #include 26 | #include 27 | 28 | namespace Davix{ 29 | 30 | 31 | // SSL Ops 32 | ne_ssl_client_cert *SSL_X509_Pem_Read(const std::string & pkeyfile, const std::string & credfile, 33 | const std::string & password, DavixError** err); 34 | 35 | 36 | struct X509CredentialExtra{ 37 | 38 | static ne_ssl_client_cert* extract_ne_ssl_clicert(const X509Credential & cred); 39 | 40 | static bool get_x509_info(const X509Credential &cred, 41 | std::string* ucert, std::string* ukey, std::string* passwd); 42 | 43 | }; 44 | 45 | } 46 | 47 | 48 | 49 | 50 | 51 | #endif // DAVIX_X509CRED_INTERNAL_HPP 52 | -------------------------------------------------------------------------------- /src/backend/BoundHooks.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2019 4 | * Author: Georgios Bitzes 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #ifndef DAVIX_BACKEND_BOUND_HOOKS_HPP 23 | #define DAVIX_BACKEND_BOUND_HOOKS_HPP 24 | 25 | #include 26 | #include 27 | 28 | namespace Davix { 29 | 30 | //------------------------------------------------------------------------------ 31 | // Hooks for internal use 32 | //------------------------------------------------------------------------------ 33 | struct BoundHooks { 34 | typedef std::function BoundPreSendHook; 35 | typedef std::function BoundPreReceiveHook; 36 | 37 | BoundPreSendHook presendHook; 38 | BoundPreReceiveHook prereceiveHook; 39 | }; 40 | 41 | } 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/curl/HeaderlineParser.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2019 4 | * Author: Georgios Bitzes 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #ifndef DAVIX_CURL_HEADERLINE_PARSER_HPP 23 | #define DAVIX_CURL_HEADERLINE_PARSER_HPP 24 | 25 | #include 26 | 27 | namespace Davix { 28 | 29 | //------------------------------------------------------------------------------ 30 | // Utility class to parse header lines, and split them into key and value 31 | //------------------------------------------------------------------------------ 32 | class HeaderlineParser { 33 | public: 34 | HeaderlineParser(const char *buff, size_t len); 35 | HeaderlineParser(const std::string &str); 36 | 37 | std::string getKey() const; 38 | std::string getValue() const; 39 | 40 | private: 41 | void parse(const char *buff, size_t len); 42 | std::string key; 43 | std::string value; 44 | }; 45 | 46 | } 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/davix_context_internal.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2013 4 | * Author: Adrien Devresse 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #ifndef DAVIX_CONTEXTINTERNAL_H 23 | #define DAVIX_CONTEXTINTERNAL_H 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | #include 30 | 31 | 32 | namespace Davix { 33 | 34 | /// @cond HIDDEN_SYMBOLS 35 | 36 | class RedirectionResolver; 37 | class SessionFactory; 38 | 39 | 40 | struct ContextExplorer{ 41 | 42 | static SessionFactory & SessionFactoryFromContext(Context & c); 43 | static RedirectionResolver & RedirectionResolverFromContext(Context &c); 44 | 45 | }; 46 | 47 | 48 | // libpath handler 49 | struct LibPath{ 50 | LibPath(); 51 | 52 | std::string path; 53 | 54 | }; 55 | 56 | 57 | const std::string & getLibPath(); 58 | 59 | 60 | 61 | 62 | ///@endcond 63 | 64 | } // namespace Davix 65 | 66 | #endif // DAVIX_CONTEXTINTERNAL_H 67 | -------------------------------------------------------------------------------- /src/fileops/AzureIO.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2017 4 | * Author: Georgios Bitzes 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #ifndef AZURE_IO_HPP 23 | #define AZURE_IO_HPP 24 | 25 | #include 26 | 27 | namespace Davix{ 28 | 29 | class AzureIO : public HttpIOChain { 30 | public: 31 | AzureIO(); 32 | ~AzureIO(); 33 | 34 | // write from content provider 35 | virtual dav_ssize_t writeFromProvider(IOChainContext & iocontext, ContentProvider &provider); 36 | 37 | private: 38 | void writeChunk(IOChainContext & iocontext, const char* buff, dav_size_t size, const std::string &blockid); 39 | void commitChunks(IOChainContext & iocontext, const std::vector &blocklist); 40 | }; 41 | 42 | } 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/fileops/chain_factory.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2013 4 | * Author: Adrien Devresse 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #include "chain_factory.hpp" 23 | 24 | #include "davmeta.hpp" 25 | #include "httpiovec.hpp" 26 | #include "davix_reliability_ops.hpp" 27 | #include "iobuffmap.hpp" 28 | #include "AzureIO.hpp" 29 | #include "S3IO.hpp" 30 | #include "SwiftIO.hpp" 31 | 32 | namespace Davix{ 33 | 34 | 35 | ChainFactory::ChainFactory(){} 36 | 37 | 38 | HttpIOChain& ChainFactory::instanceChain(const CreationFlags & flags, HttpIOChain & c){ 39 | HttpIOChain* elem; 40 | elem= c.add(new MetalinkOps())->add(new AutoRetryOps())->add(new S3MetaOps())->add(new SwiftMetaOps())->add(new AzureMetaOps())->add(new HttpMetaOps()); 41 | 42 | // add posix to the chain if needed 43 | if(flags[CHAIN_POSIX] == true){ 44 | elem = elem->add(new HttpIOBuffer()); 45 | } 46 | 47 | elem->add(new S3IO())->add(new SwiftIO())->add(new AzureIO())->add(new HttpIO())->add(new HttpIOVecOps()); 48 | return c; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/fileops/chain_factory.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2013 4 | * Author: Adrien Devresse 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #ifndef CHAIN_FACTORY_HPP 23 | #define CHAIN_FACTORY_HPP 24 | 25 | #include 26 | 27 | #include 28 | #include 29 | 30 | namespace Davix{ 31 | 32 | const int CHAIN_POSIX = 1; 33 | 34 | typedef std::bitset<32> CreationFlags; 35 | 36 | class ChainFactory 37 | { 38 | public: 39 | static HttpIOChain& instanceChain(const CreationFlags & flags, HttpIOChain & c); 40 | private: 41 | ChainFactory(); 42 | }; 43 | 44 | 45 | } 46 | 47 | #endif // CHAIN_FACTORY_HPP 48 | -------------------------------------------------------------------------------- /src/hooks/davix_hooks.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2013 4 | * Author: Adrien Devresse 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #include 23 | 24 | namespace Davix{ 25 | 26 | 27 | 28 | HookList::HookList() : _pre_run_req(), _pre_send_req(), _pre_rece_req() 29 | {} 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/libs/alibxx/algorithm/algorithm.hpp: -------------------------------------------------------------------------------- 1 | #ifndef ALGORITHM_HPP 2 | #define ALGORITHM_HPP 3 | 4 | 5 | 6 | namespace A_LIB_NAMESPACE{ 7 | 8 | template 9 | _Iterator2 match_array(_Iterator1 begin_match, _Iterator1 end_match, 10 | _Iterator2 begin_resu, _Iterator2 end_resu, _Tvalue val){ 11 | do{ 12 | if(*begin_match == val) 13 | return begin_resu; 14 | 15 | begin_match++; 16 | begin_resu++; 17 | }while( begin_match < end_match && begin_resu < end_resu); 18 | return end_resu; 19 | } 20 | 21 | } 22 | 23 | #endif // ALGORITHM_HPP 24 | -------------------------------------------------------------------------------- /src/libs/alibxx/alibxx.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /** Alibxx is a simple library for CXX conveniences functions 3 | This library is under public domain: feel free to reuse, include and change the license 4 | 5 | Author: Devresse Adrien 6 | */ 7 | 8 | 9 | // define A_LIB_NAMESPACE to Davix by default 10 | #ifndef A_LIB_NAMESPACE 11 | #define A_LIB_NAMESPACE Davix 12 | #endif 13 | 14 | 15 | // algorithm helpers 16 | #include "algorithm/algorithm.hpp" 17 | 18 | // type conversion 19 | #include "typeconv/typeconv.hpp" 20 | 21 | // containers 22 | #include "containers/cache.hpp" 23 | 24 | // chrono 25 | #include "chrono/timepoint.hpp" 26 | 27 | 28 | // str 29 | #include "str/format.hpp" 30 | 31 | 32 | // crypto 33 | #include "crypto/base64.hpp" 34 | #include "crypto/hmacsha.hpp" 35 | 36 | -------------------------------------------------------------------------------- /src/libs/alibxx/base_types.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "alibxx.hpp" 4 | #include 5 | 6 | 7 | namespace A_LIB_NAMESPACE{ 8 | 9 | namespace Type{ 10 | 11 | 12 | // signed type 13 | 14 | typedef int8_t Byte; 15 | 16 | typedef int16_t Int16; 17 | 18 | typedef int32_t Int32; 19 | 20 | typedef int64_t Int64; 21 | 22 | // unsigned bytes 23 | 24 | typedef u_int8_t UByte; 25 | 26 | typedef u_int16_t UInt16; 27 | 28 | typedef u_int32_t UInt32; 29 | 30 | typedef u_int64_t UInt64; 31 | 32 | 33 | 34 | 35 | 36 | } // Type 37 | 38 | 39 | } // Alibxx Namespace 40 | -------------------------------------------------------------------------------- /src/libs/alibxx/chrono/chrono_exception.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | 6 | namespace A_LIB_NAMESPACE{ 7 | 8 | class ChronoException: public std::exception{ 9 | public: 10 | ChronoException(const std::string & str) : message(str){} 11 | virtual ~ChronoException() throw(){} 12 | 13 | virtual const char* what() const throw(){ 14 | return message.c_str(); 15 | } 16 | 17 | private: 18 | std::string message; 19 | }; 20 | 21 | 22 | 23 | 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/libs/alibxx/crypto/base64.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) 2013 Adrien Devresse , CERN 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | 22 | #ifndef BASE64_HPP 23 | #define BASE64_HPP 24 | 25 | /* 26 | base64.cpp and base64.hpp 27 | 28 | Modified version from René Nyffenegger version 29 | 30 | Public Domain 31 | 32 | */ 33 | 34 | #include 35 | 36 | namespace Base64{ 37 | 38 | std::string base64_encode(unsigned char const* , unsigned int len); 39 | std::string base64_decode(std::string const& s); 40 | 41 | 42 | 43 | } 44 | 45 | #endif // BASE64_HPP 46 | -------------------------------------------------------------------------------- /src/libs/alibxx/crypto/hmacsha.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) 2013 Adrien Devresse , CERN 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include 25 | 26 | std::string hmac_sha1(const std::string & key, const std::string & data); 27 | std::string hmac_sha256(const std::string & key, const std::string & data); 28 | std::string sha256(const std::string input); 29 | std::string rsasha256(const std::string &key, const std::string &data); 30 | -------------------------------------------------------------------------------- /src/libs/alibxx/operator.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | #include "alibxx.hpp" 5 | 6 | namespace A_LIB_NAMESPACE{ 7 | 8 | namespace Operator { 9 | 10 | 11 | 12 | // need operator == 13 | template 14 | class Equality{ 15 | public: 16 | friend bool operator!=(const T& x, const O& y) { return !static_cast(x == y); } 17 | }; 18 | 19 | 20 | // need operator == and < 21 | template 22 | class Compare{ 23 | public: 24 | friend bool operator>(const T& x, const O& y) { return y < x; } 25 | friend bool operator<=(const T& x, const O& y) { return !static_cast(y < x); } 26 | friend bool operator>=(const T& x, const O& y) { return !static_cast(x < y); } 27 | 28 | 29 | }; 30 | 31 | 32 | 33 | // need operator += 34 | template 35 | class Addable{ 36 | public: 37 | friend T operator+(const T& x, const O& y) { T res(x); res+= y; return res; } 38 | 39 | }; 40 | 41 | template 42 | class Subtractable{ 43 | public: 44 | friend T operator-(const T& x, const O& y) { T res(x); res-= y; return res; } 45 | 46 | }; 47 | 48 | 49 | 50 | 51 | } 52 | 53 | 54 | } // A_LIB_NAMESPACE 55 | -------------------------------------------------------------------------------- /src/libs/alibxx/typeconv/typeconv_exception.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | 6 | namespace A_LIB_NAMESPACE{ 7 | 8 | class TypeConvException: public std::exception{ 9 | public: 10 | TypeConvException(const std::string & str) : message(str){} 11 | virtual ~TypeConvException() throw(){} 12 | 13 | virtual const char* what() const throw(){ 14 | return message.c_str(); 15 | } 16 | 17 | private: 18 | std::string message; 19 | }; 20 | 21 | 22 | 23 | 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/libs/rapidjson/internal/swap.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_INTERNAL_SWAP_H_ 16 | #define RAPIDJSON_INTERNAL_SWAP_H_ 17 | 18 | #include "../rapidjson.h" 19 | 20 | #if defined(__clang__) 21 | RAPIDJSON_DIAG_PUSH 22 | RAPIDJSON_DIAG_OFF(c++98-compat) 23 | #endif 24 | 25 | RAPIDJSON_NAMESPACE_BEGIN 26 | namespace internal { 27 | 28 | //! Custom swap() to avoid dependency on C++ header 29 | /*! \tparam T Type of the arguments to swap, should be instantiated with primitive C++ types only. 30 | \note This has the same semantics as std::swap(). 31 | */ 32 | template 33 | inline void Swap(T& a, T& b) RAPIDJSON_NOEXCEPT { 34 | T tmp = a; 35 | a = b; 36 | b = tmp; 37 | } 38 | 39 | } // namespace internal 40 | RAPIDJSON_NAMESPACE_END 41 | 42 | #if defined(__clang__) 43 | RAPIDJSON_DIAG_POP 44 | #endif 45 | 46 | #endif // RAPIDJSON_INTERNAL_SWAP_H_ 47 | -------------------------------------------------------------------------------- /src/modules/copy/delegation/typemap.dat: -------------------------------------------------------------------------------- 1 | tns="http://www.gridsite.org/namespaces/delegation-1" 2 | tns2="http://www.gridsite.org/namespaces/delegation-2" 3 | -------------------------------------------------------------------------------- /src/modules/modules_profiles.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2013 4 | * Author: Adrien Devresse 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #ifndef MODULES_PROFILES_HPP 23 | #define MODULES_PROFILES_HPP 24 | 25 | 26 | namespace Davix{ 27 | 28 | class Context; 29 | 30 | // load grid profile, setup all required environment and hooks 31 | void loadGridProfile(Context & context); 32 | 33 | } 34 | 35 | 36 | 37 | #endif // MODULES_PROFILES_HPP 38 | -------------------------------------------------------------------------------- /src/status/DavixErrorInternal.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2019 4 | * Author: Georgios Bitzes 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #ifndef DAVIX_STATUS_DAVIX_ERROR_INTERNAL_HPP 23 | #define DAVIX_STATUS_DAVIX_ERROR_INTERNAL_HPP 24 | 25 | #include 26 | 27 | namespace Davix { 28 | 29 | struct DavixErrorInternal { 30 | DavixErrorInternal(const std::string &scope, StatusCode::Code errCode, const std::string &errMsg) : 31 | _scope(scope), 32 | _code(errCode), 33 | _errMsg(errMsg){ 34 | } 35 | 36 | DavixErrorInternal(const DavixErrorInternal & e) : 37 | _scope(e._scope), 38 | _code(e._code), 39 | _errMsg(e._errMsg){ 40 | 41 | } 42 | 43 | std::string _scope; 44 | StatusCode::Code _code; 45 | std::string _errMsg; 46 | }; 47 | 48 | 49 | } 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/tools/davix_config_parser.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef DAVIX_CONFIG_PARSER_HPP 22 | #define DAVIX_CONFIG_PARSER_HPP 23 | 24 | #include 25 | #include 26 | #include "davix_tool_params.hpp" 27 | 28 | namespace Davix { 29 | 30 | std::vector davix_config_tokenize(const std::string &contents, std::string &err); 31 | bool davix_config_apply(const std::string &filename, Tool::OptParams ¶ms, const std::string &url); 32 | bool davix_config_apply(const std::string &filename, const std::string &contents, const Uri &uri, Tool::OptParams ¶ms); 33 | 34 | } 35 | 36 | #endif -------------------------------------------------------------------------------- /src/tools/davix_mutex.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2013 4 | * Author: Kwong Tat Cheung 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #ifndef DAVIX_MUTEX_HPP 23 | #define DAVIX_MUTEX_HPP 24 | 25 | #include 26 | 27 | // Simple wrapper for scoped mutex 28 | 29 | namespace Davix{ 30 | 31 | class DavixMutex{ 32 | 33 | public: 34 | DavixMutex(pthread_mutex_t& mutex) : _mutex(mutex) 35 | { 36 | pthread_mutex_lock(&_mutex); 37 | } 38 | 39 | ~DavixMutex() 40 | { 41 | pthread_mutex_unlock(&_mutex); 42 | } 43 | 44 | void lock() 45 | { 46 | pthread_mutex_lock(&_mutex); 47 | } 48 | 49 | void unlock() 50 | { 51 | pthread_mutex_unlock(&_mutex); 52 | } 53 | 54 | pthread_mutex_t* getMutex() 55 | { 56 | return &_mutex; 57 | } 58 | 59 | private: 60 | pthread_mutex_t& _mutex; 61 | }; 62 | 63 | } 64 | 65 | #endif // DAVIX_MUTEX_HPP 66 | -------------------------------------------------------------------------------- /src/tools/davix_thread_pool.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2013 4 | * Author: Kwong Tat Cheung 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #ifndef DAVIX_THREAD_POOL_HPP 23 | #define DAVIX_THREAD_POOL_HPP 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | namespace Davix{ 31 | 32 | class DavixThreadPool{ 33 | public: 34 | DavixThreadPool(DavixTaskQueue* tq, const int pool_size); 35 | ~DavixThreadPool(); 36 | void init(); 37 | void shutdown(); 38 | int getThreadCount(); 39 | bool allThreadsIdle(); 40 | private: 41 | DavixTaskQueue* _tq; 42 | int threadCount; 43 | int _pool_size; 44 | DavixThread** tp; 45 | }; 46 | 47 | } 48 | 49 | #endif // DAVIX_THREAD_POOL_HPP 50 | -------------------------------------------------------------------------------- /src/utils/checksum_extractor.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2018 4 | * Author: Georgios Bitzes 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #include 23 | 24 | namespace Davix { 25 | 26 | class ChecksumExtractor { 27 | public: 28 | 29 | static bool extractChecksum(const std::string &headerLine, 30 | const std::string &desiredChecksum, std::string &checksum); 31 | 32 | static bool extractChecksum(const HeaderVec &headers, 33 | const std::string &desiredChecksum, std::string &checksum); 34 | 35 | }; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/utils/davix_misc_utils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2015 4 | * Author: Georgios Bitzes 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #include 23 | #include 24 | 25 | namespace Davix { 26 | 27 | WebdavSupport::Type detect_webdav_support(Context & context, const RequestParams ¶ms, const Uri & uri, DavixError** err) { 28 | HttpRequest req(context, uri, err); 29 | req.setParameters(params); 30 | req.setRequestMethod("OPTIONS"); 31 | req.executeRequest(err); 32 | 33 | std::string allow; 34 | req.getAnswerHeader("Allow", allow); 35 | 36 | if(*err) { 37 | return WebdavSupport::UNKNOWN; 38 | } 39 | 40 | if(allow.find("PROPFIND") != std::string::npos || allow.find("MKCOL") != std::string::npos) { 41 | return WebdavSupport::YES; 42 | } 43 | 44 | return WebdavSupport::NO; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/utils/simple_get_pass.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) 2013 Adrien Devresse , CERN 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #pragma once 22 | #ifndef SIMPLE_GET_PASS_H 23 | #define SIMPLE_GET_PASS_H 24 | 25 | 26 | 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | int simple_get_pass(char* passwd, size_t max_size); 33 | 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif // SIMPLE_GET_PASS_H 40 | -------------------------------------------------------------------------------- /src/xml/davix_ptree.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2013 4 | * Author: Adrien Devresse 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #include "davix_ptree.hpp" 23 | 24 | namespace Davix { 25 | 26 | 27 | 28 | } // namespace Davix 29 | -------------------------------------------------------------------------------- /test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # main file for src 2 | 3 | find_package(GTest REQUIRED) 4 | 5 | # force RPATH usage for easy test execution 6 | set(CMAKE_SKIP_RPATH OFF 7 | CACHE BOOL "" FORCE) 8 | 9 | include_directories(${PROJECT_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src/) 10 | link_directories(${PROJECT_BINARY_DIR}/src/) 11 | 12 | set(TEST_CRED_PATH "${CMAKE_CURRENT_SOURCE_DIR}/certs/my_keycert.p12") 13 | set(TEST_CRED_PASS "testpass") 14 | 15 | add_subdirectory(unit) 16 | add_subdirectory(slow-unit) 17 | add_subdirectory(functional) 18 | add_subdirectory(root-tests) 19 | add_subdirectory(bench) 20 | -------------------------------------------------------------------------------- /test/bench/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # main file for src 2 | 3 | if(BENCH_TESTS) 4 | 5 | LIST(APPEND src_davix_bench "davix_bench.cpp" "chunk_queue.cpp") 6 | 7 | #include_directories(/usr/include/davix) 8 | 9 | add_executable(davix-bench ${src_davix_bench}) 10 | target_link_libraries(davix-bench libdavix ${CMAKE_THREAD_LIBS_INIT}) 11 | 12 | function(test_read url opt input) 13 | add_test(test_bench_read_${url} davix-bench ${opt} ${url} ${input}) 14 | endfunction(test_read url opt) 15 | 16 | function(test_vector_read url opt input) 17 | add_test(test_bench_vector_read_${url} davix-bench ${opt} ${url} ${input}) 18 | endfunction(test_vector_read url opt) 19 | 20 | function(test_thread_read url opt input) 21 | add_test(test_bench_thread_read_${url} davix-bench ${opt} ${url} ${input}) 22 | endfunction(test_thread_read url opt) 23 | 24 | function(test_write url opt input) 25 | add_test(test_bench_write_${url} davix-bench ${opt} ${url} ${input}) 26 | endfunction(test_write url opt) 27 | 28 | include(ctest_bench.cmake) 29 | 30 | endif(BENCH_TESTS) 31 | 32 | 33 | -------------------------------------------------------------------------------- /test/bench/chunk_queue.h: -------------------------------------------------------------------------------- 1 | #ifndef CHUNK_QUEUE 2 | #define CHUNK_QUEUE 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #define DEFAULT_WAIT_TIME 5 9 | 10 | const int STARTED = 1; 11 | const int STOPPED = 2; 12 | 13 | class ChunkQueue 14 | { 15 | public: 16 | 17 | ChunkQueue(); 18 | ~ChunkQueue(); 19 | 20 | struct worktoken 21 | { 22 | long length; 23 | long offset; 24 | DAVIX_FD* fd; 25 | }; 26 | 27 | void pushOp(long len, long oset, DAVIX_FD* davfd); 28 | 29 | struct worktoken *getOp(); 30 | 31 | void StopThreads(); 32 | int GetQueueSize(); 33 | int GetQueueState(); 34 | void SetQueueState(int new_state); 35 | 36 | 37 | private: 38 | 39 | /// Queue of the pending operations 40 | std::deque workqueue; 41 | 42 | pthread_mutex_t workmutex; 43 | pthread_cond_t popconvar; 44 | pthread_cond_t pushconvar; 45 | 46 | int state; 47 | }; 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /test/bench/ctest_bench.cmake: -------------------------------------------------------------------------------- 1 | ## ctest script file for automated bench tests for davix 2 | # 3 | 4 | message (" Setup tests parameters... ") 5 | 6 | set(INPUT_FILE "-iinputfile.txt") 7 | set(READ_OPT "-r") 8 | set(READ_VECTOR_OPT "-v50") 9 | set(READ_THREAD_OPT "-t4") 10 | set(WRITE_OPT "-w") 11 | 12 | set(http_desy_base "https://vm-dcache-deploy6.desy.de:2880/dteam/davix-tests" CACHE STRING "dCache test instance to use") 13 | set(http_lcgdm_base "https://lxfsra04a04.cern.ch/dpm/cern.ch/home/dteam" CACHE STRING "DPM test instance to use" ) 14 | set(http_lcgdm_base_write "https://lxfsra04a04.cern.ch/dpm/cern.ch/home/dteam/davix_bench_writetest" CACHE STRING "DPM test instance to use" ) 15 | 16 | # DPM tests 17 | test_read("${http_lcgdm_base}" "${READ_OPT}" "${INPUT_FILE}") 18 | test_vector_read("${http_lcgdm_base}" "${READ_VECTOR_OPT}" "${INPUT_FILE}") 19 | test_thread_read("${http_lcgdm_base}" "${READ_THREAD_OPT}" "${INPUT_FILE}") 20 | test_write("${http_lcgdm_base_write}" "${WRITE_OPT}" "${INPUT_FILE}") 21 | 22 | test_read("${http_desy_base}" "${READ_OPT}" "${INPUT_FILE}") 23 | test_vector_read("${http_desy_base}" "${READ_VECTOR_OPT}" "${INPUT_FILE}") 24 | test_thread_read("${http_desy_base}" "${READ_THREAD_OPT}" "${INPUT_FILE}") 25 | test_write("${http_desy_base}" "${WRITE_OPT}" "${INPUT_FILE}") 26 | -------------------------------------------------------------------------------- /test/bench_inputfile_gen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Generates an input file for davix-bench, containing a fixed number of line, with 2 random numbers on each line. 4 | # 5 | 6 | echo "Running script..." 7 | 8 | for i in {1..100}; 9 | do n=$(shuf -i 1-10000 -n 1); m=$(shuf -i 1-$n -n 1); 10 | echo "$n $m">>../build/test/bench/inputfile.txt; 11 | done 12 | 13 | #for i in {1..10000}; 14 | # do n=$(( (RANDOM % 10000) +1)); m=$(( (RANDOM % n) +1)); 15 | # echo "$n $m">>inputfile.txt; 16 | #done 17 | -------------------------------------------------------------------------------- /test/certs/my_keycert.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/test/certs/my_keycert.p12 -------------------------------------------------------------------------------- /test/drunk-server/Synchronized.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2019 4 | * Author: Georgios Bitzes 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #ifndef DAVIX_TEST_SYNCHRONIZED_HPP 23 | #define DAVIX_TEST_SYNCHRONIZED_HPP 24 | 25 | #include 26 | 27 | template 28 | class Synchronized { 29 | public: 30 | 31 | T get() { 32 | std::lock_guard lock(_mtx); 33 | return _val; 34 | } 35 | 36 | void set(const T& v) { 37 | std::lock_guard lock(_mtx); 38 | _val = v; 39 | } 40 | 41 | private: 42 | std::mutex _mtx; 43 | T _val; 44 | 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /test/functional/davix_rw_test.cpp: -------------------------------------------------------------------------------- 1 | #include "test_stat.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "davix_test_lib.h" 8 | 9 | using namespace Davix; 10 | 11 | 12 | 13 | 14 | int main(int argc, char** argv){ 15 | if( argc < 2){ 16 | std::cout << "Usage : " << std::endl; 17 | std::cout <<"\t" << argv[0] << " [url]" << std::endl; 18 | std::cout <<"\t" << argv[0] << " [url] [CERTIFICATE_PATH] " << std::endl; 19 | return 0; 20 | } 21 | 22 | davix_set_log_level(DAVIX_LOG_ALL); 23 | 24 | DavixError* tmp_err=NULL; 25 | Davix_fd* fd; 26 | ssize_t ret=1; 27 | RequestParams p; 28 | std::auto_ptr c( new Context()); 29 | DavPosix pos(c.get()); 30 | char buff[2050]={0}; 31 | 32 | if(argc > 2){ 33 | configure_grid_env(argv[2], p); 34 | } 35 | 36 | if( (fd =pos.open(&p, argv[1], O_RDONLY, &tmp_err)) == NULL){ 37 | std::cerr << " error while opening file " << tmp_err->getErrMsg() << " code :" << (int) tmp_err->getStatus() << std::endl; 38 | return -1; 39 | } 40 | 41 | // std::cout << "file content " << std::endl; 42 | while( fd && (ret = pos.read(fd, buff, 2048, &tmp_err)) > 0){ 43 | buff[ret] = '\0'; 44 | std::cout << buff; 45 | } 46 | std::cout << std::endl; 47 | 48 | if(tmp_err){ 49 | std::cerr << " error while readding file " << tmp_err->getErrMsg() << " code :" << (int) tmp_err->getStatus() << std::endl; 50 | return -1; 51 | } 52 | 53 | if( (ret = pos.close(fd, &tmp_err))){ 54 | std::cerr << " error while closing file " << tmp_err->getErrMsg() << " code :" << (int) tmp_err->getStatus() << std::endl; 55 | return -1; 56 | } 57 | 58 | return 0; 59 | } 60 | 61 | -------------------------------------------------------------------------------- /test/functional/davix_test_lib.h: -------------------------------------------------------------------------------- 1 | #ifndef DAVIX_TEST_LIB_H 2 | #define DAVIX_TEST_LIB_H 3 | 4 | #include 5 | #include 6 | 7 | int mycred_auth_callback_x509(void* userdata, const Davix::SessionInfo & info, Davix::X509Credential * cert, Davix::DavixError** err); 8 | 9 | void configure_grid_env(char * auth_args, Davix::RequestParams& p); 10 | 11 | void configure_grid_env_bis(char * auth_args, Davix::RequestParams& p); 12 | 13 | 14 | char* generate_random_uri(const char* uri_dir, const char* prefix, char* buff, size_t s_buff); 15 | 16 | Davix::Uri generate_random_uri(const Davix::Uri & url_directory, const std::string & prefix); 17 | 18 | char * generate_random_string_content(size_t size); 19 | 20 | 21 | #define DAV_ASSERT_TRUE(test, failure_msg) \ 22 | do{ \ 23 | if(! (test) ){ \ 24 | std::cerr << "f:"<< __FILE__ << ":" << __LINE__ << ": " << failure_msg << std::endl; \ 25 | exit(-1); \ 26 | } \ 27 | }while(0) 28 | 29 | 30 | #endif // DAVIX_TEST_LIB_H 31 | -------------------------------------------------------------------------------- /test/functional/test_checksum.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "davix_test_lib.h" 11 | 12 | 13 | using namespace Davix; 14 | 15 | int main(int argc, char** argv){ 16 | if( argc < 3){ 17 | std::cout << "Usage : " << std::endl; 18 | std::cout <<"\t" << argv[0] << " [url] [algo]" << std::endl; 19 | std::cout <<"\t" << argv[0] << " [url] [algo] [CERTIFICATE_PATH] " << std::endl; 20 | return 0; 21 | } 22 | 23 | RequestParams p; 24 | DavixError* tmp_err=NULL; 25 | 26 | Uri u(argv[1]); 27 | char* algo = argv[2]; 28 | Context c; 29 | File f(c,u); 30 | 31 | if(argc > 3){ 32 | configure_grid_env(argv[3], p); 33 | } 34 | 35 | std::string chk; 36 | int ret = f.checksum(&p, chk, algo, &tmp_err); 37 | 38 | if(ret ==0) 39 | std::cout << algo << " "<< chk << std::endl; 40 | else 41 | std::cout << "checksum error "<< tmp_err->getErrMsg() << std::endl; 42 | 43 | return 0; 44 | } 45 | 46 | -------------------------------------------------------------------------------- /test/functional/test_mv.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "davix_test_lib.h" 11 | 12 | 13 | using namespace Davix; 14 | 15 | int main(int argc, char** argv){ 16 | if( argc < 2){ 17 | std::cout << "Usage : " << std::endl; 18 | std::cout <<"\t" << argv[0] << " [url]" << std::endl; 19 | std::cout <<"\t" << argv[0] << " [url] [CERTIFICATE_PATH] " << std::endl; 20 | return 0; 21 | } 22 | 23 | srand(time(NULL)); 24 | davix_set_log_level(DAVIX_LOG_ALL); 25 | 26 | 27 | RequestParams p; 28 | DavixError* tmp_err=NULL; 29 | //std::auto_ptr c( new Context()); 30 | Context c; 31 | 32 | DavPosix pos(&c); 33 | 34 | if(argc > 2){ 35 | configure_grid_env(argv[2], p); 36 | } 37 | 38 | std::string url = argv[1]; 39 | std::string a = generate_random_uri(Davix::Uri(url), "test_move").getString(); 40 | std::string b = a+"cake"; 41 | 42 | int ret = 0; 43 | 44 | // create dir 45 | if( (ret = pos.mkdir(&p, a.c_str(), 0777, &tmp_err) <0)) 46 | { 47 | std::cerr << "mkdir error "<< tmp_err->getErrMsg() << std::endl; 48 | return -1; 49 | } 50 | // rename file 51 | if( (ret = pos.rename(&p, a.c_str(), b.c_str(), &tmp_err) <0)) 52 | { 53 | std::cerr << "mv error "<< tmp_err->getErrMsg() << std::endl; 54 | return -1; 55 | } 56 | // remove dir 57 | DavFile f(c, b); 58 | f.deletion(&p, &tmp_err); 59 | 60 | return 0; 61 | } 62 | -------------------------------------------------------------------------------- /test/functional/test_opendir.cpp: -------------------------------------------------------------------------------- 1 | #include "test_opendir.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | 8 | #include "davix_test_lib.h" 9 | 10 | 11 | using namespace Davix; 12 | 13 | 14 | #define MY_BUFFER_SIZE 65000 15 | 16 | int main(int argc, char** argv){ 17 | if( argc < 2){ 18 | std::cout << "Usage : " << std::endl; 19 | std::cout <<"\t" << argv[0] << " [url]" << std::endl; 20 | std::cout <<"\t" << argv[0] << " [url] [CERTIFICATE_PATH] " << std::endl; 21 | return 0; 22 | } 23 | 24 | davix_set_log_level(DAVIX_LOG_ALL); 25 | 26 | 27 | DavixError* tmp_err=NULL; 28 | RequestParams p; 29 | std::auto_ptr c( new Context()); 30 | DavPosix pos(c.get()); 31 | if(argc > 2){ 32 | configure_grid_env(argv[2], p); 33 | } 34 | 35 | 36 | 37 | DAVIX_DIR* d = pos.opendir(&p, argv[1], &tmp_err); 38 | 39 | if(d != NULL){ 40 | struct dirent * dir = NULL; 41 | int n =0; 42 | do{ 43 | dir= pos.readdir(d, &tmp_err); 44 | if(dir) 45 | std::cout << "N° " << ++n <<" file : " << dir->d_name << std::endl; 46 | }while(dir!= NULL); 47 | 48 | pos.closedir(d, NULL); 49 | } 50 | if(tmp_err){ 51 | std::cout << " listing directory error "<< tmp_err->getErrMsg() << std::endl; 52 | return -1; 53 | } 54 | return 0; 55 | } 56 | 57 | -------------------------------------------------------------------------------- /test/functional/test_opendir.h: -------------------------------------------------------------------------------- 1 | #ifndef TEST_OPENDIR_H 2 | #define TEST_OPENDIR_H 3 | 4 | 5 | 6 | #endif // TEST_OPENDIR_H 7 | -------------------------------------------------------------------------------- /test/functional/test_opendir_partial.h: -------------------------------------------------------------------------------- 1 | #ifndef TEST_OPENDIR_H 2 | #define TEST_OPENDIR_H 3 | 4 | 5 | 6 | #endif // TEST_OPENDIR_H 7 | -------------------------------------------------------------------------------- /test/functional/test_opendirpp.cpp: -------------------------------------------------------------------------------- 1 | #include "test_opendirpp.h" 2 | 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "davix_test_lib.h" 9 | 10 | using namespace Davix; 11 | 12 | 13 | #define MY_BUFFER_SIZE 65000 14 | 15 | 16 | 17 | 18 | int main(int argc, char** argv){ 19 | if( argc < 2){ 20 | std::cout << "Usage : " << std::endl; 21 | std::cout <<"\t" << argv[0] << " [url]" << std::endl; 22 | std::cout <<"\t" << argv[0] << " [url] [CERTIFICATE_PATH] " << std::endl; 23 | return 0; 24 | } 25 | 26 | davix_set_log_level(DAVIX_LOG_ALL); 27 | 28 | RequestParams p; 29 | std::auto_ptr c( new Context()); 30 | DavPosix pos(c.get()); 31 | Davix::DavixError* tmp_err; 32 | 33 | if(argc > 2){ 34 | configure_grid_env(argv[2], p); 35 | } 36 | 37 | DAVIX_DIR* d = pos.opendirpp(&p, argv[1], &tmp_err); 38 | 39 | if(d){ 40 | struct dirent * dir = NULL; 41 | int n =0; 42 | do{ 43 | struct stat st; 44 | dir= pos.readdirpp(d, &st, &tmp_err); 45 | if(dir) 46 | std::cout << "N° " << ++n <<" file : " << dir->d_name <<" len : " << st.st_size << " atime: "<< st.st_atime << " mode : "<< std::oct << st.st_mode; 47 | std::cout << " mtime : " << st.st_mtime ; 48 | std::cout << " ctime : " << st.st_ctime << std::endl; 49 | }while(dir!= NULL); 50 | 51 | pos.closedirpp(d, &tmp_err); 52 | } 53 | 54 | return 0; 55 | } 56 | 57 | -------------------------------------------------------------------------------- /test/functional/test_opendirpp.h: -------------------------------------------------------------------------------- 1 | #ifndef TEST_OPENDIR_H 2 | #define TEST_OPENDIR_H 3 | 4 | 5 | 6 | #endif // TEST_OPENDIR_H 7 | -------------------------------------------------------------------------------- /test/functional/test_request.cpp: -------------------------------------------------------------------------------- 1 | #include "test_request.h" 2 | 3 | #include 4 | 5 | using namespace Davix; 6 | 7 | int main(int argc, char** argv){ 8 | if( argc < 2){ 9 | std::cout << "Usage " << argv[0] << " [url]" << std::endl; 10 | return 0; 11 | } 12 | 13 | DavixError* tmp_err=NULL; 14 | Context c; 15 | HttpRequest r(c, argv[1], &tmp_err); 16 | 17 | if(!tmp_err) 18 | r.executeRequest(&tmp_err); 19 | if(tmp_err){ 20 | std::cerr << " error in request : " << tmp_err->getErrMsg() << std::endl; 21 | }else{ 22 | std::vector body = r.getAnswerContentVec(); 23 | std::string v(body.begin(), body.end()); 24 | std::cout << "content "<< v << std::endl; 25 | } 26 | 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /test/functional/test_request.h: -------------------------------------------------------------------------------- 1 | #ifndef TEST_REQUEST_H 2 | #define TEST_REQUEST_H 3 | 4 | 5 | 6 | #endif // TEST_REQUEST_H 7 | -------------------------------------------------------------------------------- /test/functional/test_stat_session.cpp: -------------------------------------------------------------------------------- 1 | #include "test_stat_session.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "davix_test_lib.h" 8 | 9 | using namespace Davix; 10 | 11 | int n_call=0; 12 | 13 | int main(int argc, char** argv){ 14 | if( argc < 3){ 15 | std::cout << "Usage : " << std::endl; 16 | std::cout <<"\t" << argv[0] << " [CERTIFICATE_PATH] [url] [url] .... " << std::endl; 17 | return 0; 18 | } 19 | 20 | davix_set_log_level(DAVIX_LOG_ALL); 21 | 22 | 23 | DavixError* tmp_err=NULL; 24 | RequestParams p; 25 | std::auto_ptr c( new Context()); 26 | DavPosix pos(c.get()); 27 | if(argc > 2){ 28 | configure_grid_env(argv[1], p); 29 | } 30 | 31 | 32 | for(int i =2 ; i< argc; ++i){ 33 | struct stat st; 34 | if( pos.stat(&p,argv[i], &st, &tmp_err) ==0){ 35 | std::cout << "stat success" << std::endl; 36 | std::cout << " atime : " << st.st_atime << std::endl; 37 | std::cout << " mtime : " << st.st_mtime << std::endl; 38 | std::cout << " ctime : " << st.st_ctime << std::endl; 39 | std::cout << " mode : 0" << std::oct << st.st_mode << std::endl; 40 | std::cout << " len : " << st.st_size << std::endl; 41 | }else{ 42 | std::cerr << " davix_stat error " << tmp_err->getErrMsg(); 43 | return -1; 44 | } 45 | 46 | 47 | 48 | } 49 | 50 | 51 | 52 | std::cout << "authentication callback has been called " << n_call << std::endl; 53 | 54 | return 0; 55 | } 56 | 57 | -------------------------------------------------------------------------------- /test/functional/test_stat_session.h: -------------------------------------------------------------------------------- 1 | #ifndef TEST_STAT_H 2 | #define TEST_STAT_H 3 | 4 | 5 | 6 | #endif // TEST_STAT_H 7 | -------------------------------------------------------------------------------- /test/functional/tool_get_replica_simple.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | 5 | #include "davix_test_lib.h" 6 | 7 | 8 | using namespace Davix; 9 | 10 | 11 | #define MY_BUFFER_SIZE 65000 12 | 13 | int main(int argc, char** argv){ 14 | if( argc < 2){ 15 | std::cout << "Usage : " << std::endl; 16 | std::cout <<"\t" << argv[0] << " [url]" << std::endl; 17 | std::cout <<"\t" << argv[0] << " [url] [CERTIFICATE_PATH] " << std::endl; 18 | return 0; 19 | } 20 | davix_set_log_level(0xff); 21 | 22 | RequestParams params; 23 | DavixError* tmp_err=NULL; 24 | Uri url(argv[1]); 25 | char * cert_path = argv[2]; 26 | 27 | if(argc > 2){ 28 | configure_grid_env(cert_path, params); 29 | } 30 | 31 | Context c; 32 | std::vector reps; 33 | File f(c, url); 34 | 35 | // delete unexisting dir, should fail 36 | reps = f.getReplicas(¶ms, &tmp_err); 37 | if(tmp_err != NULL){ 38 | std::cerr << "Error: " << tmp_err->getErrMsg() << std::endl; 39 | return -1; 40 | } 41 | if(reps.size() == 0){ 42 | std::cout << "No Replicas" << std::endl; 43 | return -1; 44 | } 45 | 46 | for(std::vector::iterator it = reps.begin(); it != reps.end(); ++it){ 47 | std::cout << "Replica " << it->getUri() << std::endl; 48 | } 49 | return 0; 50 | } 51 | 52 | -------------------------------------------------------------------------------- /test/pywebdav/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cern-fts/davix/f8a307d0515e619a274d68bef415b5c3491e6e84/test/pywebdav/__init__.py -------------------------------------------------------------------------------- /test/pywebdav/lib/INI_Parse.py: -------------------------------------------------------------------------------- 1 | from ConfigParser import SafeConfigParser 2 | 3 | class Configuration: 4 | def __init__(self, fileName): 5 | cp = SafeConfigParser() 6 | cp.read(fileName) 7 | self.__parser = cp 8 | self.fileName = fileName 9 | 10 | def __getattr__(self, name): 11 | if name in self.__parser.sections(): 12 | return Section(name, self.__parser) 13 | else: 14 | return None 15 | 16 | def __str__(self): 17 | p = self.__parser 18 | result = [] 19 | result.append('' % self.fileName) 20 | for s in p.sections(): 21 | result.append('[%s]' % s) 22 | for o in p.options(s): 23 | result.append('%s=%s' % (o, p.get(s, o))) 24 | return '\n'.join(result) 25 | 26 | class Section: 27 | def __init__(self, name, parser): 28 | self.name = name 29 | self.__parser = parser 30 | 31 | def __getattr__(self, name): 32 | return self.__parser.get(self.name, name) 33 | 34 | def __str__(self): 35 | return str(self.__repr__()) 36 | 37 | def __repr__(self): 38 | return self.__parser.items(self.name) 39 | 40 | def getboolean(self, name): 41 | return self.__parser.getboolean(self.name, name) 42 | 43 | def __contains__(self, name): 44 | return self.__parser.has_option(self.name, name) 45 | 46 | def get(self, name, default): 47 | if name in self: 48 | return self.__getattr__(name) 49 | else: 50 | return default 51 | 52 | def set(self, name, value): 53 | self.__parser.set(self.name, name, str(value)) 54 | 55 | # Test 56 | if __name__ == '__main__': 57 | c = Configuration('Importador.ini') 58 | print c.Origem.host, c.Origem.port 59 | -------------------------------------------------------------------------------- /test/pywebdav/lib/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | import pkg_resources 3 | 4 | # get version from package 5 | package = pkg_resources.require('PyWebDAV')[0] 6 | VERSION = package.version 7 | 8 | # author hardcoded here 9 | AUTHOR = 'Simon Pamies (spamsch@gmail.com)' 10 | -------------------------------------------------------------------------------- /test/pywebdav/lib/constants.py: -------------------------------------------------------------------------------- 1 | # definition for resourcetype 2 | COLLECTION=1 3 | OBJECT=None 4 | 5 | # attributes for resources 6 | DAV_PROPS=['creationdate', 'displayname', 'getcontentlanguage', 'getcontentlength', 'getcontenttype', 'getetag', 'getlastmodified', 'lockdiscovery', 'resourcetype', 'source', 'supportedlock'] 7 | 8 | # Request classes in propfind 9 | RT_ALLPROP=1 10 | RT_PROPNAME=2 11 | RT_PROP=3 12 | 13 | # server mode 14 | DAV_VERSION_1 = { 15 | 'version' : '1', 16 | 'options' : 17 | 'GET, HEAD, COPY, MOVE, POST, PUT, PROPFIND, PROPPATCH, OPTIONS, MKCOL, DELETE, TRACE, REPORT' 18 | } 19 | 20 | DAV_VERSION_2 = { 21 | 'version' : '1,2', 22 | 'options' : 23 | DAV_VERSION_1['options'] + ', LOCK, UNLOCK' 24 | } 25 | -------------------------------------------------------------------------------- /test/pywebdav/lib/delete.py: -------------------------------------------------------------------------------- 1 | import os 2 | import string 3 | import urllib 4 | from StringIO import StringIO 5 | 6 | from utils import gen_estring, quote_uri, make_xmlresponse 7 | from davcmd import deltree 8 | 9 | class DELETE: 10 | 11 | def __init__(self,uri,dataclass): 12 | self.__dataclass=dataclass 13 | self.__uri=uri 14 | 15 | def delcol(self): 16 | """ delete a collection """ 17 | 18 | dc=self.__dataclass 19 | result=dc.deltree(self.__uri) 20 | 21 | if not len(result.items()): 22 | return None # everything ok 23 | 24 | # create the result element 25 | return make_xmlresponse(result) 26 | 27 | def delone(self): 28 | """ delete a resource """ 29 | 30 | dc=self.__dataclass 31 | return dc.delone(self.__uri) 32 | 33 | -------------------------------------------------------------------------------- /test/pywebdav/lib/errors.py: -------------------------------------------------------------------------------- 1 | """ 2 | 3 | Exceptions for the DAVserver implementation 4 | 5 | """ 6 | 7 | class DAV_Error(Exception): 8 | """ in general we can have the following arguments: 9 | 10 | 1. the error code 11 | 2. the error result element, e.g. a element 12 | """ 13 | 14 | def __init__(self,*args): 15 | if len(args)==1: 16 | self.args=(args[0],"") 17 | else: 18 | self.args=args 19 | 20 | class DAV_Secret(DAV_Error): 21 | """ the user is not allowed to know anything about it 22 | 23 | returning this for a property value means to exclude it 24 | from the response xml element. 25 | """ 26 | 27 | def __init__(self): 28 | DAV_Error.__init__(self,0) 29 | pass 30 | 31 | class DAV_NotFound(DAV_Error): 32 | """ a requested property was not found for a resource """ 33 | 34 | def __init__(self,*args): 35 | if len(args): 36 | DAV_Error.__init__(self,404,args[0]) 37 | else: 38 | DAV_Error.__init__(self,404) 39 | 40 | pass 41 | 42 | class DAV_Forbidden(DAV_Error): 43 | """ a method on a resource is not allowed """ 44 | 45 | def __init__(self,*args): 46 | if len(args): 47 | DAV_Error.__init__(self,403,args[0]) 48 | else: 49 | DAV_Error.__init__(self,403) 50 | pass 51 | 52 | class DAV_Requested_Range_Not_Satisfiable(DAV_Error): 53 | """ none of the range-specifier values overlap the current extent 54 | of the selected resource """ 55 | 56 | def __init__(self, *args): 57 | if len(args): 58 | DAV_Error.__init__(self, 416, args[0]) 59 | else: 60 | DAV_Error.__init__(self, 416) 61 | pass 62 | 63 | -------------------------------------------------------------------------------- /test/pywebdav/lib/status.py: -------------------------------------------------------------------------------- 1 | 2 | STATUS_CODES={ 3 | 100: "Continue", 4 | 102: "Processing", 5 | 200: "Ok", 6 | 201: "Created", 7 | 204: "No Content", 8 | 207: "Multi-Status", 9 | 201: "Created", 10 | 400: "Bad Request", 11 | 403: "Forbidden", 12 | 404: "Not Found", 13 | 405: "Method Not Allowed", 14 | 409: "Conflict", 15 | 412: "Precondition failed", 16 | 423: "Locked", 17 | 415: "Unsupported Media Type", 18 | 507: "Insufficient Storage", 19 | 422: "Unprocessable Entity", 20 | 423: "Locked", 21 | 424: "Failed Dependency", 22 | 502: "Bad Gateway", 23 | 507: "Insufficient Storage" 24 | } 25 | -------------------------------------------------------------------------------- /test/pywebdav/server/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/pywebdav/server/config.ini: -------------------------------------------------------------------------------- 1 | 2 | # PyWebDAV config.ini 3 | # Read documents before editing this file 4 | 5 | # Created 11:48 10-08-2006 By Vince Spicer 6 | 7 | 8 | [MySQL] 9 | 10 | # Mysql server information 11 | host=localhost 12 | port=3306 13 | user=root 14 | passwd=rootpw 15 | 16 | # Auth Database Table, Must exists in database prior to firstrun 17 | dbtable=webDav 18 | 19 | # Create User Database Table and Insert system user 20 | # Disable after the Table is created; for performance reasons 21 | firstrun=0 22 | 23 | [DAV] 24 | 25 | # Verbose? 26 | # verbose enabled is like loglevel = INFO 27 | verbose = 1 28 | 29 | #log level : DEBUG, INFO, WARNING, ERROR, CRITICAL (Default is WARNING) 30 | #loglevel = WARNING 31 | 32 | # main directory 33 | directory = /home/spamies/tmp 34 | 35 | # Server address 36 | port = 8081 37 | host = localhost 38 | 39 | # disable auth 40 | noauth = 0 41 | 42 | # Enable mysql auth 43 | mysql_auth=0 44 | 45 | # admin user 46 | user = test 47 | password = test00 48 | 49 | # daemonize? 50 | daemonize = 0 51 | daemonaction = start 52 | 53 | # instance counter 54 | counter = 0 55 | 56 | # mimetypes support 57 | mimecheck = 1 58 | 59 | # webdav level (1 = webdav level 2) 60 | lockemulation = 1 61 | 62 | # internal features 63 | #chunked_http_response = 1 64 | #http_request_use_iterator = 0 65 | #http_response_use_iterator = 0 66 | 67 | -------------------------------------------------------------------------------- /test/root-tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | option(ROOT_TESTS "Root functional test execution " FALSE) 5 | 6 | if(ROOT_TESTS) 7 | 8 | ## the root tests are compatibility tests with the ROOT analysis framework (http://root.cern.ch/) 9 | ## The root tests need to be compiled and executed : 10 | ## - the ROOT framework 11 | ## - a valid proxy credential for the dteam VO 12 | 13 | 14 | find_package(ROOT REQUIRED) 15 | 16 | add_definitions(-Wall) 17 | 18 | 19 | 20 | 21 | add_definitions( ${INTERN_ROOT_CONFIG_CFLAGS} -lTreePlayer) 22 | link_directories( ${ROOT_LIBRARY_DIR}) 23 | include_directories( ${ROOT_INCLUDE_DIR}) 24 | add_executable(test_event "h2fastnew_main.cpp") 25 | target_link_libraries(test_event ${ROOT_LIBRARIES} TreePlayer) 26 | 27 | 28 | 29 | function(test_root_event name url) 30 | 31 | add_test(test_root_event_${name} test_event ${url}) 32 | endfunction(test_root_event name url) 33 | 34 | 35 | ## official root website 36 | test_root_event(root_website http://root.cern.ch/files/h1big.root) 37 | ## DPM test https 38 | test_root_event(root_DPM_testbed https://lxfsra04a04.cern.ch/dpm/cern.ch/home/dteam/h1big.root) 39 | ## Dcache test http 40 | test_root_event(root_dCache_testbed http://vm-dcache-deploy6.desy.de:2881/dteam/h1big.root) 41 | 42 | 43 | endif(ROOT_TESTS) 44 | 45 | 46 | -------------------------------------------------------------------------------- /test/run-tests.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # Please note: You need to have a credentials directory at the top level 5 | # of the repository in order to run the functional tests. 6 | # 7 | # The credentials directory must contain a valid VOMS proxy certificate, AWS as well 8 | # as Azure credentials. 9 | # 10 | # Please contact the maintainer if you need advice on how to run the tests. 11 | # 12 | # You need to run this script while being at the top level of the repository, 13 | # and not in $REPO/tests 14 | 15 | CORES=$(grep -c ^processor /proc/cpuinfo) 16 | git submodule update --recursive --init 17 | 18 | credentials/obtain-proxy.sh 19 | 20 | rm -rf build 21 | mkdir build 22 | cd build 23 | cmake -DENABLE_THIRD_PARTY_COPY=TRUE .. 24 | make -j $CORES 25 | # make abi-check 26 | (ctest --no-compress-output -T Test || true) 27 | -------------------------------------------------------------------------------- /test/setup_test_env.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | MY_DIR=$(dirname $(readlink -f "$BASH_SOURCE")) 4 | 5 | ARGS="$1" 6 | 7 | export ACTION="start" 8 | 9 | if [[ "$1" == "stop" ]]; 10 | then 11 | ACTION="stop" 12 | fi 13 | 14 | 15 | 16 | OPTS_SERV_1=" -D /tmp -n -d ${ACTION} -P 8008 -i 0" 17 | OPTS_SERV_2=" -D /tmp -u test -p tester -d ${ACTION} -P 8009 -i 1" 18 | 19 | export PYTHONPATH=$MY_DIR/ 20 | 21 | 22 | $MY_DIR/pywebdav/server/server.py $OPTS_SERV_1 23 | 24 | 25 | $MY_DIR/pywebdav/server/server.py $OPTS_SERV_2 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /test/slow-unit/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | # Make gtest / gmock available for all targets that need it 3 | #------------------------------------------------------------------------------- 4 | set(BUILD_SHARED_LIBS OFF) 5 | 6 | add_executable(davix-slow-unit-tests 7 | ../drunk-server/ConnectionInitiator.cpp 8 | ../drunk-server/DrunkServer.cpp 9 | ../drunk-server/Interactors.cpp 10 | ../drunk-server/LineReader.cpp 11 | 12 | drunk-server.cpp 13 | standalone-request.cpp 14 | ) 15 | 16 | target_include_directories(davix-slow-unit-tests PRIVATE 17 | ${PROJECT_SOURCE_DIR}/src 18 | ${CMAKE_CURRENT_SOURCE_DIR} 19 | ${GTEST_INCLUDE_DIRS} 20 | ) 21 | 22 | target_link_libraries(davix-slow-unit-tests 23 | davix_tool_lib 24 | libdavix 25 | GTest::GTest 26 | GTest::Main 27 | ${CMAKE_THREAD_LIBS_INIT} 28 | ${LIBSSL_PKG_LIBRARIES} 29 | ) 30 | 31 | add_test(slow-unit-tests davix-slow-unit-tests) 32 | -------------------------------------------------------------------------------- /test/slow-unit/drunk-server.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This File is part of Davix, The IO library for HTTP based protocols 3 | * Copyright (C) CERN 2019 4 | * Author: Georgios Bitzes 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | #include 23 | #include "../drunk-server/DrunkServer.hpp" 24 | #include "../drunk-server/ConnectionInitiator.hpp" 25 | 26 | TEST(DrunkServer, NoClients) { 27 | DrunkServer ds(22222); 28 | std::unique_ptr conn = ds.accept(1); 29 | ASSERT_FALSE(conn); 30 | } 31 | 32 | TEST(DrunkServer, ClientInteraction) { 33 | DrunkServer ds(22222); 34 | 35 | ConnectionInitiator initiator("localhost", 22222); 36 | std::unique_ptr connSrv = ds.accept(1); 37 | ASSERT_TRUE(connSrv); 38 | 39 | std::unique_ptr connCl(new DrunkServer::Connection(initiator.getFd())); 40 | 41 | ASSERT_EQ(connCl->write("hey there"), 9); 42 | 43 | std::string buff; 44 | ASSERT_EQ(connSrv->read(buff, 9), 9); 45 | ASSERT_EQ(buff, "hey there"); 46 | } 47 | 48 | -------------------------------------------------------------------------------- /test/unit/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | # Make gtest / gmock available for all targets that need it 3 | #------------------------------------------------------------------------------- 4 | set(BUILD_SHARED_LIBS OFF) 5 | 6 | add_definitions( -DTEST_VALID_CERT="${TEST_CRED_PATH}" -DTEST_VALID_CERT_PASS="${TEST_CRED_PASS}") 7 | 8 | add_executable(davix-unit-tests 9 | ../drunk-server/DrunkServer.cpp 10 | 11 | cache.cpp 12 | chrono.cpp 13 | config-parser.cpp 14 | content-provider.cpp 15 | context.cpp 16 | datetime.cpp 17 | digest-extractor.cpp 18 | gcloud.cpp 19 | metalink-replica.cpp 20 | neon.cpp 21 | parser.cpp 22 | response-buffer.cpp 23 | session-factory.cpp 24 | session.cpp 25 | status.cpp 26 | testcert.cpp 27 | typeconv.cpp 28 | utils.cpp 29 | xml-parser.cpp 30 | ) 31 | 32 | target_include_directories(davix-unit-tests PRIVATE 33 | ${PROJECT_SOURCE_DIR}/src 34 | ${CMAKE_CURRENT_SOURCE_DIR} 35 | ${GTEST_INCLUDE_DIRS} 36 | ) 37 | 38 | target_link_libraries(davix-unit-tests 39 | davix_tool_lib 40 | libdavix 41 | GTest::GTest 42 | GTest::Main 43 | ${CMAKE_THREAD_LIBS_INIT} 44 | ${LIBSSL_PKG_LIBRARIES} 45 | ) 46 | 47 | install(TARGETS davix-unit-tests 48 | DESTINATION ${BIN_INSTALL_DIR}/) 49 | 50 | add_test(unit-tests davix-unit-tests) 51 | -------------------------------------------------------------------------------- /test/unit/cache.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | 8 | 9 | #undef A_LIB_NAMESPACE 10 | #define A_LIB_NAMESPACE Davix 11 | 12 | #include "libs/alibxx/alibxx.hpp" 13 | 14 | using namespace std; 15 | 16 | struct DummyStruct{ 17 | std::string dude; 18 | }; 19 | 20 | 21 | // instanciate and play with gates 22 | TEST(ALibxx, CacheTest){ 23 | 24 | 25 | 26 | Davix::Cache cache; 27 | 28 | ASSERT_TRUE(cache.find("hello").get() == NULL); 29 | 30 | std::shared_ptr dumb( new DummyStruct()); 31 | dumb->dude = "bob"; 32 | 33 | ASSERT_STREQ("bob",cache.insert("hello", dumb)->dude.c_str()); 34 | 35 | 36 | ASSERT_STREQ("bob", cache.find("hello")->dude.c_str()); 37 | ASSERT_EQ(1, cache.getSize()); 38 | ASSERT_STREQ("bob", cache.take("hello")->dude.c_str()); 39 | ASSERT_EQ(0, cache.getSize()); 40 | 41 | ASSERT_TRUE(cache.find("hello").get() == NULL); 42 | 43 | ASSERT_STREQ("bob",cache.insert("alice", dumb)->dude.c_str()); 44 | 45 | ASSERT_STREQ("bob",cache.insert("test", dumb)->dude.c_str()); 46 | ASSERT_STREQ("bob",cache.insert("john", dumb)->dude.c_str()); 47 | 48 | ASSERT_STREQ("bob", cache.find("john").get()->dude.c_str()); 49 | 50 | ASSERT_EQ(3, cache.getSize()); 51 | 52 | ASSERT_TRUE(cache.erase("john")); 53 | ASSERT_FALSE(cache.erase("john")); 54 | 55 | ASSERT_EQ(2, cache.getSize()); 56 | ASSERT_TRUE( cache.find("john").get() == NULL); 57 | 58 | cache.clear(); 59 | ASSERT_EQ(0, cache.getSize()); 60 | } 61 | -------------------------------------------------------------------------------- /test/unit/chrono.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | #undef A_LIB_NAMESPACE 10 | #define A_LIB_NAMESPACE Davix 11 | 12 | #include "libs/alibxx/alibxx.hpp" 13 | 14 | using namespace std; 15 | 16 | 17 | // instanciate and play with gates 18 | TEST(ALibxx, ChronoTest){ 19 | 20 | using namespace Davix::Chrono; 21 | 22 | TimePoint pp; 23 | ASSERT_EQ(0, pp.toTimestamp()); 24 | 25 | pp = Clock(Clock::Monolitic).now(); 26 | TimePoint copy_time = pp; 27 | ASSERT_EQ(pp, copy_time); 28 | copy_time = copy_time + Duration(5); 29 | ASSERT_NE(copy_time, pp); 30 | ASSERT_EQ(copy_time, pp + Duration(5)); 31 | ASSERT_GE(copy_time, pp); 32 | ASSERT_GE(copy_time, pp + Duration(5)); 33 | ASSERT_GT(copy_time, pp); 34 | ASSERT_LE(copy_time, pp + Duration(5)); 35 | ASSERT_LE(copy_time, pp + Duration(10)); 36 | ASSERT_LT(copy_time, pp + Duration(10)); 37 | 38 | ASSERT_EQ(copy_time + Duration(5), pp + Duration(10)); 39 | 40 | copy_time = pp; 41 | ASSERT_EQ(copy_time, pp + Duration(10) - Duration(20) + Duration(10)); 42 | 43 | TimePoint dd; 44 | ASSERT_ANY_THROW( 45 | Duration res = dd - pp; 46 | ); 47 | 48 | Duration res = pp - dd; 49 | ASSERT_EQ( dd + res, pp); 50 | } 51 | 52 | 53 | -------------------------------------------------------------------------------- /test/unit/datetime.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "libs/datetime/datetime_utils.hpp" 4 | 5 | TEST(DateTimeTest, testConvert){ 6 | time_t res, t = time(NULL); 7 | struct tm* tmp = gmtime(&t); 8 | char buff[2048]; 9 | strftime(buff, 2048, "%Y-%m-%dT%H:%M:%SZ", tmp); 10 | printf("new iso8601 time %s \n",buff); 11 | res= parse_iso8601date(buff); 12 | ASSERT_EQ(t,res); 13 | 14 | res = parse_iso8601date("unknown invalid time"); 15 | ASSERT_EQ(-1, res); 16 | } 17 | 18 | TEST(DateTimeTest, Iso8601Test1) { 19 | // was failing on FreeBSD 20 | std::string testcase("2018-10-02T17:19:00Z"); 21 | ASSERT_EQ(parse_iso8601date(testcase.c_str()), 1538500740); 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/unit/session.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include "libs/datetime/datetime_utils.hpp" 4 | #include 5 | #include 6 | 7 | TEST(SessionTest, create_session){ 8 | Davix_error * tmp_err=NULL; 9 | Davix::Context c; 10 | Davix::Context* ctxt = new Davix::Context(); 11 | ASSERT_TRUE(ctxt != NULL); 12 | ASSERT_TRUE(tmp_err==NULL); 13 | delete ctxt; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /test/unit/status.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Davix; 5 | 6 | TEST(Status, Empty) { 7 | Status st; 8 | ASSERT_TRUE(st.ok()); 9 | ASSERT_EQ(st.getErrorMessage(), ""); 10 | ASSERT_EQ(st.getCode(), StatusCode::OK); 11 | ASSERT_EQ(st.getScope(), ""); 12 | 13 | Status st2(st); 14 | ASSERT_TRUE(st2.ok()); 15 | ASSERT_EQ(st2.getErrorMessage(), ""); 16 | ASSERT_EQ(st2.getCode(), StatusCode::OK); 17 | ASSERT_EQ(st2.getScope(), ""); 18 | 19 | Status st3 = st; 20 | ASSERT_TRUE(st3.ok()); 21 | ASSERT_EQ(st3.getErrorMessage(), ""); 22 | ASSERT_EQ(st3.getCode(), StatusCode::OK); 23 | ASSERT_EQ(st3.getScope(), ""); 24 | } 25 | 26 | TEST(Status, Filled) { 27 | Status st("Davix::HttpRequest", StatusCode::IsNotADirectory, "An error message"); 28 | ASSERT_FALSE(st.ok()); 29 | ASSERT_EQ(st.getErrorMessage(), "An error message"); 30 | ASSERT_EQ(st.getCode(), StatusCode::IsNotADirectory); 31 | ASSERT_EQ(st.getScope(), "Davix::HttpRequest"); 32 | 33 | Status st2(st); 34 | ASSERT_FALSE(st2.ok()); 35 | ASSERT_EQ(st2.getErrorMessage(), "An error message"); 36 | ASSERT_EQ(st2.getCode(), StatusCode::IsNotADirectory); 37 | ASSERT_EQ(st2.getScope(), "Davix::HttpRequest"); 38 | 39 | Status st3 = st; 40 | ASSERT_FALSE(st3.ok()); 41 | ASSERT_EQ(st3.getErrorMessage(), "An error message"); 42 | ASSERT_EQ(st3.getCode(), StatusCode::IsNotADirectory); 43 | ASSERT_EQ(st3.getScope(), "Davix::HttpRequest"); 44 | } 45 | -------------------------------------------------------------------------------- /version.cmake.in: -------------------------------------------------------------------------------- 1 | set(VERSION_MAJOR @VERSION_MAJOR@) 2 | set(VERSION_MINOR @VERSION_MINOR@) 3 | set(VERSION_PATCH @VERSION_PATCH@) 4 | set(VERSION_MINIPATCH @VERSION_MINIPATCH@) 5 | set(VERSION_FULL @VERSION_FULL@) 6 | --------------------------------------------------------------------------------