pax_global_header00006660000000000000000000000064141052651100014505gustar00rootroot0000000000000052 comment=c19ab708455c12baca6c06ab2b31ac3d3ded8370 webdav-client-python-3-3.14.6/000077500000000000000000000000001410526511000160035ustar00rootroot00000000000000webdav-client-python-3-3.14.6/.gitignore000066400000000000000000000001401410526511000177660ustar00rootroot00000000000000*.pyc /**/*.pyc /dist /*.egg-info /.eggs/ .project .pydevproject /.settings/ venv/ .idea/ build webdav-client-python-3-3.14.6/.travis.yml000066400000000000000000000013221410526511000201120ustar00rootroot00000000000000language: python dist: xenial addons: sonarcloud: organization: "ezhov-evgeny" token: f0f714f3bea6bd103e3eb82724ef3bb0d3b54d1d services: - docker python: - "3.5" - "3.6" - "3.7" - "3.8" - "3.9" before_install: - docker pull bytemark/webdav - echo ${TRAVIS_BUILD_DIR} - docker run -d --name webdav -e AUTH_TYPE=Basic -e USERNAME=alice -e PASSWORD=secret1234 -v ${TRAVIS_BUILD_DIR}/conf:/usr/local/apache2/conf -p 8585:80 bytemark/webdav - docker ps -a install: - python setup.py develop - pip install coverage script: - docker logs --until=2s webdav - coverage run setup.py test - coverage xml - | if [[ $TRAVIS_PYTHON_VERSION == "3.8" ]]; then sonar-scanner fi webdav-client-python-3-3.14.6/LICENSE.md000066400000000000000000000020471410526511000174120ustar00rootroot00000000000000COPYRIGHT AND PERMISSION NOTICE Copyright (c) 2016, The WDC Project, and many contributors, see the THANKS file. All rights reserved. Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. webdav-client-python-3-3.14.6/README.md000066400000000000000000000213261410526511000172660ustar00rootroot00000000000000Python WebDAV Client 3 ========= [![Build Status](https://travis-ci.com/ezhov-evgeny/webdav-client-python-3.svg?branch=develop)](https://travis-ci.com/ezhov-evgeny/webdav-client-python-3) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ezhov-evgeny_webdav-client-python-3&metric=alert_status)](https://sonarcloud.io/dashboard?id=ezhov-evgeny_webdav-client-python-3) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=ezhov-evgeny_webdav-client-python-3&metric=coverage)](https://sonarcloud.io/dashboard?id=ezhov-evgeny_webdav-client-python-3) [![PyPI](https://img.shields.io/pypi/v/webdavclient3)](https://pypi.org/project/webdavclient3/) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/webdavclient3) Package webdavclient3 based on https://github.com/designerror/webdav-client-python but uses `requests` instead of `PyCURL`. It provides easy way to work with WebDAV-servers. Installation ------------ ```bash $ pip install webdavclient3 ``` Sample Usage ------------ ```python from webdav3.client import Client options = { 'webdav_hostname': "https://webdav.server.ru", 'webdav_login': "login", 'webdav_password': "password" } client = Client(options) client.verify = False # To not check SSL certificates (Default = True) client.session.proxies(...) # To set proxy directly into the session (Optional) client.session.auth(...) # To set proxy auth directly into the session (Optional) client.execute_request("mkdir", 'directory_name') ``` Webdav API ========== Webdav API is a set of webdav actions of work with cloud storage. This set includes the following actions: `check`, `free`, `info`, `list`, `mkdir`, `clean`, `copy`, `move`, `download`, `upload`, `publish` and `unpublish`. **Configuring the client** Required key is host name or IP address of the WevDAV-server with param name `webdav_hostname`. For authentication in WebDAV server use `webdav_login`, `webdav_password`. For an anonymous login do not specify auth properties. ```python from webdav3.client import Client options = { 'webdav_hostname': "https://webdav.server.ru", 'webdav_login': "login", 'webdav_password': "password" } client = Client(options) ``` If your server does not support `HEAD` method or there are other reasons to override default WebDAV methods for actions use a dictionary option `webdav_override_methods`. The key should be in the following list: `check`, `free`, `info`, `list`, `mkdir`, `clean`, `copy`, `move`, `download`, `upload`, `publish` and `unpublish`. The value should a string name of WebDAV method, for example `GET`. ```python from webdav3.client import Client options = { 'webdav_hostname': "https://webdav.server.ru", 'webdav_login': "login", 'webdav_password': "password", 'webdav_override_methods': { 'check': 'GET' } } client = Client(options) ``` For configuring a requests timeout you can use an option `webdav_timeout` with int value in seconds, by default the timeout is set to 30 seconds. ```python from webdav3.client import Client options = { 'webdav_hostname': "https://webdav.server.ru", 'webdav_login': "login", 'webdav_password': "password", 'webdav_timeout': 30 } client = Client(options) ``` When a proxy server you need to specify settings to connect through it. ```python from webdav3.client import Client options = { 'webdav_hostname': "https://webdav.server.ru", 'webdav_login': "w_login", 'webdav_password': "w_password", 'proxy_hostname': "http://127.0.0.1:8080", 'proxy_login': "p_login", 'proxy_password': "p_password" } client = Client(options) ``` If you want to use the certificate path to certificate and private key is defined as follows: ```python from webdav3.client import Client options = { 'webdav_hostname': "https://webdav.server.ru", 'webdav_login': "w_login", 'webdav_password': "w_password", 'cert_path': "/etc/ssl/certs/certificate.crt", 'key_path': "/etc/ssl/private/certificate.key" } client = Client(options) ``` Or you want to limit the speed or turn on verbose mode: ```python options = { ... 'recv_speed' : 3000000, 'send_speed' : 3000000, 'verbose' : True } client = Client(options) ``` recv_speed: rate limit data download speed in Bytes per second. Defaults to unlimited speed. send_speed: rate limit data upload speed in Bytes per second. Defaults to unlimited speed. verbose: set verbose mode on/off. By default verbose mode is off. Also if your server does not support `check` it is possible to disable it: ```python options = { ... 'disable_check': True } client = Client(options) ``` By default, checking of remote resources is enabled. For configuring chunk size of content downloading use `chunk_size` param, by default it is `65536` ```python options = { ... 'chunk_size': 65536 } client = Client(options) ``` **Synchronous methods** ```python # Checking existence of the resource client.check("dir1/file1") client.check("dir1") ``` ```python # Get information about the resource client.info("dir1/file1") client.info("dir1/") ``` ```python # Check free space free_size = client.free() ``` ```python # Get a list of resources files1 = client.list() files2 = client.list("dir1") files3 = client.list("dir1", get_info=True) # returns a list of dictionaries with files details ``` ```python # Create directory client.mkdir("dir1/dir2") ``` ```python # Delete resource client.clean("dir1/dir2") ``` ```python # Copy resource client.copy(remote_path_from="dir1/file1", remote_path_to="dir2/file1") client.copy(remote_path_from="dir2", remote_path_to="dir3") ``` ```python # Move resource client.move(remote_path_from="dir1/file1", remote_path_to="dir2/file1") client.move(remote_path_from="dir2", remote_path_to="dir3") ``` ```python # Download a resource client.download_sync(remote_path="dir1/file1", local_path="~/Downloads/file1") client.download_sync(remote_path="dir1/dir2/", local_path="~/Downloads/dir2/") ``` ```python # Upload resource client.upload_sync(remote_path="dir1/file1", local_path="~/Documents/file1") client.upload_sync(remote_path="dir1/dir2/", local_path="~/Documents/dir2/") ``` ```python # Publish the resource link = client.publish("dir1/file1") link = client.publish("dir2") ``` ```python # Unpublish resource client.unpublish("dir1/file1") client.unpublish("dir2") ``` ```python # Exception handling from webdav3.client import WebDavException try: ... except WebDavException as exception: ... ``` ```python # Get the missing files client.pull(remote_directory='dir1', local_directory='~/Documents/dir1') ``` ```python # Send missing files client.push(remote_directory='dir1', local_directory='~/Documents/dir1') ``` **Asynchronous methods** ```python # Load resource kwargs = { 'remote_path': "dir1/file1", 'local_path': "~/Downloads/file1", 'callback': callback } client.download_async(**kwargs) kwargs = { 'remote_path': "dir1/dir2/", 'local_path': "~/Downloads/dir2/", 'callback': callback } client.download_async(**kwargs) ``` ```python # Unload resource kwargs = { 'remote_path': "dir1/file1", 'local_path': "~/Downloads/file1", 'callback': callback } client.upload_async(**kwargs) kwargs = { 'remote_path': "dir1/dir2/", 'local_path': "~/Downloads/dir2/", 'callback': callback } client.upload_async(**kwargs) ``` Resource API ============ Resource API using the concept of OOP that enables cloud-level resources. ```python # Get a resource res1 = client.resource("dir1/file1") ``` ```python # Work with the resource res1.rename("file2") res1.move("dir1/file2") res1.copy("dir2/file1") info = res1.info() res1.read_from(buffer) res1.read(local_path="~/Documents/file1") res1.read_async(local_path="~/Documents/file1", callback) res1.write_to(buffer) res1.write(local_path="~/Downloads/file1") res1.write_async(local_path="~/Downloads/file1", callback) ``` # For Contributors ### Prepare development environment 1. Install docker on your development machine 1. Start WebDAV server for testing by following commands from the project's root folder or change path to `conf` dir in second command to correct: ```shell script docker pull bytemark/webdav docker run -d --name webdav -e AUTH_TYPE=Basic -e USERNAME=alice -e PASSWORD=secret1234 -v conf:/usr/local/apache2/conf -p 8585:80 bytemark/webdav ``` ### Code convention Please check your code according PEP8 Style guides. ### Run tests 1. Check that webdav container is started on your local machine 1. Execute following command in the project's root folder: ```shell script python -m unittest discover -s tests ``` ### Prepare a Pull Request Please use this check list before creating PR: 1. You code should be formatted according PEP8 1. All tests should successfully pass 1. Your changes shouldn't change previous default behaviour, exclude defects 1. All changes are covered by tests webdav-client-python-3-3.14.6/RELEASE_NOTES.md000066400000000000000000000120221410526511000203520ustar00rootroot00000000000000Release Notes ------------- **Version 3.14.6** * Configuring of content downloading chunk size by https://github.com/nuwang * Ability to use an anonymous login by https://github.com/f100024 * is_dir performance optimization by https://github.com/liuliqiu * Add support for progress callback in up/download by https://github.com/jorgeajimenezl * Add content type parsing by https://github.com/foucdeg * Excluding tests directory from a setup package by https://github.com/a-guzhin * Doc improvements by https://github.com/mephinet * Enable testing of Python 3.9 support **Version 3.14.5** * An ability to configure a requests timeout * An ability to get a `list` method result with detailed information by https://github.com/huangganggui **Version 3.14.4** * Fixed the issue with gzipped content on `download_from` **Version 3.14.3** * Added the etag property in the get info method by https://github.com/huangganggui **Version 3.14.2** * Use a content type for determining is the resource a directory or not in the `list` method * Fixed the issue with duplicated path segments in `download_sync` and `pull` methods by https://github.com/jotbe * An ability to use certificates for authenticating by https://github.com/ajordanBBN * Removing of tailing slashes in `web_hostname` * An ability to use custom `Auth` methods in the `Session` by https://github.com/matrixx567 **Version 3.14.1** * Fixed issue during coping and moving files with cyrillic names * Support OAuth2 bearer tokens by https://github.com/danielloader **Version 3.14** * Override methods for customizing communication with WebDAV servers * Support multiple clients simultaneously * Sync modified files during pull and push by https://github.com/mont5piques **Version 0.14** * Fixed an issue with checking resources on Yandex WebDAV server **Version 0.13 – 27.11.2019** * Main version of Python is updated up to 3.7 * Switch to use python sessions rather than requests by https://github.com/delrey1 * Stripping suburl from paths in extract_response_for_path by https://github.com/Skeen * Added Docker Web DAV for CI * Changed HEAD to GET method for 'check' request due of not all servers support HEAD by request of https://github.com/danieleTrimarchi * Removed a costy is_dir-check on obvious directories to speed up a pull by https://github.com/jolly-jump * Added an option to disable check in case WebDAV server is not support it by request of https://github.com/dzhuang **Version 0.12 - 21.06.2019** * Added depth argument in copy method in client.py by https://github.com/JesperHakansson * Added verify attribute to execute_request method by https://github.com/JesperHakansson **Version 0.11 – 30.03.2019** * Fixed MemoryError if a large file is downloaded with a 32 bit python by https://github.com/bboehmke * Fixed argcomplete is required to run wdc but was not included in the requirements by https://github.com/evanhorn * Fixed wdc tries to import webdav instead of webdav3 by https://github.com/evanhorn **Version 0.10 – 31.01.2019** * AssertEquals deprecation warnings by https://github.com/StefanZi * Problems with byte/UTF strings and xml library by https://github.com/StefanZi * Add some Eclipse specific files to gitignore by https://github.com/StefanZi * Remove filesize limit by https://github.com/StefanZi **Version 0.9 – 10.05.2018** * Client.mkdir now accepts 201 HTTP-code by https://github.com/a1ezzz * Tests are updated * Added Travis-CI **Version 0.8 – 07.05.2018** * Fixed issue in extract_response_for_path when a link in "href" attribute is an absolute link by https://github.com/a1ezzz **Version 0.7 – 16.03.2018** * Fixed issue with wrong argument for resource creation by https://github.com/janLo **Version 0.6 – 21.02.2018** * Fixed issue with in extracting response for path by https://github.com/mightydok **Version 0.5 – 03.12.2017** * Added method for setting of WebDAV resource property values in batch **Version 0.4 - 27.11.2017** * Refactoring of WebDAV client and making it works in following methods: - Checking is remote resource directory - Fixed problem when connection lost during request executing and nothing was happened, now it raises an exception **Version 0.3 - 18.10.2017** * Refactoring of WebDAV client and making it works in following methods: - Getting of WebDAV resource property value - Setting of WebDAV resource property value - Coping of resource on WebDAV server - Moving of resource on WebDAV server - Deleting of resource on WebDAV server - Getting of information about WebDAV resource **Version 0.2 - 11.09.2017** * Refactoring of WebDAV client and making it works in following methods: - Constructor with connecting to WebDAV - Getting a list of resources on WebDAV - Getting an information about free space on WebDAV - Checking of existence of resource on WebDAV - Making a directory on WebDAV - Downloading of files and directories from WebDAV - Asynchronously downloading of files and directories from WebDAV - Uploading of files and directories to WebDAV - Asynchronously uploading of files and directories to WebDAVwebdav-client-python-3-3.14.6/conf/000077500000000000000000000000001410526511000167305ustar00rootroot00000000000000webdav-client-python-3-3.14.6/conf/conf-available/000077500000000000000000000000001410526511000215735ustar00rootroot00000000000000webdav-client-python-3-3.14.6/conf/conf-available/dav.conf000066400000000000000000000015241410526511000232160ustar00rootroot00000000000000DavLockDB "/var/lib/dav/DavLock" Alias / "/var/lib/dav/data/" Dav On Options Indexes FollowSymLinks AuthType Basic AuthName "WebDAV" AuthUserFile "/user.passwd" Require valid-user # These disable redirects on non-GET requests for directories that # don't include the trailing slash (for misbehaving clients). BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully BrowserMatch "MS FrontPage" redirect-carefully BrowserMatch "^WebDrive" redirect-carefully BrowserMatch "^WebDAVFS/1.[01234]" redirect-carefully BrowserMatch "^gnome-vfs/1.0" redirect-carefully BrowserMatch "^XML Spy" redirect-carefully BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully BrowserMatch " Konqueror/4" redirect-carefully BrowserMatch "^gvfs" redirect-carefully webdav-client-python-3-3.14.6/conf/conf-available/deflate.conf000066400000000000000000000010331410526511000240430ustar00rootroot00000000000000 # compress text, html, javascript, css, xml: AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE image/x-icon webdav-client-python-3-3.14.6/conf/conf-enabled/000077500000000000000000000000001410526511000212455ustar00rootroot00000000000000webdav-client-python-3-3.14.6/conf/conf-enabled/dav.conf000066400000000000000000000015241410526511000226700ustar00rootroot00000000000000DavLockDB "/var/lib/dav/DavLock" Alias / "/var/lib/dav/data/" Dav On Options Indexes FollowSymLinks AuthType Basic AuthName "WebDAV" AuthUserFile "/user.passwd" Require valid-user # These disable redirects on non-GET requests for directories that # don't include the trailing slash (for misbehaving clients). BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully BrowserMatch "MS FrontPage" redirect-carefully BrowserMatch "^WebDrive" redirect-carefully BrowserMatch "^WebDAVFS/1.[01234]" redirect-carefully BrowserMatch "^gnome-vfs/1.0" redirect-carefully BrowserMatch "^XML Spy" redirect-carefully BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully BrowserMatch " Konqueror/4" redirect-carefully BrowserMatch "^gvfs" redirect-carefully webdav-client-python-3-3.14.6/conf/conf-enabled/deflate.conf000066400000000000000000000006361410526511000235250ustar00rootroot00000000000000AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascriptwebdav-client-python-3-3.14.6/conf/extra/000077500000000000000000000000001410526511000200535ustar00rootroot00000000000000webdav-client-python-3-3.14.6/conf/extra/httpd-autoindex.conf000066400000000000000000000054721410526511000240530ustar00rootroot00000000000000# # Directives controlling the display of server-generated directory listings. # # Required modules: mod_authz_core, mod_authz_host, # mod_autoindex, mod_alias # # To see the listing of a directory, the Options directive for the # directory must include "Indexes", and the directory must not contain # a file matching those listed in the DirectoryIndex directive. # # # IndexOptions: Controls the appearance of server-generated directory # listings. # IndexOptions FancyIndexing HTMLTable VersionSort # We include the /icons/ alias for FancyIndexed directory listings. If # you do not use FancyIndexing, you may comment this out. # Alias /icons/ "/usr/local/apache2/icons/" Options Indexes MultiViews AllowOverride None Require all granted # # AddIcon* directives tell the server which icon to show for different # files or filename extensions. These are only displayed for # FancyIndexed directories. # AddIconByEncoding (CMP, /icons/compressed.gif) x-compress x-gzip AddIconByType (TXT, /icons/text.gif) text/* AddIconByType (IMG, /icons/image2.gif) image/* AddIconByType (SND, /icons/sound2.gif) audio/* AddIconByType (VID, /icons/movie.gif) video/* AddIcon /icons/binary.gif .bin .exe AddIcon /icons/binhex.gif .hqx AddIcon /icons/tar.gif .tar AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip AddIcon /icons/a.gif .ps .ai .eps AddIcon /icons/layout.gif .html .shtml .htm .pdf AddIcon /icons/text.gif .txt AddIcon /icons/c.gif .c AddIcon /icons/p.gif .pl .py AddIcon /icons/f.gif .for AddIcon /icons/dvi.gif .dvi AddIcon /icons/uuencoded.gif .uu AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl AddIcon /icons/tex.gif .tex AddIcon /icons/bomb.gif core AddIcon /icons/back.gif .. AddIcon /icons/hand.right.gif README AddIcon /icons/folder.gif ^^DIRECTORY^^ AddIcon /icons/blank.gif ^^BLANKICON^^ # # DefaultIcon is which icon to show for files which do not have an icon # explicitly set. # DefaultIcon /icons/unknown.gif # # AddDescription allows you to place a short description after a file in # server-generated indexes. These are only displayed for FancyIndexed # directories. # Format: AddDescription "description" filename # #AddDescription "GZIP compressed document" .gz #AddDescription "tar archive" .tar #AddDescription "GZIP compressed tar archive" .tgz # # ReadmeName is the name of the README file the server will look for by # default, and append to directory listings. # # HeaderName is the name of a file which should be prepended to # directory indexes. ReadmeName README.html HeaderName HEADER.html # # IndexIgnore is a set of filenames which directory indexing should ignore # and not include in the listing. Shell-style wildcarding is permitted. # IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t webdav-client-python-3-3.14.6/conf/extra/httpd-dav.conf000066400000000000000000000033351410526511000226210ustar00rootroot00000000000000# # Distributed authoring and versioning (WebDAV) # # Required modules: mod_alias, mod_auth_digest, mod_authn_core, mod_authn_file, # mod_authz_core, mod_authz_user, mod_dav, mod_dav_fs, # mod_setenvif # The following example gives DAV write access to a directory called # "uploads" under the ServerRoot directory. # # The User/Group specified in httpd.conf needs to have write permissions # on the directory where the DavLockDB is placed and on any directory where # "Dav On" is specified. DavLockDB "/usr/local/apache2/var/DavLock" Alias /uploads "/usr/local/apache2/uploads" Dav On AuthType Digest AuthName DAV-upload # You can use the htdigest program to create the password database: # htdigest -c "/usr/local/apache2/user.passwd" DAV-upload admin AuthUserFile "/usr/local/apache2/user.passwd" AuthDigestProvider file # Allow universal read-access, but writes are restricted # to the admin user. Require method GET POST OPTIONS Require user admin # # The following directives disable redirects on non-GET requests for # a directory that does not include the trailing slash. This fixes a # problem with several clients that do not appropriately handle # redirects for folders with DAV methods. # BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully BrowserMatch "MS FrontPage" redirect-carefully BrowserMatch "^WebDrive" redirect-carefully BrowserMatch "^WebDAVFS/1.[01234]" redirect-carefully BrowserMatch "^gnome-vfs/1.0" redirect-carefully BrowserMatch "^XML Spy" redirect-carefully BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully BrowserMatch " Konqueror/4" redirect-carefully webdav-client-python-3-3.14.6/conf/extra/httpd-default.conf000066400000000000000000000056041410526511000234740ustar00rootroot00000000000000# # This configuration file reflects default settings for Apache HTTP Server. # # You may change these, but chances are that you may not need to. # # # Timeout: The number of seconds before receives and sends time out. # Timeout 60 # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # KeepAlive On # # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100 # # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 5 # # UseCanonicalName: Determines how Apache constructs self-referencing # URLs and the SERVER_NAME and SERVER_PORT variables. # When set "Off", Apache will use the Hostname and Port supplied # by the client. When set "On", Apache will use the value of the # ServerName directive. # UseCanonicalName Off # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess # # ServerTokens # This directive configures what you return as the Server HTTP response # Header. The default is 'Full' which sends information about the OS-Type # and compiled in modules. # Set to one of: Full | OS | Minor | Minimal | Major | Prod # where Full conveys the most information, and Prod the least. # ServerTokens Full # # Optionally add a line containing the server version and virtual host # name to server-generated pages (internal error documents, FTP directory # listings, mod_status and mod_info output etc., but not CGI generated # documents or custom error documents). # Set to "EMail" to also include a mailto: link to the ServerAdmin. # Set to one of: On | Off | EMail # ServerSignature Off # # HostnameLookups: Log the names of clients or just their IP addresses # e.g., www.apache.org (on) or 204.62.129.132 (off). # The default is off because it'd be overall better for the net if people # had to knowingly turn this feature on, since enabling it means that # each client request will result in AT LEAST one lookup request to the # nameserver. # HostnameLookups Off # # Set a timeout for how long the client may take to send the request header # and body. # The default for the headers is header=20-40,MinRate=500, which means wait # for the first byte of headers for 20 seconds. If some data arrives, # increase the timeout corresponding to a data rate of 500 bytes/s, but not # above 40 seconds. # The default for the request body is body=20,MinRate=500, which is the same # but has no upper limit for the timeout. # To disable, set to header=0 body=0 # RequestReadTimeout header = 20-40, MinRate = 500 body=20, MinRate = 500 webdav-client-python-3-3.14.6/conf/extra/httpd-info.conf000066400000000000000000000021071410526511000227760ustar00rootroot00000000000000# # Get information about the requests being processed by the server # and the configuration of the server. # # Required modules: mod_authz_core, mod_authz_host, # mod_info (for the server-info handler), # mod_status (for the server-status handler) # # Allow server status reports generated by mod_status, # with the URL of http://servername/server-status # Change the ".example.com" to match your domain to enable. SetHandler server-status Require host .example.com Require ip 127 # # ExtendedStatus controls whether Apache will generate "full" status # information (ExtendedStatus On) or just basic information (ExtendedStatus # Off) when the "server-status" handler is called. The default is Off. # #ExtendedStatus On # # Allow remote server configuration reports, with the URL of # http://servername/server-info (requires that mod_info.c be loaded). # Change the ".example.com" to match your domain to enable. # SetHandler server-info Require host .example.com Require ip 127 webdav-client-python-3-3.14.6/conf/extra/httpd-languages.conf000066400000000000000000000117261410526511000240200ustar00rootroot00000000000000# # Settings for hosting different languages. # # Required modules: mod_mime, mod_negotiation # DefaultLanguage and AddLanguage allows you to specify the language of # a document. You can then use content negotiation to give a browser a # file in a language the user can understand. # # Specify a default language. This means that all data # going out without a specific language tag (see below) will # be marked with this one. You probably do NOT want to set # this unless you are sure it is correct for all cases. # # * It is generally better to not mark a page as # * being a certain language than marking it with the wrong # * language! # # DefaultLanguage nl # # Note 1: The suffix does not have to be the same as the language # keyword --- those with documents in Polish (whose net-standard # language code is pl) may wish to use "AddLanguage pl .po" to # avoid the ambiguity with the common suffix for perl scripts. # # Note 2: The example entries below illustrate that in some cases # the two character 'Language' abbreviation is not identical to # the two character 'Country' code for its country, # E.g. 'Danmark/dk' versus 'Danish/da'. # # Note 3: In the case of 'ltz' we violate the RFC by using a three char # specifier. There is 'work in progress' to fix this and get # the reference data for rfc1766 cleaned up. # # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl) # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de) # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja) # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn) # Norwegian (no) - Polish (pl) - Portugese (pt) # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv) # Turkish (tr) - Simplified Chinese (zh-CN) - Spanish (es) # Traditional Chinese (zh-TW) # AddLanguage ca .ca AddLanguage cs .cz .cs AddLanguage da .dk AddLanguage de .de AddLanguage el .el AddLanguage en .en AddLanguage eo .eo AddLanguage es .es AddLanguage et .et AddLanguage fr .fr AddLanguage he .he AddLanguage hr .hr AddLanguage it .it AddLanguage ja .ja AddLanguage ko .ko AddLanguage ltz .ltz AddLanguage nl .nl AddLanguage nn .nn AddLanguage no .no AddLanguage pl .po AddLanguage pt .pt AddLanguage pt-BR .pt-br AddLanguage ru .ru AddLanguage sv .sv AddLanguage tr .tr AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw # LanguagePriority allows you to give precedence to some languages # in case of a tie during content negotiation. # # Just list the languages in decreasing order of preference. We have # more or less alphabetized them here. You probably want to change this. # LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW # # ForceLanguagePriority allows you to serve a result page rather than # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback) # [in case no accepted languages matched the available variants] # ForceLanguagePriority Prefer Fallback # # Commonly used filename extensions to character sets. You probably # want to avoid clashes with the language extensions, unless you # are good at carefully testing your setup after each change. # See http://www.iana.org/assignments/character-sets for the # official list of charset names and their respective RFCs. # AddCharset us-ascii.ascii .us-ascii AddCharset ISO-8859-1 .iso8859-1 .latin1 AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen AddCharset ISO-8859-3 .iso8859-3 .latin3 AddCharset ISO-8859-4 .iso8859-4 .latin4 AddCharset ISO-8859-5 .iso8859-5 .cyr .iso-ru AddCharset ISO-8859-6 .iso8859-6 .arb .arabic AddCharset ISO-8859-7 .iso8859-7 .grk .greek AddCharset ISO-8859-8 .iso8859-8 .heb .hebrew AddCharset ISO-8859-9 .iso8859-9 .latin5 .trk AddCharset ISO-8859-10 .iso8859-10 .latin6 AddCharset ISO-8859-13 .iso8859-13 AddCharset ISO-8859-14 .iso8859-14 .latin8 AddCharset ISO-8859-15 .iso8859-15 .latin9 AddCharset ISO-8859-16 .iso8859-16 .latin10 AddCharset ISO-2022-JP .iso2022-jp .jis AddCharset ISO-2022-KR .iso2022-kr .kis AddCharset ISO-2022-CN .iso2022-cn .cis AddCharset Big5.Big5 .big5 .b5 AddCharset cn-Big5 .cn-big5 # For russian, more than one charset is used (depends on client, mostly): AddCharset WINDOWS-1251 .cp-1251 .win-1251 AddCharset CP866 .cp866 AddCharset KOI8 .koi8 AddCharset KOI8-E .koi8-e AddCharset KOI8-r .koi8-r .koi8-ru AddCharset KOI8-U .koi8-u AddCharset KOI8-ru .koi8-uk .ua AddCharset ISO-10646-UCS-2 .ucs2 AddCharset ISO-10646-UCS-4 .ucs4 AddCharset UTF-7 .utf7 AddCharset UTF-8 .utf8 AddCharset UTF-16 .utf16 AddCharset UTF-16BE .utf16be AddCharset UTF-16LE .utf16le AddCharset UTF-32 .utf32 AddCharset UTF-32BE .utf32be AddCharset UTF-32LE .utf32le AddCharset euc-cn .euc-cn AddCharset euc-gb .euc-gb AddCharset euc-jp .euc-jp AddCharset euc-kr .euc-kr #Not sure how euc-tw got in - IANA doesn't list it??? AddCharset EUC-TW .euc-tw AddCharset gb2312 .gb2312 .gb AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2 AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4 AddCharset shift_jis .shift_jis .sjis webdav-client-python-3-3.14.6/conf/extra/httpd-manual.conf000066400000000000000000000024471410526511000233270ustar00rootroot00000000000000# # Provide access to the documentation on your server as # http://yourserver.example.com/manual/ # The documentation is always available at # http://httpd.apache.org/docs/2.4/ # # Required modules: mod_alias, mod_authz_core, mod_authz_host, # mod_setenvif, mod_negotiation # AliasMatch ^/manual(?: /(?:da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn))?(/.*)?$ "/usr/local/apache2/manual$1" Options Indexes AllowOverride None Require all granted SetHandler type-map # .tr is text/troff in mime.types! RemoveType tr # Traditionally, used .dk filename extension for da language AddLanguage da .da SetEnvIf Request_URI ^/manual/(da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn)/ prefer-language = $1 RedirectMatch 301 ^/manual(?: /(da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn)){2,}(/.*)?$ /manual/$1$2 # Reflect the greatest effort in translation (most content available), # inferring greater attention to detail (potentially false assumption, # counting translations presently in-sync would be more helpful.) # Use caution counting; safest pattern is '*.xml.XX'. Recent .xml source # document count: 266 214 110 94 82 25 22 18 4 1 1 LanguagePriority en fr ko ja tr es de zh-cn pt-br da ru ForceLanguagePriority Prefer Fallback webdav-client-python-3-3.14.6/conf/extra/httpd-mpm.conf000066400000000000000000000103331410526511000226340ustar00rootroot00000000000000# # Server-Pool Management (MPM specific) # # # PidFile: The file in which the server should record its process # identification number when it starts. # # Note that this is the default PidFile for most MPMs. # PidFile "logs/httpd.pid" # # Only one of the below sections will be relevant on your # installed httpd. Use "apachectl -l" to find out the # active mpm. # # prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # MaxRequestWorkers: maximum number of server processes allowed to start # MaxConnectionsPerChild: maximum number of connections a server process serves # before terminating StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxRequestWorkers 250 MaxConnectionsPerChild 0 # worker MPM # StartServers: initial number of server processes to start # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process # MaxRequestWorkers: maximum number of worker threads # MaxConnectionsPerChild: maximum number of connections a server process serves # before terminating StartServers 3 MinSpareThreads 75 MaxSpareThreads 250 ThreadsPerChild 25 MaxRequestWorkers 400 MaxConnectionsPerChild 0 # event MPM # StartServers: initial number of server processes to start # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process # MaxRequestWorkers: maximum number of worker threads # MaxConnectionsPerChild: maximum number of connections a server process serves # before terminating StartServers 3 MinSpareThreads 75 MaxSpareThreads 250 ThreadsPerChild 25 MaxRequestWorkers 400 MaxConnectionsPerChild 0 # NetWare MPM # ThreadStackSize: Stack size allocated for each worker thread # StartThreads: Number of worker threads launched at server startup # MinSpareThreads: Minimum number of idle threads, to handle request spikes # MaxSpareThreads: Maximum number of idle threads # MaxThreads: Maximum number of worker threads alive at the same time # MaxConnectionsPerChild: Maximum number of connections a thread serves. It # is recommended that the default value of 0 be set # for this directive on NetWare. This will allow the # thread to continue to service requests indefinitely. ThreadStackSize 65536 StartThreads 250 MinSpareThreads 25 MaxSpareThreads 250 MaxThreads 1000 MaxConnectionsPerChild 0 # OS/2 MPM # StartServers: Number of server processes to maintain # MinSpareThreads: Minimum number of idle threads per process, # to handle request spikes # MaxSpareThreads: Maximum number of idle threads per process # MaxConnectionsPerChild: Maximum number of connections per server process StartServers 2 MinSpareThreads 5 MaxSpareThreads 10 MaxConnectionsPerChild 0 # WinNT MPM # ThreadsPerChild: constant number of worker threads in the server process # MaxConnectionsPerChild: maximum number of connections a server process serves ThreadsPerChild 150 MaxConnectionsPerChild 0 # The maximum number of free Kbytes that every allocator is allowed # to hold without calling free(). In threaded MPMs, every thread has its own # allocator. When not set, or when set to zero, the threshold will be set to # unlimited. MaxMemFree 2048 MaxMemFree 100 webdav-client-python-3-3.14.6/conf/extra/httpd-multilang-errordoc.conf000066400000000000000000000042221410526511000256540ustar00rootroot00000000000000# # The configuration below implements multi-language error documents through # content-negotiation. # # Required modules: mod_alias, mod_authz_core, mod_authz_host, # mod_include, mod_negotiation # # We use Alias to redirect any /error/HTTP_.html.var response to # our collection of by-error message multi-language collections. We use # includes to substitute the appropriate text. # # You can modify the messages' appearance without changing any of the # default HTTP_.html.var files by adding the line: # # Alias /error/include/ "/your/include/path/" # # which allows you to create your own set of files by starting with the # /usr/local/apache2/error/include/ files and copying them to /your/include/path/, # even on a per-VirtualHost basis. The default include files will display # your Apache version number and your ServerAdmin email address regardless # of the setting of ServerSignature. Alias /error/ "/usr/local/apache2/error/" AllowOverride None Options IncludesNoExec AddOutputFilter Includes html AddHandler type-map var Require all granted LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr ForceLanguagePriority Prefer Fallback ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var ErrorDocument 410 /error/HTTP_GONE.html.var ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var webdav-client-python-3-3.14.6/conf/extra/httpd-ssl.conf000066400000000000000000000317271410526511000226560ustar00rootroot00000000000000# # This is the Apache server configuration file providing SSL support. # It contains the configuration directives to instruct the server how to # serve pages over an https connection. For detailed information about these # directives see # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # Required modules: mod_log_config, mod_setenvif, mod_ssl, # socache_shmcb_module (for default value of SSLSessionCache) # # Pseudo Random Number Generator (PRNG): # Configure one or more sources to seed the PRNG of the SSL library. # The seed data should be of good random quality. # WARNING! On some platforms /dev/random blocks if not enough entropy # is available. This means you then cannot use the /dev/random device # because it would lead to very long connection times (as long as # it requires to make more entropy available). But usually those # platforms additionally provide a /dev/urandom device which doesn't # block. So, if available, use this one instead. Read the mod_ssl User # Manual for more details. # #SSLRandomSeed startup file:/dev/random 512 #SSLRandomSeed startup file:/dev/urandom 512 #SSLRandomSeed connect file:/dev/random 512 #SSLRandomSeed connect file:/dev/urandom 512 # # When we also provide SSL we have to listen to the # standard HTTP port (see above) and to the HTTPS port # Listen 443 ## ## SSL Global Context ## ## All SSL configuration in this context applies both to ## the main server and all SSL-enabled virtual hosts. ## # SSL Cipher Suite: # List the ciphers that the client is permitted to negotiate, # and that httpd will negotiate as the client of a proxied server. # See the OpenSSL documentation for a complete list of ciphers, and # ensure these follow appropriate best practices for this deployment. # httpd 2.2.30, 2.4.13 and later force-disable aNULL, eNULL and EXP ciphers, # while OpenSSL disabled these by default in 0.9.8zf/1.0.0r/1.0.1m/1.0.2a. SSLCipherSuite HIGH: MEDIUM:!MD5:!RC4:!3DES SSLProxyCipherSuite HIGH: MEDIUM:!MD5:!RC4:!3DES # By the end of 2016, only TLSv1.2 ciphers should remain in use. # Older ciphers should be disallowed as soon as possible, while the # kRSA ciphers do not offer forward secrecy. These changes inhibit # older clients (such as IE6 SP2 or IE8 on Windows XP, or other legacy # non-browser tooling) from successfully connecting. # # To restrict mod_ssl to use only TLSv1.2 ciphers, and disable # those protocols which do not support forward secrecy, replace # the SSLCipherSuite and SSLProxyCipherSuite directives above with # the following two directives, as soon as practical. # SSLCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA # SSLProxyCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA # User agents such as web browsers are not configured for the user's # own preference of either security or performance, therefore this # must be the prerogative of the web server administrator who manages # cpu load versus confidentiality, so enforce the server's cipher order. SSLHonorCipherOrder on # SSL Protocol support: # List the protocol versions which clients are allowed to connect with. # Disable SSLv3 by default (cf. RFC 7525 3.1.1). TLSv1 (1.0) should be # disabled as quickly as practical. By the end of 2016, only the TLSv1.2 # protocol or later should remain in use. SSLProtocol all -SSLv3 SSLProxyProtocol all -SSLv3 # Pass Phrase Dialog: # Configure the pass phrase gathering process. # The filtering dialog program (`builtin' is an internal # terminal dialog) has to provide the pass phrase on stdout. SSLPassPhraseDialog builtin # Inter-Process Session Cache: # Configure the SSL Session Cache: First the mechanism # to use and second the expiring timeout (in seconds). #SSLSessionCache "dbm:/usr/local/apache2/logs/ssl_scache" SSLSessionCache "shmcb:/usr/local/apache2/logs/ssl_scache(512000)" SSLSessionCacheTimeout 300 # OCSP Stapling (requires OpenSSL 0.9.8h or later) # # This feature is disabled by default and requires at least # the two directives SSLUseStapling and SSLStaplingCache. # Refer to the documentation on OCSP Stapling in the SSL/TLS # How-To for more information. # # Enable stapling for all SSL-enabled servers: #SSLUseStapling On # Define a relatively small cache for OCSP Stapling using # the same mechanism that is used for the SSL session cache # above. If stapling is used with more than a few certificates, # the size may need to be increased. (AH01929 will be logged.) #SSLStaplingCache "shmcb:/usr/local/apache2/logs/ssl_stapling(32768)" # Seconds before valid OCSP responses are expired from the cache #SSLStaplingStandardCacheTimeout 3600 # Seconds before invalid OCSP responses are expired from the cache #SSLStaplingErrorCacheTimeout 600 ## ## SSL Virtual Host Context ## # General setup for the virtual host DocumentRoot "/usr/local/apache2/htdocs" ServerName www.example.com: 443 ServerAdmin you@example.com ErrorLog /proc/self/fd/2 TransferLog /proc/self/fd/1 # SSL Engine Switch: # Enable/Disable SSL for this virtual host. SSLEngine on # Server Certificate: # Point SSLCertificateFile at a PEM encoded certificate. If # the certificate is encrypted, then you will be prompted for a # pass phrase. Note that a kill -HUP will prompt again. Keep # in mind that if you have both an RSA and a DSA certificate you # can configure both in parallel (to also allow the use of DSA # ciphers, etc.) # Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt) # require an ECC certificate which can also be configured in # parallel. SSLCertificateFile "/usr/local/apache2/conf/server.crt" #SSLCertificateFile "/usr/local/apache2/conf/server-dsa.crt" #SSLCertificateFile "/usr/local/apache2/conf/server-ecc.crt" # Server Private Key: # If the key is not combined with the certificate, use this # directive to point at the key file. Keep in mind that if # you've both a RSA and a DSA private key you can configure # both in parallel (to also allow the use of DSA ciphers, etc.) # ECC keys, when in use, can also be configured in parallel SSLCertificateKeyFile "/usr/local/apache2/conf/server.key" #SSLCertificateKeyFile "/usr/local/apache2/conf/server-dsa.key" #SSLCertificateKeyFile "/usr/local/apache2/conf/server-ecc.key" # Server Certificate Chain: # Point SSLCertificateChainFile at a file containing the # concatenation of PEM encoded CA certificates which form the # certificate chain for the server certificate. Alternatively # the referenced file can be the same as SSLCertificateFile # when the CA certificates are directly appended to the server # certificate for convenience. #SSLCertificateChainFile "/usr/local/apache2/conf/server-ca.crt" # Certificate Authority (CA): # Set the CA certificate verification path where to find CA # certificates for client authentication or alternatively one # huge file containing all of them (file must be PEM encoded) # Note: Inside SSLCACertificatePath you need hash symlinks # to point to the certificate files. Use the provided # Makefile to update the hash symlinks after changes. #SSLCACertificatePath "/usr/local/apache2/conf/ssl.crt" #SSLCACertificateFile "/usr/local/apache2/conf/ssl.crt/ca-bundle.crt" # Certificate Revocation Lists (CRL): # Set the CA revocation path where to find CA CRLs for client # authentication or alternatively one huge file containing all # of them (file must be PEM encoded). # The CRL checking mode needs to be configured explicitly # through SSLCARevocationCheck (defaults to "none" otherwise). # Note: Inside SSLCARevocationPath you need hash symlinks # to point to the certificate files. Use the provided # Makefile to update the hash symlinks after changes. #SSLCARevocationPath "/usr/local/apache2/conf/ssl.crl" #SSLCARevocationFile "/usr/local/apache2/conf/ssl.crl/ca-bundle.crl" #SSLCARevocationCheck chain # Client Authentication (Type): # Client certificate verification type and depth. Types are # none, optional, require and optional_no_ca. Depth is a # number which specifies how deeply to verify the certificate # issuer chain before deciding the certificate is not valid. #SSLVerifyClient require #SSLVerifyDepth 10 # TLS-SRP mutual authentication: # Enable TLS-SRP and set the path to the OpenSSL SRP verifier # file (containing login information for SRP user accounts). # Requires OpenSSL 1.0.1 or newer. See the mod_ssl FAQ for # detailed instructions on creating this file. Example: # "openssl srp -srpvfile /usr/local/apache2/conf/passwd.srpv -add username" #SSLSRPVerifierFile "/usr/local/apache2/conf/passwd.srpv" # Access Control: # With SSLRequire you can do per-directory access control based # on arbitrary complex boolean expressions containing server # variable checks and other lookup directives. The syntax is a # mixture between C and Perl. See the mod_ssl documentation # for more details. # #SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \ # and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ # and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \ # and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \ # and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \ # or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/ # # SSL Engine Options: # Set various options for the SSL engine. # o FakeBasicAuth: # Translate the client X.509 into a Basic Authorisation. This means that # the standard Auth/DBMAuth methods can be used for access control. The # user name is the `one line' version of the client's X.509 certificate. # Note that no password is obtained from the user. Every entry in the user # file needs this password: `xxj31ZMTZzkVA'. # o ExportCertData: # This exports two additional environment variables: SSL_CLIENT_CERT and # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the # server (always existing) and the client (only existing when client # authentication is used). This can be used to import the certificates # into CGI scripts. # o StdEnvVars: # This exports the standard SSL/TLS related `SSL_*' environment variables. # Per default this exportation is switched off for performance reasons, # because the extraction step is an expensive operation and is usually # useless for serving static content. So one usually enables the # exportation for CGI and SSI requests only. # o StrictRequire: # This denies access when "SSLRequireSSL" or "SSLRequire" applied even # under a "Satisfy any" situation, i.e. when it applies access is denied # and no other module can change it. # o OptRenegotiate: # This enables optimized SSL connection renegotiation handling when SSL # directives are used in per-directory context. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire SSLOptions +StdEnvVars SSLOptions +StdEnvVars # SSL Protocol Adjustments: # The safe and default but still SSL/TLS standard compliant shutdown # approach is that mod_ssl sends the close notify alert but doesn't wait for # the close notify alert from client. When you need a different shutdown # approach you can use one of the following variables: # o ssl-unclean-shutdown: # This forces an unclean shutdown when the connection is closed, i.e. no # SSL close notify alert is sent or allowed to be received. This violates # the SSL/TLS standard but is needed for some brain-dead browsers. Use # this when you receive I/O errors because of the standard approach where # mod_ssl sends the close notify alert. # o ssl-accurate-shutdown: # This forces an accurate shutdown when the connection is closed, i.e. a # SSL close notify alert is send and mod_ssl waits for the close notify # alert of the client. This is 100% SSL/TLS standard compliant, but in # practice often causes hanging connections with brain-dead browsers. Use # this only for browsers where you know that their SSL implementation # works correctly. # Notice: Most problems of broken clients are also related to the HTTP # keep-alive facility, so you usually additionally want to disable # keep-alive for those clients, too. Use variable "nokeepalive" for this. # Similarly, one has to force some clients to use HTTP/1.0 to workaround # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and # "force-response-1.0" for this. BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 # Per-Server Logging: # The home of a custom SSL log file. Use this when you want a # compact non-error SSL logfile on a virtual host basis. CustomLog /proc/self/fd/1 \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" webdav-client-python-3-3.14.6/conf/extra/httpd-userdir.conf000066400000000000000000000012521410526511000235200ustar00rootroot00000000000000# Settings for user home directories # # Required module: mod_authz_core, mod_authz_host, mod_userdir # # UserDir: The name of the directory that is appended onto a user's home # directory if a ~user request is received. Note that you must also set # the default access control for these directories, as in the example below. # UserDir public_html # # Control access to UserDir directories. The following is an example # for a site where these directories are restricted to read-only. # AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec Require method GET POST OPTIONS webdav-client-python-3-3.14.6/conf/extra/httpd-vhosts.conf000066400000000000000000000026211410526511000233720ustar00rootroot00000000000000# Virtual Hosts # # Required modules: mod_log_config # If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any block. # ServerAdmin webmaster@dummy-host.example.com DocumentRoot "/usr/local/apache2/docs/dummy-host.example.com" ServerName dummy-host.example.com ServerAlias www.dummy-host.example.com ErrorLog "logs/dummy-host.example.com-error_log" CustomLog "logs/dummy-host.example.com-access_log" common ServerAdmin webmaster@dummy-host2.example.com DocumentRoot "/usr/local/apache2/docs/dummy-host2.example.com" ServerName dummy-host2.example.com ErrorLog "logs/dummy-host2.example.com-error_log" CustomLog "logs/dummy-host2.example.com-access_log" common webdav-client-python-3-3.14.6/conf/extra/proxy-html.conf000066400000000000000000000061231410526511000230470ustar00rootroot00000000000000# Configuration example. # # For detailed information about these directives see # # and for mod_xml2enc see # # # First, to load the module with its prerequisites. Note: mod_xml2enc # is not always necessary, but without it mod_proxy_html is likely to # mangle pages in encodings other than ASCII or Unicode (utf-8). # # For Unix-family systems: # LoadFile /usr/lib/libxml2.so # LoadModule proxy_html_module modules/mod_proxy_html.so # LoadModule xml2enc_module modules/mod_xml2enc.so # # For Windows (I don't know if there's a standard path for the libraries) # LoadFile C:/path/zlib.dll # LoadFile C:/path/iconv.dll # LoadFile C:/path/libxml2.dll # LoadModule proxy_html_module modules/mod_proxy_html.so # LoadModule xml2enc_module modules/mod_xml2enc.so # # All knowledge of HTML links has been removed from the mod_proxy_html # code itself, and is instead read from httpd.conf (or included file) # at server startup. So you MUST declare it. This will normally be # at top level, but can also be used in a . # # Here's the declaration for W3C HTML 4.01 and XHTML 1.0 ProxyHTMLLinks a href ProxyHTMLLinks area href ProxyHTMLLinks link href ProxyHTMLLinks img src longdesc usemap ProxyHTMLLinks object classid codebase data usemap ProxyHTMLLinks q cite ProxyHTMLLinks blockquote cite ProxyHTMLLinks ins cite ProxyHTMLLinks del cite ProxyHTMLLinks form action ProxyHTMLLinks input src usemap ProxyHTMLLinks head profile ProxyHTMLLinks base href ProxyHTMLLinks script src for # To support scripting events (with ProxyHTMLExtended On), # you'll need to declare them too. ProxyHTMLEvents onclick ondblclick onmousedown onmouseup \ onmouseover onmousemove onmouseout onkeypress \ onkeydown onkeyup onfocus onblur onload \ onunload onsubmit onreset onselect onchange # If you need to support legacy (pre-1998, aka "transitional") HTML or XHTML, # you'll need to uncomment the following deprecated link attributes. # Note that these are enabled in earlier mod_proxy_html versions # # ProxyHTMLLinks frame src longdesc # ProxyHTMLLinks iframe src longdesc # ProxyHTMLLinks body background # ProxyHTMLLinks applet codebase # # If you're dealing with proprietary HTML variants, # declare your own URL attributes here as required. # # ProxyHTMLLinks myelement myattr otherattr # ########### # EXAMPLE # ########### # # To define the URL /my-gateway/ as a gateway to an appserver with address # http://some.app.intranet/ on a private network, after loading the # modules and including this configuration file: # # ProxyRequests Off <-- this is an important security setting # ProxyPass /my-gateway/ http://some.app.intranet/ # # ProxyPassReverse / # ProxyHTMLEnable On # ProxyHTMLURLMap http://some.app.intranet/ /my-gateway/ # ProxyHTMLURLMap / /my-gateway/ # # # Many (though not all) real-life setups are more complex. # # See the documentation at # http://apache.webthing.com/mod_proxy_html/ # and the tutorial at # http://www.apachetutor.org/admin/reverseproxies webdav-client-python-3-3.14.6/conf/httpd.conf000066400000000000000000000476111410526511000207330ustar00rootroot00000000000000# # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See for detailed information. # In particular, see # # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "logs/access_log" # with ServerRoot set to "/usr/local/apache2" will be interpreted by the # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" # will be interpreted as '/logs/access_log'. # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # Do not add a slash at the end of the directory path. If you point # ServerRoot at a non-local disk, be sure to specify a local disk on the # Mutex directive, if file-based mutexes are used. If you wish to share the # same ServerRoot for multiple httpd daemons, you will need to change at # least PidFile. # ServerRoot "/usr/local/apache2" # # Mutex: Allows you to set the mutex mechanism and mutex file directory # for individual mutexes, or change the global defaults # # Uncomment and change the directory if mutexes are file-based and the default # mutex file directory is not on a local disk or is not appropriate for some # other reason. # # Mutex default:logs # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 Listen 80 # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so # LoadModule mpm_event_module modules/mod_mpm_event.so #LoadModule mpm_prefork_module modules/mod_mpm_prefork.so #LoadModule mpm_worker_module modules/mod_mpm_worker.so LoadModule authn_file_module modules/mod_authn_file.so #LoadModule authn_dbm_module modules/mod_authn_dbm.so #LoadModule authn_anon_module modules/mod_authn_anon.so #LoadModule authn_dbd_module modules/mod_authn_dbd.so #LoadModule authn_socache_module modules/mod_authn_socache.so LoadModule authn_core_module modules/mod_authn_core.so LoadModule authz_host_module modules/mod_authz_host.so LoadModule authz_groupfile_module modules/mod_authz_groupfile.so LoadModule authz_user_module modules/mod_authz_user.so #LoadModule authz_dbm_module modules/mod_authz_dbm.so #LoadModule authz_owner_module modules/mod_authz_owner.so #LoadModule authz_dbd_module modules/mod_authz_dbd.so LoadModule authz_core_module modules/mod_authz_core.so #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so #LoadModule authnz_fcgi_module modules/mod_authnz_fcgi.so LoadModule access_compat_module modules/mod_access_compat.so LoadModule auth_basic_module modules/mod_auth_basic.so #LoadModule auth_form_module modules/mod_auth_form.so LoadModule auth_digest_module modules/mod_auth_digest.so #LoadModule allowmethods_module modules/mod_allowmethods.so #LoadModule isapi_module modules/mod_isapi.so #LoadModule file_cache_module modules/mod_file_cache.so #LoadModule cache_module modules/mod_cache.so #LoadModule cache_disk_module modules/mod_cache_disk.so #LoadModule cache_socache_module modules/mod_cache_socache.so #LoadModule socache_shmcb_module modules/mod_socache_shmcb.so #LoadModule socache_dbm_module modules/mod_socache_dbm.so #LoadModule socache_memcache_module modules/mod_socache_memcache.so #LoadModule socache_redis_module modules/mod_socache_redis.so #LoadModule watchdog_module modules/mod_watchdog.so #LoadModule macro_module modules/mod_macro.so #LoadModule dbd_module modules/mod_dbd.so #LoadModule bucketeer_module modules/mod_bucketeer.so #LoadModule dumpio_module modules/mod_dumpio.so #LoadModule echo_module modules/mod_echo.so #LoadModule example_hooks_module modules/mod_example_hooks.so #LoadModule case_filter_module modules/mod_case_filter.so #LoadModule case_filter_in_module modules/mod_case_filter_in.so #LoadModule example_ipc_module modules/mod_example_ipc.so #LoadModule buffer_module modules/mod_buffer.so #LoadModule data_module modules/mod_data.so #LoadModule ratelimit_module modules/mod_ratelimit.so LoadModule reqtimeout_module modules/mod_reqtimeout.so #LoadModule ext_filter_module modules/mod_ext_filter.so #LoadModule request_module modules/mod_request.so #LoadModule include_module modules/mod_include.so LoadModule filter_module modules/mod_filter.so #LoadModule reflector_module modules/mod_reflector.so #LoadModule substitute_module modules/mod_substitute.so #LoadModule sed_module modules/mod_sed.so #LoadModule charset_lite_module modules/mod_charset_lite.so LoadModule deflate_module modules/mod_deflate.so #LoadModule xml2enc_module modules/mod_xml2enc.so #LoadModule proxy_html_module modules/mod_proxy_html.so #LoadModule brotli_module modules/mod_brotli.so LoadModule mime_module modules/mod_mime.so #LoadModule ldap_module modules/mod_ldap.so LoadModule log_config_module modules/mod_log_config.so #LoadModule log_debug_module modules/mod_log_debug.so #LoadModule log_forensic_module modules/mod_log_forensic.so #LoadModule logio_module modules/mod_logio.so #LoadModule lua_module modules/mod_lua.so LoadModule env_module modules/mod_env.so #LoadModule mime_magic_module modules/mod_mime_magic.so #LoadModule cern_meta_module modules/mod_cern_meta.so #LoadModule expires_module modules/mod_expires.so LoadModule headers_module modules/mod_headers.so #LoadModule ident_module modules/mod_ident.so #LoadModule usertrack_module modules/mod_usertrack.so #LoadModule unique_id_module modules/mod_unique_id.so LoadModule setenvif_module modules/mod_setenvif.so LoadModule version_module modules/mod_version.so #LoadModule remoteip_module modules/mod_remoteip.so #LoadModule proxy_module modules/mod_proxy.so #LoadModule proxy_connect_module modules/mod_proxy_connect.so #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so #LoadModule proxy_http_module modules/mod_proxy_http.so #LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so #LoadModule proxy_scgi_module modules/mod_proxy_scgi.so #LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so #LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so #LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so #LoadModule proxy_express_module modules/mod_proxy_express.so #LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so #LoadModule session_module modules/mod_session.so #LoadModule session_cookie_module modules/mod_session_cookie.so #LoadModule session_crypto_module modules/mod_session_crypto.so #LoadModule session_dbd_module modules/mod_session_dbd.so #LoadModule slotmem_shm_module modules/mod_slotmem_shm.so #LoadModule slotmem_plain_module modules/mod_slotmem_plain.so #LoadModule ssl_module modules/mod_ssl.so #LoadModule optional_hook_export_module modules/mod_optional_hook_export.so #LoadModule optional_hook_import_module modules/mod_optional_hook_import.so #LoadModule optional_fn_import_module modules/mod_optional_fn_import.so #LoadModule optional_fn_export_module modules/mod_optional_fn_export.so #LoadModule dialup_module modules/mod_dialup.so #LoadModule http2_module modules/mod_http2.so #LoadModule proxy_http2_module modules/mod_proxy_http2.so #LoadModule md_module modules/mod_md.so #LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so #LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so #LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so #LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so LoadModule unixd_module modules/mod_unixd.so #LoadModule heartbeat_module modules/mod_heartbeat.so #LoadModule heartmonitor_module modules/mod_heartmonitor.so LoadModule dav_module modules/mod_dav.so LoadModule status_module modules/mod_status.so LoadModule autoindex_module modules/mod_autoindex.so #LoadModule asis_module modules/mod_asis.so #LoadModule info_module modules/mod_info.so #LoadModule suexec_module modules/mod_suexec.so #LoadModule cgid_module modules/mod_cgid.so #LoadModule cgi_module modules/mod_cgi.so LoadModule dav_fs_module modules/mod_dav_fs.so #LoadModule dav_lock_module modules/mod_dav_lock.so #LoadModule vhost_alias_module modules/mod_vhost_alias.so #LoadModule negotiation_module modules/mod_negotiation.so LoadModule dir_module modules/mod_dir.so #LoadModule imagemap_module modules/mod_imagemap.so #LoadModule actions_module modules/mod_actions.so #LoadModule speling_module modules/mod_speling.so #LoadModule userdir_module modules/mod_userdir.so LoadModule alias_module modules/mod_alias.so #LoadModule rewrite_module modules/mod_rewrite.so # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # User www-data Group www-data # 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # definition. These values also provide defaults for # any containers you may define later in the file. # # All of these directives may appear inside containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain.com # ServerAdmin you@example.com # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If your host doesn't have a registered DNS name, enter its IP address here. # #ServerName www.example.com:80 # # Deny access to the entirety of your server's filesystem. You must # explicitly permit access to web content directories in other # blocks below. # AllowOverride none Require all denied # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/usr/local/apache2/htdocs" # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # AllowOverride FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Require all granted # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # DirectoryIndex index.html # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # Require all denied # # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a # container, that host's errors will be logged there and not here. # ErrorLog /proc/self/fd/2 # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio # # The location and format of the access logfile (Common Logfile Format). # If you do not define any access logfiles within a # container, they will be logged here. Contrariwise, if you *do* # define per- access logfiles, transactions will be # logged therein and *not* in this file. # CustomLog /proc/self/fd/1 common # # If you prefer a logfile with access, agent, and referer information # (Combined Logfile Format) you can use the following directive. # #CustomLog "logs/access_log" combined # # Redirect: Allows you to tell clients about documents that used to # exist in your server's namespace, but do not anymore. The client # will make a new request for the document at its new location. # Example: # Redirect permanent /foo http://www.example.com/bar # # Alias: Maps web paths into filesystem paths and is used to # access content that does not live under the DocumentRoot. # Example: # Alias /webpath /full/filesystem/path # # If you include a trailing / on /webpath then the server will # require it to be present in the URL. You will also likely # need to provide a section to allow access to # the filesystem path. # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing "/" apply to ScriptAlias # directives as to Alias. # ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/" # # ScriptSock: On threaded servers, designate the path to the UNIX # socket used to communicate with the CGI daemon of mod_cgid. # #Scriptsock cgisock # # "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # AllowOverride None Options None Require all granted # # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied # backend servers which have lingering "httpoxy" defects. # 'Proxy' request header is undefined by the IETF, not listed by IANA # RequestHeader unset Proxy early # # TypesConfig points to the file containing the list of mappings from # filename extension to MIME-type. # TypesConfig conf/mime.types # # AddType allows you to add to or override the MIME configuration # file specified in TypesConfig for specific file types. # #AddType application/x-gzip .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi # For type maps (negotiated resources): #AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # #AddType text/html .shtml #AddOutputFilter INCLUDES .shtml # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # #MIMEMagicFile conf/magic # # Customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # Some examples: #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # # # MaxRanges: Maximum number of Ranges in a request before # returning the entire resource, or one of the special # values 'default', 'none' or 'unlimited'. # Default setting is to accept 200 Ranges. #MaxRanges unlimited # # EnableMMAP and EnableSendfile: On systems that support it, # memory-mapping or the sendfile syscall may be used to deliver # files. This usually improves server performance, but must # be turned off when serving from networked-mounted # filesystems or if support for these functions is otherwise # broken on your system. # Defaults: EnableMMAP On, EnableSendfile Off # #EnableMMAP off #EnableSendfile on # Supplemental configuration # # The configuration files in the conf/extra/ directory can be # included to add extra features or to modify the default configuration of # the server, or you may simply copy their contents here and change as # necessary. # Server-pool management (MPM specific) #Include conf/extra/httpd-mpm.conf # Multi-language error messages #Include conf/extra/httpd-multilang-errordoc.conf # Fancy directory listings #Include conf/extra/httpd-autoindex.conf # Language settings #Include conf/extra/httpd-languages.conf # User home directories #Include conf/extra/httpd-userdir.conf # Real-time info on requests and configuration #Include conf/extra/httpd-info.conf # Virtual hosts #Include conf/extra/httpd-vhosts.conf # Local access to the Apache HTTP Server Manual #Include conf/extra/httpd-manual.conf # Distributed authoring and versioning (WebDAV) #Include conf/extra/httpd-dav.conf # Various default settings #Include conf/extra/httpd-default.conf # Configure mod_proxy_html to understand HTML4/XHTML1 Include conf/extra/proxy-html.conf # Secure (SSL/TLS) connections #Include conf/extra/httpd-ssl.conf # # Note: The following must must be present to support # starting without SSL on platforms with no /dev/random equivalent # but a statically compiled-in mod_ssl. # SSLRandomSeed startup builtin SSLRandomSeed connect builtin Include conf/conf-enabled/*.conf Include conf/sites-enabled/*.conf webdav-client-python-3-3.14.6/conf/magic000066400000000000000000000314101410526511000177320ustar00rootroot00000000000000# Magic data for mod_mime_magic Apache module (originally for file(1) command) # The module is described in /manual/mod/mod_mime_magic.html # # The format is 4-5 columns: # Column #1: byte number to begin checking from, ">" indicates continuation # Column #2: type of data to match # Column #3: contents of data to match # Column #4: MIME type of result # Column #5: MIME encoding of result (optional) #------------------------------------------------------------------------------ # Localstuff: file(1) magic for locally observed files # Add any locally observed files here. #------------------------------------------------------------------------------ # end local stuff #------------------------------------------------------------------------------ #------------------------------------------------------------------------------ # Java 0 short 0xcafe >2 short 0xbabe application/java #------------------------------------------------------------------------------ # audio: file(1) magic for sound formats # # from Jan Nicolai Langfeldt , # # Sun/NeXT audio data 0 string .snd >12 belong 1 audio/basic >12 belong 2 audio/basic >12 belong 3 audio/basic >12 belong 4 audio/basic >12 belong 5 audio/basic >12 belong 6 audio/basic >12 belong 7 audio/basic >12 belong 23 audio/x-adpcm # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format # that uses little-endian encoding and has a different magic number # (0x0064732E in little-endian encoding). 0 lelong 0x0064732E >12 lelong 1 audio/x-dec-basic >12 lelong 2 audio/x-dec-basic >12 lelong 3 audio/x-dec-basic >12 lelong 4 audio/x-dec-basic >12 lelong 5 audio/x-dec-basic >12 lelong 6 audio/x-dec-basic >12 lelong 7 audio/x-dec-basic # compressed (G.721 ADPCM) >12 lelong 23 audio/x-dec-adpcm # Bytes 0-3 of AIFF, AIFF-C, & 8SVX audio files are "FORM" # AIFF audio data 8 string AIFF audio/x-aiff # AIFF-C audio data 8 string AIFC audio/x-aiff # IFF/8SVX audio data 8 string 8SVX audio/x-aiff # Creative Labs AUDIO stuff # Standard MIDI data 0 string MThd audio/unknown #>9 byte >0 (format %d) #>11 byte >1 using %d channels # Creative Music (CMF) data 0 string CTMF audio/unknown # SoundBlaster instrument data 0 string SBI audio/unknown # Creative Labs voice data 0 string Creative\ Voice\ File audio/unknown ## is this next line right? it came this way... #>19 byte 0x1A #>23 byte >0 - version %d #>22 byte >0 \b.%d # [GRR 950115: is this also Creative Labs? Guessing that first line # should be string instead of unknown-endian long...] #0 long 0x4e54524b MultiTrack sound data #0 string NTRK MultiTrack sound data #>4 long x - version %ld # Microsoft WAVE format (*.wav) # [GRR 950115: probably all of the shorts and longs should be leshort/lelong] # Microsoft RIFF 0 string RIFF # - WAVE format >8 string WAVE audio/x-wav # MPEG audio. 0 beshort&0xfff0 0xfff0 audio/mpeg # C64 SID Music files, from Linus Walleij 0 string PSID audio/prs.sid #------------------------------------------------------------------------------ # c-lang: file(1) magic for C programs or various scripts # # XPM icons (Greg Roelofs, newt@uchicago.edu) # ideally should go into "images", but entries below would tag XPM as C source 0 string /*\ XPM image/x-xbm 7bit # this first will upset you if you're a PL/1 shop... (are there any left?) # in which case rm it; ascmagic will catch real C programs # C or REXX program text 0 string /* text/plain # C++ program text 0 string // text/plain #------------------------------------------------------------------------------ # compress: file(1) magic for pure-compression formats (no archives) # # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, whap, etc. # # Formats for various forms of compressed data # Formats for "compress" proper have been moved into "compress.c", # because it tries to uncompress it to figure out what's inside. # standard unix compress 0 string \037\235 application/octet-stream x-compress # gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver) 0 string \037\213 application/octet-stream x-gzip # According to gzip.h, this is the correct byte order for packed data. 0 string \037\036 application/octet-stream # # This magic number is byte-order-independent. # 0 short 017437 application/octet-stream # XXX - why *two* entries for "compacted data", one of which is # byte-order independent, and one of which is byte-order dependent? # # compacted data 0 short 0x1fff application/octet-stream 0 string \377\037 application/octet-stream # huf output 0 short 0145405 application/octet-stream # Squeeze and Crunch... # These numbers were gleaned from the Unix versions of the programs to # handle these formats. Note that I can only uncrunch, not crunch, and # I didn't have a crunched file handy, so the crunch number is untested. # Keith Waclena #0 leshort 0x76FF squeezed data (CP/M, DOS) #0 leshort 0x76FE crunched data (CP/M, DOS) # Freeze #0 string \037\237 Frozen file 2.1 #0 string \037\236 Frozen file 1.0 (or gzip 0.5) # lzh? #0 string \037\240 LZH compressed data #------------------------------------------------------------------------------ # frame: file(1) magic for FrameMaker files # # This stuff came on a FrameMaker demo tape, most of which is # copyright, but this file is "published" as witness the following: # 0 string \ # and Anna Shergold # 0 string \ 0 string \14 byte 12 (OS/2 1.x format) #>14 byte 64 (OS/2 2.x format) #>14 byte 40 (Windows 3.x format) #0 string IC icon #0 string PI pointer #0 string CI color icon #0 string CP color pointer #0 string BA bitmap array 0 string \x89PNG image/png 0 string FWS application/x-shockwave-flash 0 string CWS application/x-shockwave-flash #------------------------------------------------------------------------------ # lisp: file(1) magic for lisp programs # # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com) 0 string ;; text/plain 8bit # Emacs 18 - this is always correct, but not very magical. 0 string \012( application/x-elc # Emacs 19 0 string ;ELC\023\000\000\000 application/x-elc #------------------------------------------------------------------------------ # mail.news: file(1) magic for mail and news # # There are tests to ascmagic.c to cope with mail and news. 0 string Relay-Version: message/rfc822 7bit 0 string #!\ rnews message/rfc822 7bit 0 string N#!\ rnews message/rfc822 7bit 0 string Forward\ to message/rfc822 7bit 0 string Pipe\ to message/rfc822 7bit 0 string Return-Path: message/rfc822 7bit 0 string Path: message/news 8bit 0 string Xref: message/news 8bit 0 string From: message/rfc822 7bit 0 string Article message/news 8bit #------------------------------------------------------------------------------ # msword: file(1) magic for MS Word files # # Contributor claims: # Reversed-engineered MS Word magic numbers # 0 string \376\067\0\043 application/msword 0 string \333\245-\0\0\0 application/msword # disable this one because it applies also to other # Office/OLE documents for which msword is not correct. See PR#2608. #0 string \320\317\021\340\241\261 application/msword #------------------------------------------------------------------------------ # printer: file(1) magic for printer-formatted files # # PostScript 0 string %! application/postscript 0 string \004%! application/postscript # Acrobat # (due to clamen@cs.cmu.edu) 0 string %PDF- application/pdf #------------------------------------------------------------------------------ # sc: file(1) magic for "sc" spreadsheet # 38 string Spreadsheet application/x-sc #------------------------------------------------------------------------------ # tex: file(1) magic for TeX files # # XXX - needs byte-endian stuff (big-endian and little-endian DVI?) # # From # Although we may know the offset of certain text fields in TeX DVI # and font files, we can't use them reliably because they are not # zero terminated. [but we do anyway, christos] 0 string \367\002 application/x-dvi #0 string \367\203 TeX generic font data #0 string \367\131 TeX packed font data #0 string \367\312 TeX virtual font data #0 string This\ is\ TeX, TeX transcript text #0 string This\ is\ METAFONT, METAFONT transcript text # There is no way to detect TeX Font Metric (*.tfm) files without # breaking them apart and reading the data. The following patterns # match most *.tfm files generated by METAFONT or afm2tfm. #2 string \000\021 TeX font metric data #2 string \000\022 TeX font metric data #>34 string >\0 (%s) # Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com) #0 string \\input\ texinfo Texinfo source text #0 string This\ is\ Info\ file GNU Info text # correct TeX magic for Linux (and maybe more) # from Peter Tobias (tobias@server.et-inf.fho-emden.de) # 0 leshort 0x02f7 application/x-dvi # RTF - Rich Text Format 0 string {\\rtf application/rtf #------------------------------------------------------------------------------ # animation: file(1) magic for animation/movie formats # # animation formats, originally from vax@ccwf.cc.utexas.edu (VaX#n8) # MPEG file 0 string \000\000\001\263 video/mpeg # # The contributor claims: # I couldn't find a real magic number for these, however, this # -appears- to work. Note that it might catch other files, too, # so BE CAREFUL! # # Note that title and author appear in the two 20-byte chunks # at decimal offsets 2 and 22, respectively, but they are XOR'ed with # 255 (hex FF)! DL format SUCKS BIG ROCKS. # # DL file version 1 , medium format (160x100, 4 images/screen) 0 byte 1 video/unknown 0 byte 2 video/unknown # Quicktime video, from Linus Walleij # from Apple quicktime file format documentation. 4 string moov video/quicktime 4 string mdat video/quicktime webdav-client-python-3-3.14.6/conf/mime.types000066400000000000000000001666571410526511000207720ustar00rootroot00000000000000# This file maps Internet media types to unique file extension(s). # Although created for httpd, this file is used by many software systems # and has been placed in the public domain for unlimited redisribution. # # The table below contains both registered and (common) unregistered types. # A type that has no unique extension can be ignored -- they are listed # here to guide configurations toward known types and to make it easier to # identify "new" types. File extensions are also commonly used to indicate # content languages and encodings, so choose them carefully. # # Internet media types should be registered as described in RFC 4288. # The registry is at . # # MIME type (lowercased) Extensions # ============================================ ========== # application/1d-interleaved-parityfec # application/3gpdash-qoe-report+xml # application/3gpp-ims+xml # application/a2l # application/activemessage # application/alto-costmap+json # application/alto-costmapfilter+json # application/alto-directory+json # application/alto-endpointcost+json # application/alto-endpointcostparams+json # application/alto-endpointprop+json # application/alto-endpointpropparams+json # application/alto-error+json # application/alto-networkmap+json # application/alto-networkmapfilter+json # application/aml application/andrew-inset ez # application/applefile application/applixware aw # application/atf # application/atfx application/atom+xml atom application/atomcat+xml atomcat # application/atomdeleted+xml # application/atomicmail application/atomsvc+xml atomsvc # application/atxml # application/auth-policy+xml # application/bacnet-xdd+zip # application/batch-smtp # application/beep+xml # application/calendar+json # application/calendar+xml # application/call-completion # application/cals-1840 # application/cbor # application/ccmp+xml application/ccxml+xml ccxml # application/cdfx+xml application/cdmi-capability cdmia application/cdmi-container cdmic application/cdmi-domain cdmid application/cdmi-object cdmio application/cdmi-queue cdmiq # application/cdni # application/cea # application/cea-2018+xml # application/cellml+xml # application/cfw # application/cms # application/cnrp+xml # application/coap-group+json # application/commonground # application/conference-info+xml # application/cpl+xml # application/csrattrs # application/csta+xml # application/cstadata+xml # application/csvm+json application/cu-seeme cu # application/cybercash # application/dash+xml # application/dashdelta application/davmount+xml davmount # application/dca-rft # application/dcd # application/dec-dx # application/dialog-info+xml # application/dicom # application/dii # application/dit # application/dns application/docbook+xml dbk # application/dskpp+xml application/dssc+der dssc application/dssc+xml xdssc # application/dvcs application/ecmascript ecma # application/edi-consent # application/edi-x12 # application/edifact # application/efi # application/emergencycalldata.comment+xml # application/emergencycalldata.deviceinfo+xml # application/emergencycalldata.providerinfo+xml # application/emergencycalldata.serviceinfo+xml # application/emergencycalldata.subscriberinfo+xml application/emma+xml emma # application/emotionml+xml # application/encaprtp # application/epp+xml application/epub+zip epub # application/eshop # application/example application/exi exi # application/fastinfoset # application/fastsoap # application/fdt+xml # application/fits application/font-tdpfr pfr # application/framework-attributes+xml # application/geo+json application/gml+xml gml application/gpx+xml gpx application/gxf gxf # application/gzip # application/h224 # application/held+xml # application/http application/hyperstudio stk # application/ibe-key-request+xml # application/ibe-pkg-reply+xml # application/ibe-pp-data # application/iges # application/im-iscomposing+xml # application/index # application/index.cmd # application/index.obj # application/index.response # application/index.vnd application/inkml+xml ink inkml # application/iotp application/ipfix ipfix # application/ipp # application/isup # application/its+xml application/java-archive jar application/java-serialized-object ser application/java-vm class application/javascript js # application/jose # application/jose+json # application/jrd+json application/json json # application/json-patch+json # application/json-seq application/jsonml+json jsonml # application/jwk+json # application/jwk-set+json # application/jwt # application/kpml-request+xml # application/kpml-response+xml # application/ld+json # application/lgr+xml # application/link-format # application/load-control+xml application/lost+xml lostxml # application/lostsync+xml # application/lxf application/mac-binhex40 hqx application/mac-compactpro cpt # application/macwriteii application/mads+xml mads application/marc mrc application/marcxml+xml mrcx application/mathematica ma nb mb application/mathml+xml mathml # application/mathml-content+xml # application/mathml-presentation+xml # application/mbms-associated-procedure-description+xml # application/mbms-deregister+xml # application/mbms-envelope+xml # application/mbms-msk+xml # application/mbms-msk-response+xml # application/mbms-protection-description+xml # application/mbms-reception-report+xml # application/mbms-register+xml # application/mbms-register-response+xml # application/mbms-schedule+xml # application/mbms-user-service-description+xml application/mbox mbox # application/media-policy-dataset+xml # application/media_control+xml application/mediaservercontrol+xml mscml # application/merge-patch+json application/metalink+xml metalink application/metalink4+xml meta4 application/mets+xml mets # application/mf4 # application/mikey application/mods+xml mods # application/moss-keys # application/moss-signature # application/mosskey-data # application/mosskey-request application/mp21 m21 mp21 application/mp4 mp4s # application/mpeg4-generic # application/mpeg4-iod # application/mpeg4-iod-xmt # application/mrb-consumer+xml # application/mrb-publish+xml # application/msc-ivr+xml # application/msc-mixer+xml application/msword doc dot application/mxf mxf # application/nasdata # application/news-checkgroups # application/news-groupinfo # application/news-transmission # application/nlsml+xml # application/nss # application/ocsp-request # application/ocsp-response application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy application/oda oda # application/odx application/oebps-package+xml opf application/ogg ogx application/omdoc+xml omdoc application/onenote onetoc onetoc2 onetmp onepkg application/oxps oxps # application/p2p-overlay+xml # application/parityfec application/patch-ops-error+xml xer application/pdf pdf # application/pdx application/pgp-encrypted pgp # application/pgp-keys application/pgp-signature asc sig application/pics-rules prf # application/pidf+xml # application/pidf-diff+xml application/pkcs10 p10 # application/pkcs12 application/pkcs7-mime p7m p7c application/pkcs7-signature p7s application/pkcs8 p8 application/pkix-attr-cert ac application/pkix-cert cer application/pkix-crl crl application/pkix-pkipath pkipath application/pkixcmp pki application/pls+xml pls # application/poc-settings+xml application/postscript ai eps ps # application/ppsp-tracker+json # application/problem+json # application/problem+xml # application/provenance+xml # application/prs.alvestrand.titrax-sheet application/prs.cww cww # application/prs.hpub+zip # application/prs.nprend # application/prs.plucker # application/prs.rdf-xml-crypt # application/prs.xsf+xml application/pskc+xml pskcxml # application/qsig # application/raptorfec # application/rdap+json application/rdf+xml rdf application/reginfo+xml rif application/relax-ng-compact-syntax rnc # application/remote-printing # application/reputon+json application/resource-lists+xml rl application/resource-lists-diff+xml rld # application/rfc+xml # application/riscos # application/rlmi+xml application/rls-services+xml rs application/rpki-ghostbusters gbr application/rpki-manifest mft application/rpki-roa roa # application/rpki-updown application/rsd+xml rsd application/rss+xml rss application/rtf rtf # application/rtploopback # application/rtx # application/samlassertion+xml # application/samlmetadata+xml application/sbml+xml sbml # application/scaip+xml # application/scim+json application/scvp-cv-request scq application/scvp-cv-response scs application/scvp-vp-request spq application/scvp-vp-response spp application/sdp sdp # application/sep+xml # application/sep-exi # application/session-info # application/set-payment application/set-payment-initiation setpay # application/set-registration application/set-registration-initiation setreg # application/sgml # application/sgml-open-catalog application/shf+xml shf # application/sieve # application/simple-filter+xml # application/simple-message-summary # application/simplesymbolcontainer # application/slate # application/smil application/smil+xml smi smil # application/smpte336m # application/soap+fastinfoset # application/soap+xml application/sparql-query rq application/sparql-results+xml srx # application/spirits-event+xml # application/sql application/srgs gram application/srgs+xml grxml application/sru+xml sru application/ssdl+xml ssdl application/ssml+xml ssml # application/tamp-apex-update # application/tamp-apex-update-confirm # application/tamp-community-update # application/tamp-community-update-confirm # application/tamp-error # application/tamp-sequence-adjust # application/tamp-sequence-adjust-confirm # application/tamp-status-query # application/tamp-status-response # application/tamp-update # application/tamp-update-confirm application/tei+xml tei teicorpus application/thraud+xml tfi # application/timestamp-query # application/timestamp-reply application/timestamped-data tsd # application/ttml+xml # application/tve-trigger # application/ulpfec # application/urc-grpsheet+xml # application/urc-ressheet+xml # application/urc-targetdesc+xml # application/urc-uisocketdesc+xml # application/vcard+json # application/vcard+xml # application/vemmi # application/vividence.scriptfile # application/vnd.3gpp-prose+xml # application/vnd.3gpp-prose-pc3ch+xml # application/vnd.3gpp.access-transfer-events+xml # application/vnd.3gpp.bsf+xml # application/vnd.3gpp.mid-call+xml application/vnd.3gpp.pic-bw-large plb application/vnd.3gpp.pic-bw-small psb application/vnd.3gpp.pic-bw-var pvb # application/vnd.3gpp.sms # application/vnd.3gpp.sms+xml # application/vnd.3gpp.srvcc-ext+xml # application/vnd.3gpp.srvcc-info+xml # application/vnd.3gpp.state-and-event-info+xml # application/vnd.3gpp.ussd+xml # application/vnd.3gpp2.bcmcsinfo+xml # application/vnd.3gpp2.sms application/vnd.3gpp2.tcap tcap # application/vnd.3lightssoftware.imagescal application/vnd.3m.post-it-notes pwn application/vnd.accpac.simply.aso aso application/vnd.accpac.simply.imp imp application/vnd.acucobol acu application/vnd.acucorp atc acutc application/vnd.adobe.air-application-installer-package+zip air # application/vnd.adobe.flash.movie application/vnd.adobe.formscentral.fcdt fcdt application/vnd.adobe.fxp fxp fxpl # application/vnd.adobe.partial-upload application/vnd.adobe.xdp+xml xdp application/vnd.adobe.xfdf xfdf # application/vnd.aether.imp # application/vnd.ah-barcode application/vnd.ahead.space ahead application/vnd.airzip.filesecure.azf azf application/vnd.airzip.filesecure.azs azs application/vnd.amazon.ebook azw # application/vnd.amazon.mobi8-ebook application/vnd.americandynamics.acc acc application/vnd.amiga.ami ami # application/vnd.amundsen.maze+xml application/vnd.android.package-archive apk # application/vnd.anki application/vnd.anser-web-certificate-issue-initiation cii application/vnd.anser-web-funds-transfer-initiation fti application/vnd.antix.game-component atx # application/vnd.apache.thrift.binary # application/vnd.apache.thrift.compact # application/vnd.apache.thrift.json # application/vnd.api+json application/vnd.apple.installer+xml mpkg application/vnd.apple.mpegurl m3u8 # application/vnd.arastra.swi application/vnd.aristanetworks.swi swi # application/vnd.artsquare application/vnd.astraea-software.iota iota application/vnd.audiograph aep # application/vnd.autopackage # application/vnd.avistar+xml # application/vnd.balsamiq.bmml+xml # application/vnd.balsamiq.bmpr # application/vnd.bekitzur-stech+json # application/vnd.biopax.rdf+xml application/vnd.blueice.multipass mpm # application/vnd.bluetooth.ep.oob # application/vnd.bluetooth.le.oob application/vnd.bmi bmi application/vnd.businessobjects rep # application/vnd.cab-jscript # application/vnd.canon-cpdl # application/vnd.canon-lips # application/vnd.cendio.thinlinc.clientconf # application/vnd.century-systems.tcp_stream application/vnd.chemdraw+xml cdxml # application/vnd.chess-pgn application/vnd.chipnuts.karaoke-mmd mmd application/vnd.cinderella cdy # application/vnd.cirpack.isdn-ext # application/vnd.citationstyles.style+xml application/vnd.claymore cla application/vnd.cloanto.rp9 rp9 application/vnd.clonk.c4group c4g c4d c4f c4p c4u application/vnd.cluetrust.cartomobile-config c11amc application/vnd.cluetrust.cartomobile-config-pkg c11amz # application/vnd.coffeescript # application/vnd.collection+json # application/vnd.collection.doc+json # application/vnd.collection.next+json # application/vnd.comicbook+zip # application/vnd.commerce-battelle application/vnd.commonspace csp application/vnd.contact.cmsg cdbcmsg # application/vnd.coreos.ignition+json application/vnd.cosmocaller cmc application/vnd.crick.clicker clkx application/vnd.crick.clicker.keyboard clkk application/vnd.crick.clicker.palette clkp application/vnd.crick.clicker.template clkt application/vnd.crick.clicker.wordbank clkw application/vnd.criticaltools.wbs+xml wbs application/vnd.ctc-posml pml # application/vnd.ctct.ws+xml # application/vnd.cups-pdf # application/vnd.cups-postscript application/vnd.cups-ppd ppd # application/vnd.cups-raster # application/vnd.cups-raw # application/vnd.curl application/vnd.curl.car car application/vnd.curl.pcurl pcurl # application/vnd.cyan.dean.root+xml # application/vnd.cybank application/vnd.dart dart application/vnd.data-vision.rdz rdz # application/vnd.debian.binary-package application/vnd.dece.data uvf uvvf uvd uvvd application/vnd.dece.ttml+xml uvt uvvt application/vnd.dece.unspecified uvx uvvx application/vnd.dece.zip uvz uvvz application/vnd.denovo.fcselayout-link fe_launch # application/vnd.desmume.movie # application/vnd.dir-bi.plate-dl-nosuffix # application/vnd.dm.delegation+xml application/vnd.dna dna # application/vnd.document+json application/vnd.dolby.mlp mlp # application/vnd.dolby.mobile.1 # application/vnd.dolby.mobile.2 # application/vnd.doremir.scorecloud-binary-document application/vnd.dpgraph dpg application/vnd.dreamfactory dfac # application/vnd.drive+json application/vnd.ds-keypoint kpxx # application/vnd.dtg.local # application/vnd.dtg.local.flash # application/vnd.dtg.local.html application/vnd.dvb.ait ait # application/vnd.dvb.dvbj # application/vnd.dvb.esgcontainer # application/vnd.dvb.ipdcdftnotifaccess # application/vnd.dvb.ipdcesgaccess # application/vnd.dvb.ipdcesgaccess2 # application/vnd.dvb.ipdcesgpdd # application/vnd.dvb.ipdcroaming # application/vnd.dvb.iptv.alfec-base # application/vnd.dvb.iptv.alfec-enhancement # application/vnd.dvb.notif-aggregate-root+xml # application/vnd.dvb.notif-container+xml # application/vnd.dvb.notif-generic+xml # application/vnd.dvb.notif-ia-msglist+xml # application/vnd.dvb.notif-ia-registration-request+xml # application/vnd.dvb.notif-ia-registration-response+xml # application/vnd.dvb.notif-init+xml # application/vnd.dvb.pfr application/vnd.dvb.service svc # application/vnd.dxr application/vnd.dynageo geo # application/vnd.dzr # application/vnd.easykaraoke.cdgdownload # application/vnd.ecdis-update application/vnd.ecowin.chart mag # application/vnd.ecowin.filerequest # application/vnd.ecowin.fileupdate # application/vnd.ecowin.series # application/vnd.ecowin.seriesrequest # application/vnd.ecowin.seriesupdate # application/vnd.emclient.accessrequest+xml application/vnd.enliven nml # application/vnd.enphase.envoy # application/vnd.eprints.data+xml application/vnd.epson.esf esf application/vnd.epson.msf msf application/vnd.epson.quickanime qam application/vnd.epson.salt slt application/vnd.epson.ssf ssf # application/vnd.ericsson.quickcall application/vnd.eszigno3+xml es3 et3 # application/vnd.etsi.aoc+xml # application/vnd.etsi.asic-e+zip # application/vnd.etsi.asic-s+zip # application/vnd.etsi.cug+xml # application/vnd.etsi.iptvcommand+xml # application/vnd.etsi.iptvdiscovery+xml # application/vnd.etsi.iptvprofile+xml # application/vnd.etsi.iptvsad-bc+xml # application/vnd.etsi.iptvsad-cod+xml # application/vnd.etsi.iptvsad-npvr+xml # application/vnd.etsi.iptvservice+xml # application/vnd.etsi.iptvsync+xml # application/vnd.etsi.iptvueprofile+xml # application/vnd.etsi.mcid+xml # application/vnd.etsi.mheg5 # application/vnd.etsi.overload-control-policy-dataset+xml # application/vnd.etsi.pstn+xml # application/vnd.etsi.sci+xml # application/vnd.etsi.simservs+xml # application/vnd.etsi.timestamp-token # application/vnd.etsi.tsl+xml # application/vnd.etsi.tsl.der # application/vnd.eudora.data application/vnd.ezpix-album ez2 application/vnd.ezpix-package ez3 # application/vnd.f-secure.mobile # application/vnd.fastcopy-disk-image application/vnd.fdf fdf application/vnd.fdsn.mseed mseed application/vnd.fdsn.seed seed dataless # application/vnd.ffsns # application/vnd.filmit.zfc # application/vnd.fints # application/vnd.firemonkeys.cloudcell application/vnd.flographit gph application/vnd.fluxtime.clip ftc # application/vnd.font-fontforge-sfd application/vnd.framemaker fm frame maker book application/vnd.frogans.fnc fnc application/vnd.frogans.ltf ltf application/vnd.fsc.weblaunch fsc application/vnd.fujitsu.oasys oas application/vnd.fujitsu.oasys2 oa2 application/vnd.fujitsu.oasys3 oa3 application/vnd.fujitsu.oasysgp fg5 application/vnd.fujitsu.oasysprs bh2 # application/vnd.fujixerox.art-ex # application/vnd.fujixerox.art4 application/vnd.fujixerox.ddd ddd application/vnd.fujixerox.docuworks xdw application/vnd.fujixerox.docuworks.binder xbd # application/vnd.fujixerox.docuworks.container # application/vnd.fujixerox.hbpl # application/vnd.fut-misnet application/vnd.fuzzysheet fzs application/vnd.genomatix.tuxedo txd # application/vnd.geo+json # application/vnd.geocube+xml application/vnd.geogebra.file ggb application/vnd.geogebra.tool ggt application/vnd.geometry-explorer gex gre application/vnd.geonext gxt application/vnd.geoplan g2w application/vnd.geospace g3w # application/vnd.gerber # application/vnd.globalplatform.card-content-mgt # application/vnd.globalplatform.card-content-mgt-response application/vnd.gmx gmx application/vnd.google-earth.kml+xml kml application/vnd.google-earth.kmz kmz # application/vnd.gov.sk.e-form+xml # application/vnd.gov.sk.e-form+zip # application/vnd.gov.sk.xmldatacontainer+xml application/vnd.grafeq gqf gqs # application/vnd.gridmp application/vnd.groove-account gac application/vnd.groove-help ghf application/vnd.groove-identity-message gim application/vnd.groove-injector grv application/vnd.groove-tool-message gtm application/vnd.groove-tool-template tpl application/vnd.groove-vcard vcg # application/vnd.hal+json application/vnd.hal+xml hal application/vnd.handheld-entertainment+xml zmm application/vnd.hbci hbci # application/vnd.hcl-bireports # application/vnd.hdt # application/vnd.heroku+json application/vnd.hhe.lesson-player les application/vnd.hp-hpgl hpgl application/vnd.hp-hpid hpid application/vnd.hp-hps hps application/vnd.hp-jlyt jlt application/vnd.hp-pcl pcl application/vnd.hp-pclxl pclxl # application/vnd.httphone application/vnd.hydrostatix.sof-data sfd-hdstx # application/vnd.hyperdrive+json # application/vnd.hzn-3d-crossword # application/vnd.ibm.afplinedata # application/vnd.ibm.electronic-media application/vnd.ibm.minipay mpy application/vnd.ibm.modcap afp listafp list3820 application/vnd.ibm.rights-management irm application/vnd.ibm.secure-container sc application/vnd.iccprofile icc icm # application/vnd.ieee.1905 application/vnd.igloader igl application/vnd.immervision-ivp ivp application/vnd.immervision-ivu ivu # application/vnd.ims.imsccv1p1 # application/vnd.ims.imsccv1p2 # application/vnd.ims.imsccv1p3 # application/vnd.ims.lis.v2.result+json # application/vnd.ims.lti.v2.toolconsumerprofile+json # application/vnd.ims.lti.v2.toolproxy+json # application/vnd.ims.lti.v2.toolproxy.id+json # application/vnd.ims.lti.v2.toolsettings+json # application/vnd.ims.lti.v2.toolsettings.simple+json # application/vnd.informedcontrol.rms+xml # application/vnd.informix-visionary # application/vnd.infotech.project # application/vnd.infotech.project+xml # application/vnd.innopath.wamp.notification application/vnd.insors.igm igm application/vnd.intercon.formnet xpw xpx application/vnd.intergeo i2g # application/vnd.intertrust.digibox # application/vnd.intertrust.nncp application/vnd.intu.qbo qbo application/vnd.intu.qfx qfx # application/vnd.iptc.g2.catalogitem+xml # application/vnd.iptc.g2.conceptitem+xml # application/vnd.iptc.g2.knowledgeitem+xml # application/vnd.iptc.g2.newsitem+xml # application/vnd.iptc.g2.newsmessage+xml # application/vnd.iptc.g2.packageitem+xml # application/vnd.iptc.g2.planningitem+xml application/vnd.ipunplugged.rcprofile rcprofile application/vnd.irepository.package+xml irp application/vnd.is-xpr xpr application/vnd.isac.fcs fcs application/vnd.jam jam # application/vnd.japannet-directory-service # application/vnd.japannet-jpnstore-wakeup # application/vnd.japannet-payment-wakeup # application/vnd.japannet-registration # application/vnd.japannet-registration-wakeup # application/vnd.japannet-setstore-wakeup # application/vnd.japannet-verification # application/vnd.japannet-verification-wakeup application/vnd.jcp.javame.midlet-rms rms application/vnd.jisp jisp application/vnd.joost.joda-archive joda # application/vnd.jsk.isdn-ngn application/vnd.kahootz ktz ktr application/vnd.kde.karbon karbon application/vnd.kde.kchart chrt application/vnd.kde.kformula kfo application/vnd.kde.kivio flw application/vnd.kde.kontour kon application/vnd.kde.kpresenter kpr kpt application/vnd.kde.kspread ksp application/vnd.kde.kword kwd kwt application/vnd.kenameaapp htke application/vnd.kidspiration kia application/vnd.kinar kne knp application/vnd.koan skp skd skt skm application/vnd.kodak-descriptor sse application/vnd.las.las+xml lasxml # application/vnd.liberty-request+xml application/vnd.llamagraphics.life-balance.desktop lbd application/vnd.llamagraphics.life-balance.exchange+xml lbe application/vnd.lotus-1-2-3 123 application/vnd.lotus-approach apr application/vnd.lotus-freelance pre application/vnd.lotus-notes nsf application/vnd.lotus-organizer org application/vnd.lotus-screencam scm application/vnd.lotus-wordpro lwp application/vnd.macports.portpkg portpkg # application/vnd.mapbox-vector-tile # application/vnd.marlin.drm.actiontoken+xml # application/vnd.marlin.drm.conftoken+xml # application/vnd.marlin.drm.license+xml # application/vnd.marlin.drm.mdcf # application/vnd.mason+json # application/vnd.maxmind.maxmind-db application/vnd.mcd mcd application/vnd.medcalcdata mc1 application/vnd.mediastation.cdkey cdkey # application/vnd.meridian-slingshot application/vnd.mfer mwf application/vnd.mfmp mfm # application/vnd.micro+json application/vnd.micrografx.flo flo application/vnd.micrografx.igx igx # application/vnd.microsoft.portable-executable # application/vnd.miele+json application/vnd.mif mif # application/vnd.minisoft-hp3000-save # application/vnd.mitsubishi.misty-guard.trustweb application/vnd.mobius.daf daf application/vnd.mobius.dis dis application/vnd.mobius.mbk mbk application/vnd.mobius.mqy mqy application/vnd.mobius.msl msl application/vnd.mobius.plc plc application/vnd.mobius.txf txf application/vnd.mophun.application mpn application/vnd.mophun.certificate mpc # application/vnd.motorola.flexsuite # application/vnd.motorola.flexsuite.adsi # application/vnd.motorola.flexsuite.fis # application/vnd.motorola.flexsuite.gotap # application/vnd.motorola.flexsuite.kmr # application/vnd.motorola.flexsuite.ttc # application/vnd.motorola.flexsuite.wem # application/vnd.motorola.iprm application/vnd.mozilla.xul+xml xul # application/vnd.ms-3mfdocument application/vnd.ms-artgalry cil # application/vnd.ms-asf application/vnd.ms-cab-compressed cab # application/vnd.ms-color.iccprofile application/vnd.ms-excel xls xlm xla xlc xlt xlw application/vnd.ms-excel.addin.macroenabled.12 xlam application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb application/vnd.ms-excel.sheet.macroenabled.12 xlsm application/vnd.ms-excel.template.macroenabled.12 xltm application/vnd.ms-fontobject eot application/vnd.ms-htmlhelp chm application/vnd.ms-ims ims application/vnd.ms-lrm lrm # application/vnd.ms-office.activex+xml application/vnd.ms-officetheme thmx # application/vnd.ms-opentype # application/vnd.ms-package.obfuscated-opentype application/vnd.ms-pki.seccat cat application/vnd.ms-pki.stl stl # application/vnd.ms-playready.initiator+xml application/vnd.ms-powerpoint ppt pps pot application/vnd.ms-powerpoint.addin.macroenabled.12 ppam application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm application/vnd.ms-powerpoint.slide.macroenabled.12 sldm application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm application/vnd.ms-powerpoint.template.macroenabled.12 potm # application/vnd.ms-printdevicecapabilities+xml # application/vnd.ms-printing.printticket+xml # application/vnd.ms-printschematicket+xml application/vnd.ms-project mpp mpt # application/vnd.ms-tnef # application/vnd.ms-windows.devicepairing # application/vnd.ms-windows.nwprinting.oob # application/vnd.ms-windows.printerpairing # application/vnd.ms-windows.wsd.oob # application/vnd.ms-wmdrm.lic-chlg-req # application/vnd.ms-wmdrm.lic-resp # application/vnd.ms-wmdrm.meter-chlg-req # application/vnd.ms-wmdrm.meter-resp application/vnd.ms-word.document.macroenabled.12 docm application/vnd.ms-word.template.macroenabled.12 dotm application/vnd.ms-works wps wks wcm wdb application/vnd.ms-wpl wpl application/vnd.ms-xpsdocument xps # application/vnd.msa-disk-image application/vnd.mseq mseq # application/vnd.msign # application/vnd.multiad.creator # application/vnd.multiad.creator.cif # application/vnd.music-niff application/vnd.musician mus application/vnd.muvee.style msty application/vnd.mynfc taglet # application/vnd.ncd.control # application/vnd.ncd.reference # application/vnd.nervana # application/vnd.netfpx application/vnd.neurolanguage.nlu nlu # application/vnd.nintendo.nitro.rom # application/vnd.nintendo.snes.rom application/vnd.nitf ntf nitf application/vnd.noblenet-directory nnd application/vnd.noblenet-sealer nns application/vnd.noblenet-web nnw # application/vnd.nokia.catalogs # application/vnd.nokia.conml+wbxml # application/vnd.nokia.conml+xml # application/vnd.nokia.iptv.config+xml # application/vnd.nokia.isds-radio-presets # application/vnd.nokia.landmark+wbxml # application/vnd.nokia.landmark+xml # application/vnd.nokia.landmarkcollection+xml # application/vnd.nokia.n-gage.ac+xml application/vnd.nokia.n-gage.data ngdat application/vnd.nokia.n-gage.symbian.install n-gage # application/vnd.nokia.ncd # application/vnd.nokia.pcd+wbxml # application/vnd.nokia.pcd+xml application/vnd.nokia.radio-preset rpst application/vnd.nokia.radio-presets rpss application/vnd.novadigm.edm edm application/vnd.novadigm.edx edx application/vnd.novadigm.ext ext # application/vnd.ntt-local.content-share # application/vnd.ntt-local.file-transfer # application/vnd.ntt-local.ogw_remote-access # application/vnd.ntt-local.sip-ta_remote # application/vnd.ntt-local.sip-ta_tcp_stream application/vnd.oasis.opendocument.chart odc application/vnd.oasis.opendocument.chart-template otc application/vnd.oasis.opendocument.database odb application/vnd.oasis.opendocument.formula odf application/vnd.oasis.opendocument.formula-template odft application/vnd.oasis.opendocument.graphics odg application/vnd.oasis.opendocument.graphics-template otg application/vnd.oasis.opendocument.image odi application/vnd.oasis.opendocument.image-template oti application/vnd.oasis.opendocument.presentation odp application/vnd.oasis.opendocument.presentation-template otp application/vnd.oasis.opendocument.spreadsheet ods application/vnd.oasis.opendocument.spreadsheet-template ots application/vnd.oasis.opendocument.text odt application/vnd.oasis.opendocument.text-master odm application/vnd.oasis.opendocument.text-template ott application/vnd.oasis.opendocument.text-web oth # application/vnd.obn # application/vnd.oftn.l10n+json # application/vnd.oipf.contentaccessdownload+xml # application/vnd.oipf.contentaccessstreaming+xml # application/vnd.oipf.cspg-hexbinary # application/vnd.oipf.dae.svg+xml # application/vnd.oipf.dae.xhtml+xml # application/vnd.oipf.mippvcontrolmessage+xml # application/vnd.oipf.pae.gem # application/vnd.oipf.spdiscovery+xml # application/vnd.oipf.spdlist+xml # application/vnd.oipf.ueprofile+xml # application/vnd.oipf.userprofile+xml application/vnd.olpc-sugar xo # application/vnd.oma-scws-config # application/vnd.oma-scws-http-request # application/vnd.oma-scws-http-response # application/vnd.oma.bcast.associated-procedure-parameter+xml # application/vnd.oma.bcast.drm-trigger+xml # application/vnd.oma.bcast.imd+xml # application/vnd.oma.bcast.ltkm # application/vnd.oma.bcast.notification+xml # application/vnd.oma.bcast.provisioningtrigger # application/vnd.oma.bcast.sgboot # application/vnd.oma.bcast.sgdd+xml # application/vnd.oma.bcast.sgdu # application/vnd.oma.bcast.simple-symbol-container # application/vnd.oma.bcast.smartcard-trigger+xml # application/vnd.oma.bcast.sprov+xml # application/vnd.oma.bcast.stkm # application/vnd.oma.cab-address-book+xml # application/vnd.oma.cab-feature-handler+xml # application/vnd.oma.cab-pcc+xml # application/vnd.oma.cab-subs-invite+xml # application/vnd.oma.cab-user-prefs+xml # application/vnd.oma.dcd # application/vnd.oma.dcdc application/vnd.oma.dd2+xml dd2 # application/vnd.oma.drm.risd+xml # application/vnd.oma.group-usage-list+xml # application/vnd.oma.lwm2m+json # application/vnd.oma.lwm2m+tlv # application/vnd.oma.pal+xml # application/vnd.oma.poc.detailed-progress-report+xml # application/vnd.oma.poc.final-report+xml # application/vnd.oma.poc.groups+xml # application/vnd.oma.poc.invocation-descriptor+xml # application/vnd.oma.poc.optimized-progress-report+xml # application/vnd.oma.push # application/vnd.oma.scidm.messages+xml # application/vnd.oma.xcap-directory+xml # application/vnd.omads-email+xml # application/vnd.omads-file+xml # application/vnd.omads-folder+xml # application/vnd.omaloc-supl-init # application/vnd.onepager # application/vnd.openblox.game+xml # application/vnd.openblox.game-binary # application/vnd.openeye.oeb application/vnd.openofficeorg.extension oxt # application/vnd.openxmlformats-officedocument.custom-properties+xml # application/vnd.openxmlformats-officedocument.customxmlproperties+xml # application/vnd.openxmlformats-officedocument.drawing+xml # application/vnd.openxmlformats-officedocument.drawingml.chart+xml # application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml # application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml # application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml # application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml # application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml # application/vnd.openxmlformats-officedocument.extended-properties+xml # application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml # application/vnd.openxmlformats-officedocument.presentationml.comments+xml # application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml # application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml # application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml application/vnd.openxmlformats-officedocument.presentationml.presentation pptx # application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml # application/vnd.openxmlformats-officedocument.presentationml.presprops+xml application/vnd.openxmlformats-officedocument.presentationml.slide sldx # application/vnd.openxmlformats-officedocument.presentationml.slide+xml # application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml # application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx # application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml # application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml # application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml # application/vnd.openxmlformats-officedocument.presentationml.tags+xml application/vnd.openxmlformats-officedocument.presentationml.template potx # application/vnd.openxmlformats-officedocument.presentationml.template.main+xml # application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx # application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx # application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml # application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml # application/vnd.openxmlformats-officedocument.theme+xml # application/vnd.openxmlformats-officedocument.themeoverride+xml # application/vnd.openxmlformats-officedocument.vmldrawing # application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml application/vnd.openxmlformats-officedocument.wordprocessingml.document docx # application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml # application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml # application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml # application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml # application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml # application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml # application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml # application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml # application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx # application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml # application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml # application/vnd.openxmlformats-package.core-properties+xml # application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml # application/vnd.openxmlformats-package.relationships+xml # application/vnd.oracle.resource+json # application/vnd.orange.indata # application/vnd.osa.netdeploy application/vnd.osgeo.mapguide.package mgp # application/vnd.osgi.bundle application/vnd.osgi.dp dp application/vnd.osgi.subsystem esa # application/vnd.otps.ct-kip+xml # application/vnd.oxli.countgraph # application/vnd.pagerduty+json application/vnd.palm pdb pqa oprc # application/vnd.panoply # application/vnd.paos.xml application/vnd.pawaafile paw # application/vnd.pcos application/vnd.pg.format str application/vnd.pg.osasli ei6 # application/vnd.piaccess.application-licence application/vnd.picsel efif application/vnd.pmi.widget wg # application/vnd.poc.group-advertisement+xml application/vnd.pocketlearn plf application/vnd.powerbuilder6 pbd # application/vnd.powerbuilder6-s # application/vnd.powerbuilder7 # application/vnd.powerbuilder7-s # application/vnd.powerbuilder75 # application/vnd.powerbuilder75-s # application/vnd.preminet application/vnd.previewsystems.box box application/vnd.proteus.magazine mgz application/vnd.publishare-delta-tree qps application/vnd.pvi.ptid1 ptid # application/vnd.pwg-multiplexed # application/vnd.pwg-xhtml-print+xml # application/vnd.qualcomm.brew-app-res # application/vnd.quarantainenet application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb # application/vnd.quobject-quoxdocument # application/vnd.radisys.moml+xml # application/vnd.radisys.msml+xml # application/vnd.radisys.msml-audit+xml # application/vnd.radisys.msml-audit-conf+xml # application/vnd.radisys.msml-audit-conn+xml # application/vnd.radisys.msml-audit-dialog+xml # application/vnd.radisys.msml-audit-stream+xml # application/vnd.radisys.msml-conf+xml # application/vnd.radisys.msml-dialog+xml # application/vnd.radisys.msml-dialog-base+xml # application/vnd.radisys.msml-dialog-fax-detect+xml # application/vnd.radisys.msml-dialog-fax-sendrecv+xml # application/vnd.radisys.msml-dialog-group+xml # application/vnd.radisys.msml-dialog-speech+xml # application/vnd.radisys.msml-dialog-transform+xml # application/vnd.rainstor.data # application/vnd.rapid # application/vnd.rar application/vnd.realvnc.bed bed application/vnd.recordare.musicxml mxl application/vnd.recordare.musicxml+xml musicxml # application/vnd.renlearn.rlprint application/vnd.rig.cryptonote cryptonote application/vnd.rim.cod cod application/vnd.rn-realmedia rm application/vnd.rn-realmedia-vbr rmvb application/vnd.route66.link66+xml link66 # application/vnd.rs-274x # application/vnd.ruckus.download # application/vnd.s3sms application/vnd.sailingtracker.track st # application/vnd.sbm.cid # application/vnd.sbm.mid2 # application/vnd.scribus # application/vnd.sealed.3df # application/vnd.sealed.csf # application/vnd.sealed.doc # application/vnd.sealed.eml # application/vnd.sealed.mht # application/vnd.sealed.net # application/vnd.sealed.ppt # application/vnd.sealed.tiff # application/vnd.sealed.xls # application/vnd.sealedmedia.softseal.html # application/vnd.sealedmedia.softseal.pdf application/vnd.seemail see application/vnd.sema sema application/vnd.semd semd application/vnd.semf semf application/vnd.shana.informed.formdata ifm application/vnd.shana.informed.formtemplate itp application/vnd.shana.informed.interchange iif application/vnd.shana.informed.package ipk application/vnd.simtech-mindmapper twd twds # application/vnd.siren+json application/vnd.smaf mmf # application/vnd.smart.notebook application/vnd.smart.teacher teacher # application/vnd.software602.filler.form+xml # application/vnd.software602.filler.form-xml-zip application/vnd.solent.sdkm+xml sdkm sdkd application/vnd.spotfire.dxp dxp application/vnd.spotfire.sfs sfs # application/vnd.sss-cod # application/vnd.sss-dtf # application/vnd.sss-ntf application/vnd.stardivision.calc sdc application/vnd.stardivision.draw sda application/vnd.stardivision.impress sdd application/vnd.stardivision.math smf application/vnd.stardivision.writer sdw vor application/vnd.stardivision.writer-global sgl application/vnd.stepmania.package smzip application/vnd.stepmania.stepchart sm # application/vnd.street-stream # application/vnd.sun.wadl+xml application/vnd.sun.xml.calc sxc application/vnd.sun.xml.calc.template stc application/vnd.sun.xml.draw sxd application/vnd.sun.xml.draw.template std application/vnd.sun.xml.impress sxi application/vnd.sun.xml.impress.template sti application/vnd.sun.xml.math sxm application/vnd.sun.xml.writer sxw application/vnd.sun.xml.writer.global sxg application/vnd.sun.xml.writer.template stw application/vnd.sus-calendar sus susp application/vnd.svd svd # application/vnd.swiftview-ics application/vnd.symbian.install sis sisx application/vnd.syncml+xml xsm application/vnd.syncml.dm+wbxml bdm application/vnd.syncml.dm+xml xdm # application/vnd.syncml.dm.notification # application/vnd.syncml.dmddf+wbxml # application/vnd.syncml.dmddf+xml # application/vnd.syncml.dmtnds+wbxml # application/vnd.syncml.dmtnds+xml # application/vnd.syncml.ds.notification application/vnd.tao.intent-module-archive tao application/vnd.tcpdump.pcap pcap cap dmp # application/vnd.tmd.mediaflex.api+xml # application/vnd.tml application/vnd.tmobile-livetv tmo application/vnd.trid.tpt tpt application/vnd.triscape.mxs mxs application/vnd.trueapp tra # application/vnd.truedoc # application/vnd.ubisoft.webplayer application/vnd.ufdl ufd ufdl application/vnd.uiq.theme utz application/vnd.umajin umj application/vnd.unity unityweb application/vnd.uoml+xml uoml # application/vnd.uplanet.alert # application/vnd.uplanet.alert-wbxml # application/vnd.uplanet.bearer-choice # application/vnd.uplanet.bearer-choice-wbxml # application/vnd.uplanet.cacheop # application/vnd.uplanet.cacheop-wbxml # application/vnd.uplanet.channel # application/vnd.uplanet.channel-wbxml # application/vnd.uplanet.list # application/vnd.uplanet.list-wbxml # application/vnd.uplanet.listcmd # application/vnd.uplanet.listcmd-wbxml # application/vnd.uplanet.signal # application/vnd.uri-map # application/vnd.valve.source.material application/vnd.vcx vcx # application/vnd.vd-study # application/vnd.vectorworks # application/vnd.vel+json # application/vnd.verimatrix.vcas # application/vnd.vidsoft.vidconference application/vnd.visio vsd vst vss vsw application/vnd.visionary vis # application/vnd.vividence.scriptfile application/vnd.vsf vsf # application/vnd.wap.sic # application/vnd.wap.slc application/vnd.wap.wbxml wbxml application/vnd.wap.wmlc wmlc application/vnd.wap.wmlscriptc wmlsc application/vnd.webturbo wtb # application/vnd.wfa.p2p # application/vnd.wfa.wsc # application/vnd.windows.devicepairing # application/vnd.wmc # application/vnd.wmf.bootstrap # application/vnd.wolfram.mathematica # application/vnd.wolfram.mathematica.package application/vnd.wolfram.player nbp application/vnd.wordperfect wpd application/vnd.wqd wqd # application/vnd.wrq-hp3000-labelled application/vnd.wt.stf stf # application/vnd.wv.csp+wbxml # application/vnd.wv.csp+xml # application/vnd.wv.ssp+xml # application/vnd.xacml+json application/vnd.xara xar application/vnd.xfdl xfdl # application/vnd.xfdl.webform # application/vnd.xmi+xml # application/vnd.xmpie.cpkg # application/vnd.xmpie.dpkg # application/vnd.xmpie.plan # application/vnd.xmpie.ppkg # application/vnd.xmpie.xlim application/vnd.yamaha.hv-dic hvd application/vnd.yamaha.hv-script hvs application/vnd.yamaha.hv-voice hvp application/vnd.yamaha.openscoreformat osf application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg # application/vnd.yamaha.remote-setup application/vnd.yamaha.smaf-audio saf application/vnd.yamaha.smaf-phrase spf # application/vnd.yamaha.through-ngn # application/vnd.yamaha.tunnel-udpencap # application/vnd.yaoweme application/vnd.yellowriver-custom-menu cmp application/vnd.zul zir zirz application/vnd.zzazz.deck+xml zaz application/voicexml+xml vxml # application/vq-rtcpxr # application/watcherinfo+xml # application/whoispp-query # application/whoispp-response application/widget wgt application/winhlp hlp # application/wita # application/wordperfect5.1 application/wsdl+xml wsdl application/wspolicy+xml wspolicy application/x-7z-compressed 7z application/x-abiword abw application/x-ace-compressed ace # application/x-amf application/x-apple-diskimage dmg application/x-authorware-bin aab x32 u32 vox application/x-authorware-map aam application/x-authorware-seg aas application/x-bcpio bcpio application/x-bittorrent torrent application/x-blorb blb blorb application/x-bzip bz application/x-bzip2 bz2 boz application/x-cbr cbr cba cbt cbz cb7 application/x-cdlink vcd application/x-cfs-compressed cfs application/x-chat chat application/x-chess-pgn pgn # application/x-compress application/x-conference nsc application/x-cpio cpio application/x-csh csh application/x-debian-package deb udeb application/x-dgc-compressed dgc application/x-director dir dcr dxr cst cct cxt w3d fgd swa application/x-doom wad application/x-dtbncx+xml ncx application/x-dtbook+xml dtb application/x-dtbresource+xml res application/x-dvi dvi application/x-envoy evy application/x-eva eva application/x-font-bdf bdf # application/x-font-dos # application/x-font-framemaker application/x-font-ghostscript gsf # application/x-font-libgrx application/x-font-linux-psf psf application/x-font-pcf pcf application/x-font-snf snf # application/x-font-speedo # application/x-font-sunos-news application/x-font-type1 pfa pfb pfm afm # application/x-font-vfont application/x-freearc arc application/x-futuresplash spl application/x-gca-compressed gca application/x-glulx ulx application/x-gnumeric gnumeric application/x-gramps-xml gramps application/x-gtar gtar # application/x-gzip application/x-hdf hdf application/x-install-instructions install application/x-iso9660-image iso application/x-java-jnlp-file jnlp application/x-latex latex application/x-lzh-compressed lzh lha application/x-mie mie application/x-mobipocket-ebook prc mobi application/x-ms-application application application/x-ms-shortcut lnk application/x-ms-wmd wmd application/x-ms-wmz wmz application/x-ms-xbap xbap application/x-msaccess mdb application/x-msbinder obd application/x-mscardfile crd application/x-msclip clp application/x-msdownload exe dll com bat msi application/x-msmediaview mvb m13 m14 application/x-msmetafile wmf wmz emf emz application/x-msmoney mny application/x-mspublisher pub application/x-msschedule scd application/x-msterminal trm application/x-mswrite wri application/x-netcdf nc cdf application/x-nzb nzb application/x-pkcs12 p12 pfx application/x-pkcs7-certificates p7b spc application/x-pkcs7-certreqresp p7r application/x-rar-compressed rar application/x-research-info-systems ris application/x-sh sh application/x-shar shar application/x-shockwave-flash swf application/x-silverlight-app xap application/x-sql sql application/x-stuffit sit application/x-stuffitx sitx application/x-subrip srt application/x-sv4cpio sv4cpio application/x-sv4crc sv4crc application/x-t3vm-image t3 application/x-tads gam application/x-tar tar application/x-tcl tcl application/x-tex tex application/x-tex-tfm tfm application/x-texinfo texinfo texi application/x-tgif obj application/x-ustar ustar application/x-wais-source src # application/x-www-form-urlencoded application/x-x509-ca-cert der crt application/x-xfig fig application/x-xliff+xml xlf application/x-xpinstall xpi application/x-xz xz application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 # application/x400-bp # application/xacml+xml application/xaml+xml xaml # application/xcap-att+xml # application/xcap-caps+xml application/xcap-diff+xml xdf # application/xcap-el+xml # application/xcap-error+xml # application/xcap-ns+xml # application/xcon-conference-info+xml # application/xcon-conference-info-diff+xml application/xenc+xml xenc application/xhtml+xml xhtml xht # application/xhtml-voice+xml application/xml xml xsl application/xml-dtd dtd # application/xml-external-parsed-entity # application/xml-patch+xml # application/xmpp+xml application/xop+xml xop application/xproc+xml xpl application/xslt+xml xslt application/xspf+xml xspf application/xv+xml mxml xhvml xvml xvm application/yang yang application/yin+xml yin application/zip zip # application/zlib # audio/1d-interleaved-parityfec # audio/32kadpcm # audio/3gpp # audio/3gpp2 # audio/ac3 audio/adpcm adp # audio/amr # audio/amr-wb # audio/amr-wb+ # audio/aptx # audio/asc # audio/atrac-advanced-lossless # audio/atrac-x # audio/atrac3 audio/basic au snd # audio/bv16 # audio/bv32 # audio/clearmode # audio/cn # audio/dat12 # audio/dls # audio/dsr-es201108 # audio/dsr-es202050 # audio/dsr-es202211 # audio/dsr-es202212 # audio/dv # audio/dvi4 # audio/eac3 # audio/encaprtp # audio/evrc # audio/evrc-qcp # audio/evrc0 # audio/evrc1 # audio/evrcb # audio/evrcb0 # audio/evrcb1 # audio/evrcnw # audio/evrcnw0 # audio/evrcnw1 # audio/evrcwb # audio/evrcwb0 # audio/evrcwb1 # audio/evs # audio/example # audio/fwdred # audio/g711-0 # audio/g719 # audio/g722 # audio/g7221 # audio/g723 # audio/g726-16 # audio/g726-24 # audio/g726-32 # audio/g726-40 # audio/g728 # audio/g729 # audio/g7291 # audio/g729d # audio/g729e # audio/gsm # audio/gsm-efr # audio/gsm-hr-08 # audio/ilbc # audio/ip-mr_v2.5 # audio/isac # audio/l16 # audio/l20 # audio/l24 # audio/l8 # audio/lpc audio/midi mid midi kar rmi # audio/mobile-xmf audio/mp4 m4a mp4a # audio/mp4a-latm # audio/mpa # audio/mpa-robust audio/mpeg mpga mp2 mp2a mp3 m2a m3a # audio/mpeg4-generic # audio/musepack audio/ogg oga ogg spx # audio/opus # audio/parityfec # audio/pcma # audio/pcma-wb # audio/pcmu # audio/pcmu-wb # audio/prs.sid # audio/qcelp # audio/raptorfec # audio/red # audio/rtp-enc-aescm128 # audio/rtp-midi # audio/rtploopback # audio/rtx audio/s3m s3m audio/silk sil # audio/smv # audio/smv-qcp # audio/smv0 # audio/sp-midi # audio/speex # audio/t140c # audio/t38 # audio/telephone-event # audio/tone # audio/uemclip # audio/ulpfec # audio/vdvi # audio/vmr-wb # audio/vnd.3gpp.iufp # audio/vnd.4sb # audio/vnd.audiokoz # audio/vnd.celp # audio/vnd.cisco.nse # audio/vnd.cmles.radio-events # audio/vnd.cns.anp1 # audio/vnd.cns.inf1 audio/vnd.dece.audio uva uvva audio/vnd.digital-winds eol # audio/vnd.dlna.adts # audio/vnd.dolby.heaac.1 # audio/vnd.dolby.heaac.2 # audio/vnd.dolby.mlp # audio/vnd.dolby.mps # audio/vnd.dolby.pl2 # audio/vnd.dolby.pl2x # audio/vnd.dolby.pl2z # audio/vnd.dolby.pulse.1 audio/vnd.dra dra audio/vnd.dts dts audio/vnd.dts.hd dtshd # audio/vnd.dvb.file # audio/vnd.everad.plj # audio/vnd.hns.audio audio/vnd.lucent.voice lvp audio/vnd.ms-playready.media.pya pya # audio/vnd.nokia.mobile-xmf # audio/vnd.nortel.vbk audio/vnd.nuera.ecelp4800 ecelp4800 audio/vnd.nuera.ecelp7470 ecelp7470 audio/vnd.nuera.ecelp9600 ecelp9600 # audio/vnd.octel.sbc # audio/vnd.qcelp # audio/vnd.rhetorex.32kadpcm audio/vnd.rip rip # audio/vnd.sealedmedia.softseal.mpeg # audio/vnd.vmx.cvsd # audio/vorbis # audio/vorbis-config audio/webm weba audio/x-aac aac audio/x-aiff aif aiff aifc audio/x-caf caf audio/x-flac flac audio/x-matroska mka audio/x-mpegurl m3u audio/x-ms-wax wax audio/x-ms-wma wma audio/x-pn-realaudio ram ra audio/x-pn-realaudio-plugin rmp # audio/x-tta audio/x-wav wav audio/xm xm chemical/x-cdx cdx chemical/x-cif cif chemical/x-cmdf cmdf chemical/x-cml cml chemical/x-csml csml # chemical/x-pdb chemical/x-xyz xyz font/collection ttc font/otf otf # font/sfnt font/ttf ttf font/woff woff font/woff2 woff2 image/bmp bmp image/cgm cgm # image/dicom-rle # image/emf # image/example # image/fits image/g3fax g3 image/gif gif image/ief ief # image/jls # image/jp2 image/jpeg jpeg jpg jpe # image/jpm # image/jpx image/ktx ktx # image/naplps image/png png image/prs.btif btif # image/prs.pti # image/pwg-raster image/sgi sgi image/svg+xml svg svgz # image/t38 image/tiff tiff tif # image/tiff-fx image/vnd.adobe.photoshop psd # image/vnd.airzip.accelerator.azv # image/vnd.cns.inf2 image/vnd.dece.graphic uvi uvvi uvg uvvg image/vnd.djvu djvu djv image/vnd.dvb.subtitle sub image/vnd.dwg dwg image/vnd.dxf dxf image/vnd.fastbidsheet fbs image/vnd.fpx fpx image/vnd.fst fst image/vnd.fujixerox.edmics-mmr mmr image/vnd.fujixerox.edmics-rlc rlc # image/vnd.globalgraphics.pgb # image/vnd.microsoft.icon # image/vnd.mix # image/vnd.mozilla.apng image/vnd.ms-modi mdi image/vnd.ms-photo wdp image/vnd.net-fpx npx # image/vnd.radiance # image/vnd.sealed.png # image/vnd.sealedmedia.softseal.gif # image/vnd.sealedmedia.softseal.jpg # image/vnd.svf # image/vnd.tencent.tap # image/vnd.valve.source.texture image/vnd.wap.wbmp wbmp image/vnd.xiff xif # image/vnd.zbrush.pcx image/webp webp # image/wmf image/x-3ds 3ds image/x-cmu-raster ras image/x-cmx cmx image/x-freehand fh fhc fh4 fh5 fh7 image/x-icon ico image/x-mrsid-image sid image/x-pcx pcx image/x-pict pic pct image/x-portable-anymap pnm image/x-portable-bitmap pbm image/x-portable-graymap pgm image/x-portable-pixmap ppm image/x-rgb rgb image/x-tga tga image/x-xbitmap xbm image/x-xpixmap xpm image/x-xwindowdump xwd # message/cpim # message/delivery-status # message/disposition-notification # message/example # message/external-body # message/feedback-report # message/global # message/global-delivery-status # message/global-disposition-notification # message/global-headers # message/http # message/imdn+xml # message/news # message/partial message/rfc822 eml mime # message/s-http # message/sip # message/sipfrag # message/tracking-status # message/vnd.si.simp # message/vnd.wfa.wsc # model/example # model/gltf+json model/iges igs iges model/mesh msh mesh silo model/vnd.collada+xml dae model/vnd.dwf dwf # model/vnd.flatland.3dml model/vnd.gdl gdl # model/vnd.gs-gdl # model/vnd.gs.gdl model/vnd.gtw gtw # model/vnd.moml+xml model/vnd.mts mts # model/vnd.opengex # model/vnd.parasolid.transmit.binary # model/vnd.parasolid.transmit.text # model/vnd.rosette.annotated-data-model # model/vnd.valve.source.compiled-map model/vnd.vtu vtu model/vrml wrl vrml model/x3d+binary x3db x3dbz # model/x3d+fastinfoset model/x3d+vrml x3dv x3dvz model/x3d+xml x3d x3dz # model/x3d-vrml # multipart/alternative # multipart/appledouble # multipart/byteranges # multipart/digest # multipart/encrypted # multipart/example # multipart/form-data # multipart/header-set # multipart/mixed # multipart/parallel # multipart/related # multipart/report # multipart/signed # multipart/voice-message # multipart/x-mixed-replace # text/1d-interleaved-parityfec text/cache-manifest appcache text/calendar ics ifb text/css css text/csv csv # text/csv-schema # text/directory # text/dns # text/ecmascript # text/encaprtp # text/enriched # text/example # text/fwdred # text/grammar-ref-list text/html html htm # text/javascript # text/jcr-cnd # text/markdown # text/mizar text/n3 n3 # text/parameters # text/parityfec text/plain txt text conf def list log in # text/provenance-notation # text/prs.fallenstein.rst text/prs.lines.tag dsc # text/prs.prop.logic # text/raptorfec # text/red # text/rfc822-headers text/richtext rtx # text/rtf # text/rtp-enc-aescm128 # text/rtploopback # text/rtx text/sgml sgml sgm # text/t140 text/tab-separated-values tsv text/troff t tr roff man me ms text/turtle ttl # text/ulpfec text/uri-list uri uris urls text/vcard vcard # text/vnd.a # text/vnd.abc text/vnd.curl curl text/vnd.curl.dcurl dcurl text/vnd.curl.mcurl mcurl text/vnd.curl.scurl scurl # text/vnd.debian.copyright # text/vnd.dmclientscript text/vnd.dvb.subtitle sub # text/vnd.esmertec.theme-descriptor text/vnd.fly fly text/vnd.fmi.flexstor flx text/vnd.graphviz gv text/vnd.in3d.3dml 3dml text/vnd.in3d.spot spot # text/vnd.iptc.newsml # text/vnd.iptc.nitf # text/vnd.latex-z # text/vnd.motorola.reflex # text/vnd.ms-mediapackage # text/vnd.net2phone.commcenter.command # text/vnd.radisys.msml-basic-layout # text/vnd.si.uricatalogue text/vnd.sun.j2me.app-descriptor jad # text/vnd.trolltech.linguist # text/vnd.wap.si # text/vnd.wap.sl text/vnd.wap.wml wml text/vnd.wap.wmlscript wmls text/x-asm s asm text/x-c c cc cxx cpp h hh dic text/x-fortran f for f77 f90 text/x-java-source java text/x-nfo nfo text/x-opml opml text/x-pascal p pas text/x-setext etx text/x-sfv sfv text/x-uuencode uu text/x-vcalendar vcs text/x-vcard vcf # text/xml # text/xml-external-parsed-entity # video/1d-interleaved-parityfec video/3gpp 3gp # video/3gpp-tt video/3gpp2 3g2 # video/bmpeg # video/bt656 # video/celb # video/dv # video/encaprtp # video/example video/h261 h261 video/h263 h263 # video/h263-1998 # video/h263-2000 video/h264 h264 # video/h264-rcdo # video/h264-svc # video/h265 # video/iso.segment video/jpeg jpgv # video/jpeg2000 video/jpm jpm jpgm video/mj2 mj2 mjp2 # video/mp1s # video/mp2p # video/mp2t video/mp4 mp4 mp4v mpg4 # video/mp4v-es video/mpeg mpeg mpg mpe m1v m2v # video/mpeg4-generic # video/mpv # video/nv video/ogg ogv # video/parityfec # video/pointer video/quicktime qt mov # video/raptorfec # video/raw # video/rtp-enc-aescm128 # video/rtploopback # video/rtx # video/smpte292m # video/ulpfec # video/vc1 # video/vnd.cctv video/vnd.dece.hd uvh uvvh video/vnd.dece.mobile uvm uvvm # video/vnd.dece.mp4 video/vnd.dece.pd uvp uvvp video/vnd.dece.sd uvs uvvs video/vnd.dece.video uvv uvvv # video/vnd.directv.mpeg # video/vnd.directv.mpeg-tts # video/vnd.dlna.mpeg-tts video/vnd.dvb.file dvb video/vnd.fvt fvt # video/vnd.hns.video # video/vnd.iptvforum.1dparityfec-1010 # video/vnd.iptvforum.1dparityfec-2005 # video/vnd.iptvforum.2dparityfec-1010 # video/vnd.iptvforum.2dparityfec-2005 # video/vnd.iptvforum.ttsavc # video/vnd.iptvforum.ttsmpeg2 # video/vnd.motorola.video # video/vnd.motorola.videop video/vnd.mpegurl mxu m4u video/vnd.ms-playready.media.pyv pyv # video/vnd.nokia.interleaved-multimedia # video/vnd.nokia.videovoip # video/vnd.objectvideo # video/vnd.radgamettools.bink # video/vnd.radgamettools.smacker # video/vnd.sealed.mpeg1 # video/vnd.sealed.mpeg4 # video/vnd.sealed.swf # video/vnd.sealedmedia.softseal.mov video/vnd.uvvu.mp4 uvu uvvu video/vnd.vivo viv # video/vp8 video/webm webm video/x-f4v f4v video/x-fli fli video/x-flv flv video/x-m4v m4v video/x-matroska mkv mk3d mks video/x-mng mng video/x-ms-asf asf asx video/x-ms-vob vob video/x-ms-wm wm video/x-ms-wmv wmv video/x-ms-wmx wmx video/x-ms-wvx wvx video/x-msvideo avi video/x-sgi-movie movie video/x-smv smv x-conference/x-cooltalk ice webdav-client-python-3-3.14.6/conf/original/000077500000000000000000000000001410526511000205345ustar00rootroot00000000000000webdav-client-python-3-3.14.6/conf/original/extra/000077500000000000000000000000001410526511000216575ustar00rootroot00000000000000webdav-client-python-3-3.14.6/conf/original/extra/httpd-autoindex.conf000066400000000000000000000054721410526511000256570ustar00rootroot00000000000000# # Directives controlling the display of server-generated directory listings. # # Required modules: mod_authz_core, mod_authz_host, # mod_autoindex, mod_alias # # To see the listing of a directory, the Options directive for the # directory must include "Indexes", and the directory must not contain # a file matching those listed in the DirectoryIndex directive. # # # IndexOptions: Controls the appearance of server-generated directory # listings. # IndexOptions FancyIndexing HTMLTable VersionSort # We include the /icons/ alias for FancyIndexed directory listings. If # you do not use FancyIndexing, you may comment this out. # Alias /icons/ "/usr/local/apache2/icons/" Options Indexes MultiViews AllowOverride None Require all granted # # AddIcon* directives tell the server which icon to show for different # files or filename extensions. These are only displayed for # FancyIndexed directories. # AddIconByEncoding (CMP, /icons/compressed.gif) x-compress x-gzip AddIconByType (TXT, /icons/text.gif) text/* AddIconByType (IMG, /icons/image2.gif) image/* AddIconByType (SND, /icons/sound2.gif) audio/* AddIconByType (VID, /icons/movie.gif) video/* AddIcon /icons/binary.gif .bin .exe AddIcon /icons/binhex.gif .hqx AddIcon /icons/tar.gif .tar AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip AddIcon /icons/a.gif .ps .ai .eps AddIcon /icons/layout.gif .html .shtml .htm .pdf AddIcon /icons/text.gif .txt AddIcon /icons/c.gif .c AddIcon /icons/p.gif .pl .py AddIcon /icons/f.gif .for AddIcon /icons/dvi.gif .dvi AddIcon /icons/uuencoded.gif .uu AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl AddIcon /icons/tex.gif .tex AddIcon /icons/bomb.gif core AddIcon /icons/back.gif .. AddIcon /icons/hand.right.gif README AddIcon /icons/folder.gif ^^DIRECTORY^^ AddIcon /icons/blank.gif ^^BLANKICON^^ # # DefaultIcon is which icon to show for files which do not have an icon # explicitly set. # DefaultIcon /icons/unknown.gif # # AddDescription allows you to place a short description after a file in # server-generated indexes. These are only displayed for FancyIndexed # directories. # Format: AddDescription "description" filename # #AddDescription "GZIP compressed document" .gz #AddDescription "tar archive" .tar #AddDescription "GZIP compressed tar archive" .tgz # # ReadmeName is the name of the README file the server will look for by # default, and append to directory listings. # # HeaderName is the name of a file which should be prepended to # directory indexes. ReadmeName README.html HeaderName HEADER.html # # IndexIgnore is a set of filenames which directory indexing should ignore # and not include in the listing. Shell-style wildcarding is permitted. # IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t webdav-client-python-3-3.14.6/conf/original/extra/httpd-dav.conf000066400000000000000000000033351410526511000244250ustar00rootroot00000000000000# # Distributed authoring and versioning (WebDAV) # # Required modules: mod_alias, mod_auth_digest, mod_authn_core, mod_authn_file, # mod_authz_core, mod_authz_user, mod_dav, mod_dav_fs, # mod_setenvif # The following example gives DAV write access to a directory called # "uploads" under the ServerRoot directory. # # The User/Group specified in httpd.conf needs to have write permissions # on the directory where the DavLockDB is placed and on any directory where # "Dav On" is specified. DavLockDB "/usr/local/apache2/var/DavLock" Alias /uploads "/usr/local/apache2/uploads" Dav On AuthType Digest AuthName DAV-upload # You can use the htdigest program to create the password database: # htdigest -c "/usr/local/apache2/user.passwd" DAV-upload admin AuthUserFile "/usr/local/apache2/user.passwd" AuthDigestProvider file # Allow universal read-access, but writes are restricted # to the admin user. Require method GET POST OPTIONS Require user admin # # The following directives disable redirects on non-GET requests for # a directory that does not include the trailing slash. This fixes a # problem with several clients that do not appropriately handle # redirects for folders with DAV methods. # BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully BrowserMatch "MS FrontPage" redirect-carefully BrowserMatch "^WebDrive" redirect-carefully BrowserMatch "^WebDAVFS/1.[01234]" redirect-carefully BrowserMatch "^gnome-vfs/1.0" redirect-carefully BrowserMatch "^XML Spy" redirect-carefully BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully BrowserMatch " Konqueror/4" redirect-carefully webdav-client-python-3-3.14.6/conf/original/extra/httpd-default.conf000066400000000000000000000056041410526511000253000ustar00rootroot00000000000000# # This configuration file reflects default settings for Apache HTTP Server. # # You may change these, but chances are that you may not need to. # # # Timeout: The number of seconds before receives and sends time out. # Timeout 60 # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # KeepAlive On # # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100 # # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 5 # # UseCanonicalName: Determines how Apache constructs self-referencing # URLs and the SERVER_NAME and SERVER_PORT variables. # When set "Off", Apache will use the Hostname and Port supplied # by the client. When set "On", Apache will use the value of the # ServerName directive. # UseCanonicalName Off # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess # # ServerTokens # This directive configures what you return as the Server HTTP response # Header. The default is 'Full' which sends information about the OS-Type # and compiled in modules. # Set to one of: Full | OS | Minor | Minimal | Major | Prod # where Full conveys the most information, and Prod the least. # ServerTokens Full # # Optionally add a line containing the server version and virtual host # name to server-generated pages (internal error documents, FTP directory # listings, mod_status and mod_info output etc., but not CGI generated # documents or custom error documents). # Set to "EMail" to also include a mailto: link to the ServerAdmin. # Set to one of: On | Off | EMail # ServerSignature Off # # HostnameLookups: Log the names of clients or just their IP addresses # e.g., www.apache.org (on) or 204.62.129.132 (off). # The default is off because it'd be overall better for the net if people # had to knowingly turn this feature on, since enabling it means that # each client request will result in AT LEAST one lookup request to the # nameserver. # HostnameLookups Off # # Set a timeout for how long the client may take to send the request header # and body. # The default for the headers is header=20-40,MinRate=500, which means wait # for the first byte of headers for 20 seconds. If some data arrives, # increase the timeout corresponding to a data rate of 500 bytes/s, but not # above 40 seconds. # The default for the request body is body=20,MinRate=500, which is the same # but has no upper limit for the timeout. # To disable, set to header=0 body=0 # RequestReadTimeout header = 20-40, MinRate = 500 body=20, MinRate = 500 webdav-client-python-3-3.14.6/conf/original/extra/httpd-info.conf000066400000000000000000000021071410526511000246020ustar00rootroot00000000000000# # Get information about the requests being processed by the server # and the configuration of the server. # # Required modules: mod_authz_core, mod_authz_host, # mod_info (for the server-info handler), # mod_status (for the server-status handler) # # Allow server status reports generated by mod_status, # with the URL of http://servername/server-status # Change the ".example.com" to match your domain to enable. SetHandler server-status Require host .example.com Require ip 127 # # ExtendedStatus controls whether Apache will generate "full" status # information (ExtendedStatus On) or just basic information (ExtendedStatus # Off) when the "server-status" handler is called. The default is Off. # #ExtendedStatus On # # Allow remote server configuration reports, with the URL of # http://servername/server-info (requires that mod_info.c be loaded). # Change the ".example.com" to match your domain to enable. # SetHandler server-info Require host .example.com Require ip 127 webdav-client-python-3-3.14.6/conf/original/extra/httpd-languages.conf000066400000000000000000000117261410526511000256240ustar00rootroot00000000000000# # Settings for hosting different languages. # # Required modules: mod_mime, mod_negotiation # DefaultLanguage and AddLanguage allows you to specify the language of # a document. You can then use content negotiation to give a browser a # file in a language the user can understand. # # Specify a default language. This means that all data # going out without a specific language tag (see below) will # be marked with this one. You probably do NOT want to set # this unless you are sure it is correct for all cases. # # * It is generally better to not mark a page as # * being a certain language than marking it with the wrong # * language! # # DefaultLanguage nl # # Note 1: The suffix does not have to be the same as the language # keyword --- those with documents in Polish (whose net-standard # language code is pl) may wish to use "AddLanguage pl .po" to # avoid the ambiguity with the common suffix for perl scripts. # # Note 2: The example entries below illustrate that in some cases # the two character 'Language' abbreviation is not identical to # the two character 'Country' code for its country, # E.g. 'Danmark/dk' versus 'Danish/da'. # # Note 3: In the case of 'ltz' we violate the RFC by using a three char # specifier. There is 'work in progress' to fix this and get # the reference data for rfc1766 cleaned up. # # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl) # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de) # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja) # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn) # Norwegian (no) - Polish (pl) - Portugese (pt) # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv) # Turkish (tr) - Simplified Chinese (zh-CN) - Spanish (es) # Traditional Chinese (zh-TW) # AddLanguage ca .ca AddLanguage cs .cz .cs AddLanguage da .dk AddLanguage de .de AddLanguage el .el AddLanguage en .en AddLanguage eo .eo AddLanguage es .es AddLanguage et .et AddLanguage fr .fr AddLanguage he .he AddLanguage hr .hr AddLanguage it .it AddLanguage ja .ja AddLanguage ko .ko AddLanguage ltz .ltz AddLanguage nl .nl AddLanguage nn .nn AddLanguage no .no AddLanguage pl .po AddLanguage pt .pt AddLanguage pt-BR .pt-br AddLanguage ru .ru AddLanguage sv .sv AddLanguage tr .tr AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw # LanguagePriority allows you to give precedence to some languages # in case of a tie during content negotiation. # # Just list the languages in decreasing order of preference. We have # more or less alphabetized them here. You probably want to change this. # LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW # # ForceLanguagePriority allows you to serve a result page rather than # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback) # [in case no accepted languages matched the available variants] # ForceLanguagePriority Prefer Fallback # # Commonly used filename extensions to character sets. You probably # want to avoid clashes with the language extensions, unless you # are good at carefully testing your setup after each change. # See http://www.iana.org/assignments/character-sets for the # official list of charset names and their respective RFCs. # AddCharset us-ascii.ascii .us-ascii AddCharset ISO-8859-1 .iso8859-1 .latin1 AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen AddCharset ISO-8859-3 .iso8859-3 .latin3 AddCharset ISO-8859-4 .iso8859-4 .latin4 AddCharset ISO-8859-5 .iso8859-5 .cyr .iso-ru AddCharset ISO-8859-6 .iso8859-6 .arb .arabic AddCharset ISO-8859-7 .iso8859-7 .grk .greek AddCharset ISO-8859-8 .iso8859-8 .heb .hebrew AddCharset ISO-8859-9 .iso8859-9 .latin5 .trk AddCharset ISO-8859-10 .iso8859-10 .latin6 AddCharset ISO-8859-13 .iso8859-13 AddCharset ISO-8859-14 .iso8859-14 .latin8 AddCharset ISO-8859-15 .iso8859-15 .latin9 AddCharset ISO-8859-16 .iso8859-16 .latin10 AddCharset ISO-2022-JP .iso2022-jp .jis AddCharset ISO-2022-KR .iso2022-kr .kis AddCharset ISO-2022-CN .iso2022-cn .cis AddCharset Big5.Big5 .big5 .b5 AddCharset cn-Big5 .cn-big5 # For russian, more than one charset is used (depends on client, mostly): AddCharset WINDOWS-1251 .cp-1251 .win-1251 AddCharset CP866 .cp866 AddCharset KOI8 .koi8 AddCharset KOI8-E .koi8-e AddCharset KOI8-r .koi8-r .koi8-ru AddCharset KOI8-U .koi8-u AddCharset KOI8-ru .koi8-uk .ua AddCharset ISO-10646-UCS-2 .ucs2 AddCharset ISO-10646-UCS-4 .ucs4 AddCharset UTF-7 .utf7 AddCharset UTF-8 .utf8 AddCharset UTF-16 .utf16 AddCharset UTF-16BE .utf16be AddCharset UTF-16LE .utf16le AddCharset UTF-32 .utf32 AddCharset UTF-32BE .utf32be AddCharset UTF-32LE .utf32le AddCharset euc-cn .euc-cn AddCharset euc-gb .euc-gb AddCharset euc-jp .euc-jp AddCharset euc-kr .euc-kr #Not sure how euc-tw got in - IANA doesn't list it??? AddCharset EUC-TW .euc-tw AddCharset gb2312 .gb2312 .gb AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2 AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4 AddCharset shift_jis .shift_jis .sjis webdav-client-python-3-3.14.6/conf/original/extra/httpd-manual.conf000066400000000000000000000024471410526511000251330ustar00rootroot00000000000000# # Provide access to the documentation on your server as # http://yourserver.example.com/manual/ # The documentation is always available at # http://httpd.apache.org/docs/2.4/ # # Required modules: mod_alias, mod_authz_core, mod_authz_host, # mod_setenvif, mod_negotiation # AliasMatch ^/manual(?: /(?:da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn))?(/.*)?$ "/usr/local/apache2/manual$1" Options Indexes AllowOverride None Require all granted SetHandler type-map # .tr is text/troff in mime.types! RemoveType tr # Traditionally, used .dk filename extension for da language AddLanguage da .da SetEnvIf Request_URI ^/manual/(da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn)/ prefer-language = $1 RedirectMatch 301 ^/manual(?: /(da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn)){2,}(/.*)?$ /manual/$1$2 # Reflect the greatest effort in translation (most content available), # inferring greater attention to detail (potentially false assumption, # counting translations presently in-sync would be more helpful.) # Use caution counting; safest pattern is '*.xml.XX'. Recent .xml source # document count: 266 214 110 94 82 25 22 18 4 1 1 LanguagePriority en fr ko ja tr es de zh-cn pt-br da ru ForceLanguagePriority Prefer Fallback webdav-client-python-3-3.14.6/conf/original/extra/httpd-mpm.conf000066400000000000000000000103331410526511000244400ustar00rootroot00000000000000# # Server-Pool Management (MPM specific) # # # PidFile: The file in which the server should record its process # identification number when it starts. # # Note that this is the default PidFile for most MPMs. # PidFile "logs/httpd.pid" # # Only one of the below sections will be relevant on your # installed httpd. Use "apachectl -l" to find out the # active mpm. # # prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # MaxRequestWorkers: maximum number of server processes allowed to start # MaxConnectionsPerChild: maximum number of connections a server process serves # before terminating StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxRequestWorkers 250 MaxConnectionsPerChild 0 # worker MPM # StartServers: initial number of server processes to start # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process # MaxRequestWorkers: maximum number of worker threads # MaxConnectionsPerChild: maximum number of connections a server process serves # before terminating StartServers 3 MinSpareThreads 75 MaxSpareThreads 250 ThreadsPerChild 25 MaxRequestWorkers 400 MaxConnectionsPerChild 0 # event MPM # StartServers: initial number of server processes to start # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process # MaxRequestWorkers: maximum number of worker threads # MaxConnectionsPerChild: maximum number of connections a server process serves # before terminating StartServers 3 MinSpareThreads 75 MaxSpareThreads 250 ThreadsPerChild 25 MaxRequestWorkers 400 MaxConnectionsPerChild 0 # NetWare MPM # ThreadStackSize: Stack size allocated for each worker thread # StartThreads: Number of worker threads launched at server startup # MinSpareThreads: Minimum number of idle threads, to handle request spikes # MaxSpareThreads: Maximum number of idle threads # MaxThreads: Maximum number of worker threads alive at the same time # MaxConnectionsPerChild: Maximum number of connections a thread serves. It # is recommended that the default value of 0 be set # for this directive on NetWare. This will allow the # thread to continue to service requests indefinitely. ThreadStackSize 65536 StartThreads 250 MinSpareThreads 25 MaxSpareThreads 250 MaxThreads 1000 MaxConnectionsPerChild 0 # OS/2 MPM # StartServers: Number of server processes to maintain # MinSpareThreads: Minimum number of idle threads per process, # to handle request spikes # MaxSpareThreads: Maximum number of idle threads per process # MaxConnectionsPerChild: Maximum number of connections per server process StartServers 2 MinSpareThreads 5 MaxSpareThreads 10 MaxConnectionsPerChild 0 # WinNT MPM # ThreadsPerChild: constant number of worker threads in the server process # MaxConnectionsPerChild: maximum number of connections a server process serves ThreadsPerChild 150 MaxConnectionsPerChild 0 # The maximum number of free Kbytes that every allocator is allowed # to hold without calling free(). In threaded MPMs, every thread has its own # allocator. When not set, or when set to zero, the threshold will be set to # unlimited. MaxMemFree 2048 MaxMemFree 100 webdav-client-python-3-3.14.6/conf/original/extra/httpd-multilang-errordoc.conf000066400000000000000000000042221410526511000274600ustar00rootroot00000000000000# # The configuration below implements multi-language error documents through # content-negotiation. # # Required modules: mod_alias, mod_authz_core, mod_authz_host, # mod_include, mod_negotiation # # We use Alias to redirect any /error/HTTP_.html.var response to # our collection of by-error message multi-language collections. We use # includes to substitute the appropriate text. # # You can modify the messages' appearance without changing any of the # default HTTP_.html.var files by adding the line: # # Alias /error/include/ "/your/include/path/" # # which allows you to create your own set of files by starting with the # /usr/local/apache2/error/include/ files and copying them to /your/include/path/, # even on a per-VirtualHost basis. The default include files will display # your Apache version number and your ServerAdmin email address regardless # of the setting of ServerSignature. Alias /error/ "/usr/local/apache2/error/" AllowOverride None Options IncludesNoExec AddOutputFilter Includes html AddHandler type-map var Require all granted LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr ForceLanguagePriority Prefer Fallback ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var ErrorDocument 410 /error/HTTP_GONE.html.var ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var webdav-client-python-3-3.14.6/conf/original/extra/httpd-ssl.conf000066400000000000000000000320321410526511000244500ustar00rootroot00000000000000# # This is the Apache server configuration file providing SSL support. # It contains the configuration directives to instruct the server how to # serve pages over an https connection. For detailed information about these # directives see # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # Required modules: mod_log_config, mod_setenvif, mod_ssl, # socache_shmcb_module (for default value of SSLSessionCache) # # Pseudo Random Number Generator (PRNG): # Configure one or more sources to seed the PRNG of the SSL library. # The seed data should be of good random quality. # WARNING! On some platforms /dev/random blocks if not enough entropy # is available. This means you then cannot use the /dev/random device # because it would lead to very long connection times (as long as # it requires to make more entropy available). But usually those # platforms additionally provide a /dev/urandom device which doesn't # block. So, if available, use this one instead. Read the mod_ssl User # Manual for more details. # #SSLRandomSeed startup file:/dev/random 512 #SSLRandomSeed startup file:/dev/urandom 512 #SSLRandomSeed connect file:/dev/random 512 #SSLRandomSeed connect file:/dev/urandom 512 # # When we also provide SSL we have to listen to the # standard HTTP port (see above) and to the HTTPS port # Listen 443 ## ## SSL Global Context ## ## All SSL configuration in this context applies both to ## the main server and all SSL-enabled virtual hosts. ## # SSL Cipher Suite: # List the ciphers that the client is permitted to negotiate, # and that httpd will negotiate as the client of a proxied server. # See the OpenSSL documentation for a complete list of ciphers, and # ensure these follow appropriate best practices for this deployment. # httpd 2.2.30, 2.4.13 and later force-disable aNULL, eNULL and EXP ciphers, # while OpenSSL disabled these by default in 0.9.8zf/1.0.0r/1.0.1m/1.0.2a. SSLCipherSuite HIGH: MEDIUM:!MD5:!RC4:!3DES SSLProxyCipherSuite HIGH: MEDIUM:!MD5:!RC4:!3DES # By the end of 2016, only TLSv1.2 ciphers should remain in use. # Older ciphers should be disallowed as soon as possible, while the # kRSA ciphers do not offer forward secrecy. These changes inhibit # older clients (such as IE6 SP2 or IE8 on Windows XP, or other legacy # non-browser tooling) from successfully connecting. # # To restrict mod_ssl to use only TLSv1.2 ciphers, and disable # those protocols which do not support forward secrecy, replace # the SSLCipherSuite and SSLProxyCipherSuite directives above with # the following two directives, as soon as practical. # SSLCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA # SSLProxyCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA # User agents such as web browsers are not configured for the user's # own preference of either security or performance, therefore this # must be the prerogative of the web server administrator who manages # cpu load versus confidentiality, so enforce the server's cipher order. SSLHonorCipherOrder on # SSL Protocol support: # List the protocol versions which clients are allowed to connect with. # Disable SSLv3 by default (cf. RFC 7525 3.1.1). TLSv1 (1.0) should be # disabled as quickly as practical. By the end of 2016, only the TLSv1.2 # protocol or later should remain in use. SSLProtocol all -SSLv3 SSLProxyProtocol all -SSLv3 # Pass Phrase Dialog: # Configure the pass phrase gathering process. # The filtering dialog program (`builtin' is an internal # terminal dialog) has to provide the pass phrase on stdout. SSLPassPhraseDialog builtin # Inter-Process Session Cache: # Configure the SSL Session Cache: First the mechanism # to use and second the expiring timeout (in seconds). #SSLSessionCache "dbm:/usr/local/apache2/logs/ssl_scache" SSLSessionCache "shmcb:/usr/local/apache2/logs/ssl_scache(512000)" SSLSessionCacheTimeout 300 # OCSP Stapling (requires OpenSSL 0.9.8h or later) # # This feature is disabled by default and requires at least # the two directives SSLUseStapling and SSLStaplingCache. # Refer to the documentation on OCSP Stapling in the SSL/TLS # How-To for more information. # # Enable stapling for all SSL-enabled servers: #SSLUseStapling On # Define a relatively small cache for OCSP Stapling using # the same mechanism that is used for the SSL session cache # above. If stapling is used with more than a few certificates, # the size may need to be increased. (AH01929 will be logged.) #SSLStaplingCache "shmcb:/usr/local/apache2/logs/ssl_stapling(32768)" # Seconds before valid OCSP responses are expired from the cache #SSLStaplingStandardCacheTimeout 3600 # Seconds before invalid OCSP responses are expired from the cache #SSLStaplingErrorCacheTimeout 600 ## ## SSL Virtual Host Context ## # General setup for the virtual host DocumentRoot "/usr/local/apache2/htdocs" ServerName www.example.com: 443 ServerAdmin you@example.com ErrorLog "/usr/local/apache2/logs/error_log" TransferLog "/usr/local/apache2/logs/access_log" # SSL Engine Switch: # Enable/Disable SSL for this virtual host. SSLEngine on # Server Certificate: # Point SSLCertificateFile at a PEM encoded certificate. If # the certificate is encrypted, then you will be prompted for a # pass phrase. Note that a kill -HUP will prompt again. Keep # in mind that if you have both an RSA and a DSA certificate you # can configure both in parallel (to also allow the use of DSA # ciphers, etc.) # Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt) # require an ECC certificate which can also be configured in # parallel. SSLCertificateFile "/usr/local/apache2/conf/server.crt" #SSLCertificateFile "/usr/local/apache2/conf/server-dsa.crt" #SSLCertificateFile "/usr/local/apache2/conf/server-ecc.crt" # Server Private Key: # If the key is not combined with the certificate, use this # directive to point at the key file. Keep in mind that if # you've both a RSA and a DSA private key you can configure # both in parallel (to also allow the use of DSA ciphers, etc.) # ECC keys, when in use, can also be configured in parallel SSLCertificateKeyFile "/usr/local/apache2/conf/server.key" #SSLCertificateKeyFile "/usr/local/apache2/conf/server-dsa.key" #SSLCertificateKeyFile "/usr/local/apache2/conf/server-ecc.key" # Server Certificate Chain: # Point SSLCertificateChainFile at a file containing the # concatenation of PEM encoded CA certificates which form the # certificate chain for the server certificate. Alternatively # the referenced file can be the same as SSLCertificateFile # when the CA certificates are directly appended to the server # certificate for convenience. #SSLCertificateChainFile "/usr/local/apache2/conf/server-ca.crt" # Certificate Authority (CA): # Set the CA certificate verification path where to find CA # certificates for client authentication or alternatively one # huge file containing all of them (file must be PEM encoded) # Note: Inside SSLCACertificatePath you need hash symlinks # to point to the certificate files. Use the provided # Makefile to update the hash symlinks after changes. #SSLCACertificatePath "/usr/local/apache2/conf/ssl.crt" #SSLCACertificateFile "/usr/local/apache2/conf/ssl.crt/ca-bundle.crt" # Certificate Revocation Lists (CRL): # Set the CA revocation path where to find CA CRLs for client # authentication or alternatively one huge file containing all # of them (file must be PEM encoded). # The CRL checking mode needs to be configured explicitly # through SSLCARevocationCheck (defaults to "none" otherwise). # Note: Inside SSLCARevocationPath you need hash symlinks # to point to the certificate files. Use the provided # Makefile to update the hash symlinks after changes. #SSLCARevocationPath "/usr/local/apache2/conf/ssl.crl" #SSLCARevocationFile "/usr/local/apache2/conf/ssl.crl/ca-bundle.crl" #SSLCARevocationCheck chain # Client Authentication (Type): # Client certificate verification type and depth. Types are # none, optional, require and optional_no_ca. Depth is a # number which specifies how deeply to verify the certificate # issuer chain before deciding the certificate is not valid. #SSLVerifyClient require #SSLVerifyDepth 10 # TLS-SRP mutual authentication: # Enable TLS-SRP and set the path to the OpenSSL SRP verifier # file (containing login information for SRP user accounts). # Requires OpenSSL 1.0.1 or newer. See the mod_ssl FAQ for # detailed instructions on creating this file. Example: # "openssl srp -srpvfile /usr/local/apache2/conf/passwd.srpv -add username" #SSLSRPVerifierFile "/usr/local/apache2/conf/passwd.srpv" # Access Control: # With SSLRequire you can do per-directory access control based # on arbitrary complex boolean expressions containing server # variable checks and other lookup directives. The syntax is a # mixture between C and Perl. See the mod_ssl documentation # for more details. # #SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \ # and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ # and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \ # and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \ # and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \ # or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/ # # SSL Engine Options: # Set various options for the SSL engine. # o FakeBasicAuth: # Translate the client X.509 into a Basic Authorisation. This means that # the standard Auth/DBMAuth methods can be used for access control. The # user name is the `one line' version of the client's X.509 certificate. # Note that no password is obtained from the user. Every entry in the user # file needs this password: `xxj31ZMTZzkVA'. # o ExportCertData: # This exports two additional environment variables: SSL_CLIENT_CERT and # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the # server (always existing) and the client (only existing when client # authentication is used). This can be used to import the certificates # into CGI scripts. # o StdEnvVars: # This exports the standard SSL/TLS related `SSL_*' environment variables. # Per default this exportation is switched off for performance reasons, # because the extraction step is an expensive operation and is usually # useless for serving static content. So one usually enables the # exportation for CGI and SSI requests only. # o StrictRequire: # This denies access when "SSLRequireSSL" or "SSLRequire" applied even # under a "Satisfy any" situation, i.e. when it applies access is denied # and no other module can change it. # o OptRenegotiate: # This enables optimized SSL connection renegotiation handling when SSL # directives are used in per-directory context. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire SSLOptions +StdEnvVars SSLOptions +StdEnvVars # SSL Protocol Adjustments: # The safe and default but still SSL/TLS standard compliant shutdown # approach is that mod_ssl sends the close notify alert but doesn't wait for # the close notify alert from client. When you need a different shutdown # approach you can use one of the following variables: # o ssl-unclean-shutdown: # This forces an unclean shutdown when the connection is closed, i.e. no # SSL close notify alert is sent or allowed to be received. This violates # the SSL/TLS standard but is needed for some brain-dead browsers. Use # this when you receive I/O errors because of the standard approach where # mod_ssl sends the close notify alert. # o ssl-accurate-shutdown: # This forces an accurate shutdown when the connection is closed, i.e. a # SSL close notify alert is send and mod_ssl waits for the close notify # alert of the client. This is 100% SSL/TLS standard compliant, but in # practice often causes hanging connections with brain-dead browsers. Use # this only for browsers where you know that their SSL implementation # works correctly. # Notice: Most problems of broken clients are also related to the HTTP # keep-alive facility, so you usually additionally want to disable # keep-alive for those clients, too. Use variable "nokeepalive" for this. # Similarly, one has to force some clients to use HTTP/1.0 to workaround # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and # "force-response-1.0" for this. BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 # Per-Server Logging: # The home of a custom SSL log file. Use this when you want a # compact non-error SSL logfile on a virtual host basis. CustomLog "/usr/local/apache2/logs/ssl_request_log" \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" webdav-client-python-3-3.14.6/conf/original/extra/httpd-userdir.conf000066400000000000000000000012521410526511000253240ustar00rootroot00000000000000# Settings for user home directories # # Required module: mod_authz_core, mod_authz_host, mod_userdir # # UserDir: The name of the directory that is appended onto a user's home # directory if a ~user request is received. Note that you must also set # the default access control for these directories, as in the example below. # UserDir public_html # # Control access to UserDir directories. The following is an example # for a site where these directories are restricted to read-only. # AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec Require method GET POST OPTIONS webdav-client-python-3-3.14.6/conf/original/extra/httpd-vhosts.conf000066400000000000000000000026211410526511000251760ustar00rootroot00000000000000# Virtual Hosts # # Required modules: mod_log_config # If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any block. # ServerAdmin webmaster@dummy-host.example.com DocumentRoot "/usr/local/apache2/docs/dummy-host.example.com" ServerName dummy-host.example.com ServerAlias www.dummy-host.example.com ErrorLog "logs/dummy-host.example.com-error_log" CustomLog "logs/dummy-host.example.com-access_log" common ServerAdmin webmaster@dummy-host2.example.com DocumentRoot "/usr/local/apache2/docs/dummy-host2.example.com" ServerName dummy-host2.example.com ErrorLog "logs/dummy-host2.example.com-error_log" CustomLog "logs/dummy-host2.example.com-access_log" common webdav-client-python-3-3.14.6/conf/original/extra/proxy-html.conf000066400000000000000000000061231410526511000246530ustar00rootroot00000000000000# Configuration example. # # For detailed information about these directives see # # and for mod_xml2enc see # # # First, to load the module with its prerequisites. Note: mod_xml2enc # is not always necessary, but without it mod_proxy_html is likely to # mangle pages in encodings other than ASCII or Unicode (utf-8). # # For Unix-family systems: # LoadFile /usr/lib/libxml2.so # LoadModule proxy_html_module modules/mod_proxy_html.so # LoadModule xml2enc_module modules/mod_xml2enc.so # # For Windows (I don't know if there's a standard path for the libraries) # LoadFile C:/path/zlib.dll # LoadFile C:/path/iconv.dll # LoadFile C:/path/libxml2.dll # LoadModule proxy_html_module modules/mod_proxy_html.so # LoadModule xml2enc_module modules/mod_xml2enc.so # # All knowledge of HTML links has been removed from the mod_proxy_html # code itself, and is instead read from httpd.conf (or included file) # at server startup. So you MUST declare it. This will normally be # at top level, but can also be used in a . # # Here's the declaration for W3C HTML 4.01 and XHTML 1.0 ProxyHTMLLinks a href ProxyHTMLLinks area href ProxyHTMLLinks link href ProxyHTMLLinks img src longdesc usemap ProxyHTMLLinks object classid codebase data usemap ProxyHTMLLinks q cite ProxyHTMLLinks blockquote cite ProxyHTMLLinks ins cite ProxyHTMLLinks del cite ProxyHTMLLinks form action ProxyHTMLLinks input src usemap ProxyHTMLLinks head profile ProxyHTMLLinks base href ProxyHTMLLinks script src for # To support scripting events (with ProxyHTMLExtended On), # you'll need to declare them too. ProxyHTMLEvents onclick ondblclick onmousedown onmouseup \ onmouseover onmousemove onmouseout onkeypress \ onkeydown onkeyup onfocus onblur onload \ onunload onsubmit onreset onselect onchange # If you need to support legacy (pre-1998, aka "transitional") HTML or XHTML, # you'll need to uncomment the following deprecated link attributes. # Note that these are enabled in earlier mod_proxy_html versions # # ProxyHTMLLinks frame src longdesc # ProxyHTMLLinks iframe src longdesc # ProxyHTMLLinks body background # ProxyHTMLLinks applet codebase # # If you're dealing with proprietary HTML variants, # declare your own URL attributes here as required. # # ProxyHTMLLinks myelement myattr otherattr # ########### # EXAMPLE # ########### # # To define the URL /my-gateway/ as a gateway to an appserver with address # http://some.app.intranet/ on a private network, after loading the # modules and including this configuration file: # # ProxyRequests Off <-- this is an important security setting # ProxyPass /my-gateway/ http://some.app.intranet/ # # ProxyPassReverse / # ProxyHTMLEnable On # ProxyHTMLURLMap http://some.app.intranet/ /my-gateway/ # ProxyHTMLURLMap / /my-gateway/ # # # Many (though not all) real-life setups are more complex. # # See the documentation at # http://apache.webthing.com/mod_proxy_html/ # and the tutorial at # http://www.apachetutor.org/admin/reverseproxies webdav-client-python-3-3.14.6/conf/original/httpd.conf000066400000000000000000000475111410526511000225360ustar00rootroot00000000000000# # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See for detailed information. # In particular, see # # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "logs/access_log" # with ServerRoot set to "/usr/local/apache2" will be interpreted by the # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" # will be interpreted as '/logs/access_log'. # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # Do not add a slash at the end of the directory path. If you point # ServerRoot at a non-local disk, be sure to specify a local disk on the # Mutex directive, if file-based mutexes are used. If you wish to share the # same ServerRoot for multiple httpd daemons, you will need to change at # least PidFile. # ServerRoot "/usr/local/apache2" # # Mutex: Allows you to set the mutex mechanism and mutex file directory # for individual mutexes, or change the global defaults # # Uncomment and change the directory if mutexes are file-based and the default # mutex file directory is not on a local disk or is not appropriate for some # other reason. # # Mutex default:logs # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 Listen 80 # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so # LoadModule mpm_event_module modules/mod_mpm_event.so #LoadModule mpm_prefork_module modules/mod_mpm_prefork.so #LoadModule mpm_worker_module modules/mod_mpm_worker.so LoadModule authn_file_module modules/mod_authn_file.so #LoadModule authn_dbm_module modules/mod_authn_dbm.so #LoadModule authn_anon_module modules/mod_authn_anon.so #LoadModule authn_dbd_module modules/mod_authn_dbd.so #LoadModule authn_socache_module modules/mod_authn_socache.so LoadModule authn_core_module modules/mod_authn_core.so LoadModule authz_host_module modules/mod_authz_host.so LoadModule authz_groupfile_module modules/mod_authz_groupfile.so LoadModule authz_user_module modules/mod_authz_user.so #LoadModule authz_dbm_module modules/mod_authz_dbm.so #LoadModule authz_owner_module modules/mod_authz_owner.so #LoadModule authz_dbd_module modules/mod_authz_dbd.so LoadModule authz_core_module modules/mod_authz_core.so #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so #LoadModule authnz_fcgi_module modules/mod_authnz_fcgi.so LoadModule access_compat_module modules/mod_access_compat.so LoadModule auth_basic_module modules/mod_auth_basic.so #LoadModule auth_form_module modules/mod_auth_form.so #LoadModule auth_digest_module modules/mod_auth_digest.so #LoadModule allowmethods_module modules/mod_allowmethods.so #LoadModule isapi_module modules/mod_isapi.so #LoadModule file_cache_module modules/mod_file_cache.so #LoadModule cache_module modules/mod_cache.so #LoadModule cache_disk_module modules/mod_cache_disk.so #LoadModule cache_socache_module modules/mod_cache_socache.so #LoadModule socache_shmcb_module modules/mod_socache_shmcb.so #LoadModule socache_dbm_module modules/mod_socache_dbm.so #LoadModule socache_memcache_module modules/mod_socache_memcache.so #LoadModule socache_redis_module modules/mod_socache_redis.so #LoadModule watchdog_module modules/mod_watchdog.so #LoadModule macro_module modules/mod_macro.so #LoadModule dbd_module modules/mod_dbd.so #LoadModule bucketeer_module modules/mod_bucketeer.so #LoadModule dumpio_module modules/mod_dumpio.so #LoadModule echo_module modules/mod_echo.so #LoadModule example_hooks_module modules/mod_example_hooks.so #LoadModule case_filter_module modules/mod_case_filter.so #LoadModule case_filter_in_module modules/mod_case_filter_in.so #LoadModule example_ipc_module modules/mod_example_ipc.so #LoadModule buffer_module modules/mod_buffer.so #LoadModule data_module modules/mod_data.so #LoadModule ratelimit_module modules/mod_ratelimit.so LoadModule reqtimeout_module modules/mod_reqtimeout.so #LoadModule ext_filter_module modules/mod_ext_filter.so #LoadModule request_module modules/mod_request.so #LoadModule include_module modules/mod_include.so LoadModule filter_module modules/mod_filter.so #LoadModule reflector_module modules/mod_reflector.so #LoadModule substitute_module modules/mod_substitute.so #LoadModule sed_module modules/mod_sed.so #LoadModule charset_lite_module modules/mod_charset_lite.so #LoadModule deflate_module modules/mod_deflate.so #LoadModule xml2enc_module modules/mod_xml2enc.so #LoadModule proxy_html_module modules/mod_proxy_html.so #LoadModule brotli_module modules/mod_brotli.so LoadModule mime_module modules/mod_mime.so #LoadModule ldap_module modules/mod_ldap.so LoadModule log_config_module modules/mod_log_config.so #LoadModule log_debug_module modules/mod_log_debug.so #LoadModule log_forensic_module modules/mod_log_forensic.so #LoadModule logio_module modules/mod_logio.so #LoadModule lua_module modules/mod_lua.so LoadModule env_module modules/mod_env.so #LoadModule mime_magic_module modules/mod_mime_magic.so #LoadModule cern_meta_module modules/mod_cern_meta.so #LoadModule expires_module modules/mod_expires.so LoadModule headers_module modules/mod_headers.so #LoadModule ident_module modules/mod_ident.so #LoadModule usertrack_module modules/mod_usertrack.so #LoadModule unique_id_module modules/mod_unique_id.so LoadModule setenvif_module modules/mod_setenvif.so LoadModule version_module modules/mod_version.so #LoadModule remoteip_module modules/mod_remoteip.so #LoadModule proxy_module modules/mod_proxy.so #LoadModule proxy_connect_module modules/mod_proxy_connect.so #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so #LoadModule proxy_http_module modules/mod_proxy_http.so #LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so #LoadModule proxy_scgi_module modules/mod_proxy_scgi.so #LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so #LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so #LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so #LoadModule proxy_express_module modules/mod_proxy_express.so #LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so #LoadModule session_module modules/mod_session.so #LoadModule session_cookie_module modules/mod_session_cookie.so #LoadModule session_crypto_module modules/mod_session_crypto.so #LoadModule session_dbd_module modules/mod_session_dbd.so #LoadModule slotmem_shm_module modules/mod_slotmem_shm.so #LoadModule slotmem_plain_module modules/mod_slotmem_plain.so #LoadModule ssl_module modules/mod_ssl.so #LoadModule optional_hook_export_module modules/mod_optional_hook_export.so #LoadModule optional_hook_import_module modules/mod_optional_hook_import.so #LoadModule optional_fn_import_module modules/mod_optional_fn_import.so #LoadModule optional_fn_export_module modules/mod_optional_fn_export.so #LoadModule dialup_module modules/mod_dialup.so #LoadModule http2_module modules/mod_http2.so #LoadModule proxy_http2_module modules/mod_proxy_http2.so #LoadModule md_module modules/mod_md.so #LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so #LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so #LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so #LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so LoadModule unixd_module modules/mod_unixd.so #LoadModule heartbeat_module modules/mod_heartbeat.so #LoadModule heartmonitor_module modules/mod_heartmonitor.so #LoadModule dav_module modules/mod_dav.so LoadModule status_module modules/mod_status.so LoadModule autoindex_module modules/mod_autoindex.so #LoadModule asis_module modules/mod_asis.so #LoadModule info_module modules/mod_info.so #LoadModule suexec_module modules/mod_suexec.so #LoadModule cgid_module modules/mod_cgid.so #LoadModule cgi_module modules/mod_cgi.so #LoadModule dav_fs_module modules/mod_dav_fs.so #LoadModule dav_lock_module modules/mod_dav_lock.so #LoadModule vhost_alias_module modules/mod_vhost_alias.so #LoadModule negotiation_module modules/mod_negotiation.so LoadModule dir_module modules/mod_dir.so #LoadModule imagemap_module modules/mod_imagemap.so #LoadModule actions_module modules/mod_actions.so #LoadModule speling_module modules/mod_speling.so #LoadModule userdir_module modules/mod_userdir.so LoadModule alias_module modules/mod_alias.so #LoadModule rewrite_module modules/mod_rewrite.so # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # User daemon Group daemon # 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # definition. These values also provide defaults for # any containers you may define later in the file. # # All of these directives may appear inside containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain.com # ServerAdmin you@example.com # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If your host doesn't have a registered DNS name, enter its IP address here. # #ServerName www.example.com:80 # # Deny access to the entirety of your server's filesystem. You must # explicitly permit access to web content directories in other # blocks below. # AllowOverride none Require all denied # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/usr/local/apache2/htdocs" # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # AllowOverride FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Require all granted # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # DirectoryIndex index.html # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # Require all denied # # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a # container, that host's errors will be logged there and not here. # ErrorLog "logs/error_log" # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio # # The location and format of the access logfile (Common Logfile Format). # If you do not define any access logfiles within a # container, they will be logged here. Contrariwise, if you *do* # define per- access logfiles, transactions will be # logged therein and *not* in this file. # CustomLog "logs/access_log" common # # If you prefer a logfile with access, agent, and referer information # (Combined Logfile Format) you can use the following directive. # #CustomLog "logs/access_log" combined # # Redirect: Allows you to tell clients about documents that used to # exist in your server's namespace, but do not anymore. The client # will make a new request for the document at its new location. # Example: # Redirect permanent /foo http://www.example.com/bar # # Alias: Maps web paths into filesystem paths and is used to # access content that does not live under the DocumentRoot. # Example: # Alias /webpath /full/filesystem/path # # If you include a trailing / on /webpath then the server will # require it to be present in the URL. You will also likely # need to provide a section to allow access to # the filesystem path. # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing "/" apply to ScriptAlias # directives as to Alias. # ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/" # # ScriptSock: On threaded servers, designate the path to the UNIX # socket used to communicate with the CGI daemon of mod_cgid. # #Scriptsock cgisock # # "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # AllowOverride None Options None Require all granted # # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied # backend servers which have lingering "httpoxy" defects. # 'Proxy' request header is undefined by the IETF, not listed by IANA # RequestHeader unset Proxy early # # TypesConfig points to the file containing the list of mappings from # filename extension to MIME-type. # TypesConfig conf/mime.types # # AddType allows you to add to or override the MIME configuration # file specified in TypesConfig for specific file types. # #AddType application/x-gzip .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi # For type maps (negotiated resources): #AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # #AddType text/html .shtml #AddOutputFilter INCLUDES .shtml # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # #MIMEMagicFile conf/magic # # Customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # Some examples: #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # # # MaxRanges: Maximum number of Ranges in a request before # returning the entire resource, or one of the special # values 'default', 'none' or 'unlimited'. # Default setting is to accept 200 Ranges. #MaxRanges unlimited # # EnableMMAP and EnableSendfile: On systems that support it, # memory-mapping or the sendfile syscall may be used to deliver # files. This usually improves server performance, but must # be turned off when serving from networked-mounted # filesystems or if support for these functions is otherwise # broken on your system. # Defaults: EnableMMAP On, EnableSendfile Off # #EnableMMAP off #EnableSendfile on # Supplemental configuration # # The configuration files in the conf/extra/ directory can be # included to add extra features or to modify the default configuration of # the server, or you may simply copy their contents here and change as # necessary. # Server-pool management (MPM specific) #Include conf/extra/httpd-mpm.conf # Multi-language error messages #Include conf/extra/httpd-multilang-errordoc.conf # Fancy directory listings #Include conf/extra/httpd-autoindex.conf # Language settings #Include conf/extra/httpd-languages.conf # User home directories #Include conf/extra/httpd-userdir.conf # Real-time info on requests and configuration #Include conf/extra/httpd-info.conf # Virtual hosts #Include conf/extra/httpd-vhosts.conf # Local access to the Apache HTTP Server Manual #Include conf/extra/httpd-manual.conf # Distributed authoring and versioning (WebDAV) #Include conf/extra/httpd-dav.conf # Various default settings #Include conf/extra/httpd-default.conf # Configure mod_proxy_html to understand HTML4/XHTML1 Include conf/extra/proxy-html.conf # Secure (SSL/TLS) connections #Include conf/extra/httpd-ssl.conf # # Note: The following must must be present to support # starting without SSL on platforms with no /dev/random equivalent # but a statically compiled-in mod_ssl. # SSLRandomSeed startup builtin SSLRandomSeed connect builtin webdav-client-python-3-3.14.6/conf/sites-available/000077500000000000000000000000001410526511000217755ustar00rootroot00000000000000webdav-client-python-3-3.14.6/conf/sites-available/default-ssl.conf000066400000000000000000000020561410526511000250720ustar00rootroot00000000000000Listen 443 Protocols h2 http/1.1 ServerName localhost DocumentRoot "/var/www/html/" Require all denied CustomLog /proc/self/fd/1 combined ErrorLog /proc/self/fd/2 SSLEngine on SSLCertificateFile /cert.pem SSLCertificateKeyFile /privkey.pem SSLProtocol all -SSLv3 SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305: ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS SSLHonorCipherOrder on SSLSessionTickets off webdav-client-python-3-3.14.6/conf/sites-available/default.conf000066400000000000000000000005011410526511000242640ustar00rootroot00000000000000 ServerName localhost DocumentRoot "/var/www/html/" Require all denied CustomLog /proc/self/fd/1 combined ErrorLog /proc/self/fd/2 # This lets certain DAV methods work behind an SSL reverse proxy. RequestHeader edit Destination ^https http early webdav-client-python-3-3.14.6/conf/sites-enabled/000077500000000000000000000000001410526511000214475ustar00rootroot00000000000000webdav-client-python-3-3.14.6/conf/sites-enabled/default.conf000066400000000000000000000005011410526511000237360ustar00rootroot00000000000000 ServerName localhost DocumentRoot "/var/www/html/" Require all denied CustomLog /proc/self/fd/1 combined ErrorLog /proc/self/fd/2 # This lets certain DAV methods work behind an SSL reverse proxy. RequestHeader edit Destination ^https http early webdav-client-python-3-3.14.6/publish.sh000077500000000000000000000001561410526511000200120ustar00rootroot00000000000000# Clean old dists rm -r dist # Create new packege python setup.py sdist # Upload to pypi twine upload dist/*webdav-client-python-3-3.14.6/setup.py000066400000000000000000000052051410526511000175170ustar00rootroot00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from setuptools import setup, find_packages from setuptools.command.install import install as InstallCommand from setuptools.command.test import test as TestCommand version = "3.14.6" requirements = "libxml2-dev libxslt-dev python-dev" class Install(InstallCommand): def run(self): #params = "{install_params} {requirements}".format(install_params="install", requirements=requirements) #cmd = "{command} {params}".format(command="apt-get", params=params) #proc = subprocess.Popen(cmd, shell=True) # proc.wait() InstallCommand.run(self) class Test(TestCommand): user_options = [('pytest-args=', 'a', "")] def initialize_options(self): TestCommand.initialize_options(self) self.pytest_args = [] def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = pytest.main(self.pytest_args) sys.exit(errno) try: long_description = open('README.md', encoding="utf-8").read() except TypeError: long_description = open('README.md').read() setup( name='webdavclient3', version=version, packages=find_packages(exclude=('tests',)), requires=['python (>= 3.3.0)'], install_requires=['requests', 'lxml', 'python-dateutil'], scripts=['wdc'], test_suite='tests', tests_require=['pytest'], cmdclass={'install': Install, 'test': Test}, description='WebDAV client, based on original package https://github.com/designerror/webdav-client-python but ' 'uses requests instead of PyCURL', long_description=long_description, long_description_content_type='text/markdown', author='Evgeny Ezhov', author_email='ezhov.evgeny@gmail.com', url='https://github.com/ezhov-evgeny/webdav-client-python-3', license='MIT License', keywords='webdav, client, python, module, library, packet, Yandex.Disk, Dropbox, Google Disk, Box, 4shared', classifiers=[ 'Environment :: Console', 'Environment :: Web Environment', 'License :: OSI Approved :: MIT License', 'Operating System :: MacOS', 'Operating System :: Microsoft', 'Operating System :: Unix', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Topic :: Internet', 'Topic :: Software Development :: Libraries :: Python Modules', ], ) webdav-client-python-3-3.14.6/sonar-project.properties000066400000000000000000000007441410526511000227140ustar00rootroot00000000000000sonar.projectKey=ezhov-evgeny_webdav-client-python-3 sonar.organization=ezhov-evgeny # This is the name and version displayed in the SonarCloud UI. sonar.projectName=webdav-client-python-3 sonar.projectVersion=3.14.6 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. sonar.sources=webdav3 sonar.tests=tests sonar.python.coverage.reportPaths=coverage.xml # Encoding of the source code. Default is default system encoding sonar.sourceEncoding=UTF-8webdav-client-python-3-3.14.6/tests/000077500000000000000000000000001410526511000171455ustar00rootroot00000000000000webdav-client-python-3-3.14.6/tests/__init__.py000066400000000000000000000000001410526511000212440ustar00rootroot00000000000000webdav-client-python-3-3.14.6/tests/base_client_it.py000066400000000000000000000074731410526511000224760ustar00rootroot00000000000000import logging import os import shutil import sys import unittest from os import path from webdav3.client import Client root = logging.getLogger() root.setLevel(logging.DEBUG) log_handler = logging.StreamHandler(sys.stdout) log_handler.setLevel(logging.DEBUG) formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') log_handler.setFormatter(formatter) root.addHandler(log_handler) class BaseClientTestCase(unittest.TestCase): remote_path_file = 'test_dir/test.txt' remote_compressed_path_file = 'test_dir/compressed.txt' remote_path_file2 = 'test_dir2/test.txt' remote_inner_path_file = 'test_dir/inner/test.txt' remote_path_dir = 'test_dir' remote_path_dir2 = 'test_dir2' remote_inner_path_dir = 'test_dir/inner' inner_dir_name = 'inner' local_base_dir = 'tests/' local_file = 'test.txt' local_file_path = local_base_dir + 'test.txt' local_compressed_file_path = local_base_dir + 'compressed.txt' local_path_dir = local_base_dir + 'res/test_dir' options = { 'webdav_hostname': 'http://localhost:8585', 'webdav_login': 'alice', 'webdav_password': 'secret1234', 'webdav_timeout': 10, 'webdav_override_methods': { 'check': 'GET' } } # options = { # 'webdav_hostname': 'https://demo1.nextcloud.com/remote.php/dav/files/RCw8Y9XXFnzkLJbN/', # 'webdav_login': 'RCw8Y9XXFnzkLJbN', # 'webdav_password': 'demo', # 'webdav_override_methods': { # 'check': 'GET' # } # } # options = { # 'webdav_hostname': 'https://webdav.yandex.ru', # 'webdav_login': 'webdavclient.test2', # 'webdav_password': 'Qwerty123!' # } def setUp(self): self.client = Client(self.options) self.clean_local_dir(self.local_path_dir) def tearDown(self): self.clean_local_dir(self.local_path_dir) self.clean_remote_dir(self.remote_path_dir) self.clean_remote_dir(self.remote_path_dir2) def clean_remote_dir(self, remote_path_dir): if self.client.check(remote_path=remote_path_dir): self.client.clean(remote_path=remote_path_dir) @staticmethod def clean_local_dir(local_path_dir): if path.exists(path=local_path_dir): shutil.rmtree(path=local_path_dir) def _prepare_for_downloading(self, inner_dir=False, base_path=''): if base_path: self._create_remote_dir_if_needed(base_path) self._prepare_dir_for_downloading(base_path + self.remote_path_dir, base_path + self.remote_path_file, self.local_file_path) if not path.exists(self.local_path_dir): os.makedirs(self.local_path_dir) if inner_dir: self._prepare_dir_for_downloading(base_path + self.remote_inner_path_dir, base_path + self.remote_inner_path_file, self.local_file_path) def _prepare_dir_for_downloading(self, remote_path_dir, remote_path_file, local_file_path): self._create_remote_dir_if_needed(remote_path_dir) if not self.client.check(remote_path=remote_path_file): self.client.upload_file(remote_path=remote_path_file, local_path=local_file_path) def _create_remote_dir_if_needed(self, remote_dir): if not self.client.check(remote_path=remote_dir): self.client.mkdir(remote_path=remote_dir) def _prepare_for_uploading(self): if not self.client.check(remote_path=self.remote_path_dir): self.client.mkdir(remote_path=self.remote_path_dir) if not path.exists(path=self.local_path_dir): os.makedirs(self.local_path_dir) if not path.exists(path=self.local_path_dir + os.sep + self.local_file): shutil.copy(src=self.local_file_path, dst=self.local_path_dir + os.sep + self.local_file) if __name__ == '__main__': unittest.main() webdav-client-python-3-3.14.6/tests/compressed.txt000066400000000000000000000003211410526511000220460ustar00rootroot00000000000000test content for testing of webdav client test content for testing of webdav client test content for testing of webdav client test content for testing of webdav client test content for testing of webdav clientwebdav-client-python-3-3.14.6/tests/responses/000077500000000000000000000000001410526511000211665ustar00rootroot00000000000000webdav-client-python-3-3.14.6/tests/responses/free_space.xml000066400000000000000000000006471410526511000240130ustar00rootroot00000000000000 / HTTP/1.1 200 OK 697 10737417543 webdav-client-python-3-3.14.6/tests/responses/free_space_incorrect.xml000066400000000000000000000004001410526511000260460ustar00rootroot0000000000000012321dadadasdasd / HTTP/1.1 200 OK webdav-client-python-3-3.14.6/tests/responses/free_space_not_supported.xml000066400000000000000000000003601410526511000267700ustar00rootroot00000000000000 / HTTP/1.1 200 OK webdav-client-python-3-3.14.6/tests/responses/get_info.xml000066400000000000000000000013451410526511000235050ustar00rootroot00000000000000 /test_dir/test.txt HTTP/1.1 200 OK Wed, 18 Oct 2017 15:16:04 GMT ab0b4b7973803c03639b848682b5f38c text/plain 41 test.txt 2017-10-18T15:16:04Z webdav-client-python-3-3.14.6/tests/responses/get_list.xml000066400000000000000000000057061410526511000235320ustar00rootroot00000000000000 /test_dir/ 2020-04-10T21:59:43Z Fri, 10 Apr 2020 21:59:43 GMT "1000-5a2f6d9cf8d39" httpd/unix-directory HTTP/1.1 200 OK /test_dir/test.txt 2020-04-10T21:59:43Z 41 Fri, 10 Apr 2020 21:59:43 GMT "29-5a2f6d9cf8d39" F text/plain HTTP/1.1 200 OK webdav-client-python-3-3.14.6/tests/responses/get_list_directories.xml000066400000000000000000000155121410526511000261220ustar00rootroot00000000000000 / 2020-04-06T01:00:26Z Mon, 06 Apr 2020 01:00:26 GMT "1000-5a294cadf6e8f" httpd/unix-directory HTTP/1.1 200 OK /test_dir/ 2020-04-06T01:00:26Z Mon, 06 Apr 2020 01:00:26 GMT "1000-5a294cadfbcaf" httpd/unix-directory HTTP/1.1 200 OK /test 2020-04-05T17:46:17Z Thu, 28 Nov 2019 19:22:35 GMT "1000-5986d091de6bd" httpd/unix-directory HTTP/1.1 200 OK /time/ 2020-04-06T00:41:42Z Mon, 06 Apr 2020 00:41:42 GMT "1000-5a29487ed5fb8" httpd/unix-directory HTTP/1.1 200 OK /non-default/ 2020-04-05T17:46:17Z Mon, 27 Jan 2020 03:37:21 GMT "1000-59d16d32ea4ce" httpd/unix-directory HTTP/1.1 200 OK webdav-client-python-3-3.14.6/tests/responses/get_list_empty.xml000066400000000000000000000001711410526511000247370ustar00rootroot00000000000000 webdav-client-python-3-3.14.6/tests/responses/get_list_incorrect.xml000066400000000000000000000031021410526511000255660ustar00rootroot00000000000000asdadasDASAS /test_dir/test.txt 2020-04-10T21:59:43Z 41 Fri, 10 Apr 2020 21:59:43 GMT "29-5a2f6d9cf8d39" F text/plain HTTP/1.1 200 OK webdav-client-python-3-3.14.6/tests/responses/get_list_info.xml000066400000000000000000000013451410526511000245400ustar00rootroot00000000000000 /test_dir/test.txt HTTP/1.1 200 OK Wed, 18 Oct 2017 15:16:04 GMT ab0b4b7973803c03639b848682b5f38c text/plain 41 test.txt 2017-10-18T15:16:04Z webdav-client-python-3-3.14.6/tests/responses/get_property.xml000066400000000000000000000005471410526511000244410ustar00rootroot00000000000000 /test_dir/test.txt HTTP/1.1 200 OK aValue webdav-client-python-3-3.14.6/tests/responses/is_dir_directory.xml000066400000000000000000000136041410526511000252510ustar00rootroot00000000000000 / HTTP/1.1 200 OK 2012-04-04T20:00:00Z disk Wed, 04 Apr 2012 20:00:00 GMT /test_dir/ HTTP/1.1 200 OK 2018-05-10T07:31:13Z test_dir Thu, 10 May 2018 07:31:13 GMT /%D0%93%D0%BE%D1%80%D1%8B.jpg HTTP/1.1 200 OK 1392851f0668017168ee4b5a59d66e7b 2018-05-09T14:44:28Z Горы.jpg Wed, 09 May 2018 14:44:28 GMT image/jpeg 1762478 /%D0%97%D0%B8%D0%BC%D0%B0.jpg HTTP/1.1 200 OK a64146fee5e15b3b94c204e544426d43 2018-05-09T14:44:28Z Зима.jpg Wed, 09 May 2018 14:44:28 GMT image/jpeg 1394575 /%D0%9C%D0%B8%D1%88%D0%BA%D0%B8.jpg HTTP/1.1 200 OK 569a1c98696050439b5b2a1ecfa52d19 2018-05-09T14:44:27Z Мишки.jpg Wed, 09 May 2018 14:44:27 GMT image/jpeg 1555830 /%D0%9C%D0%BE%D1%80%D0%B5.jpg HTTP/1.1 200 OK ab903d9cab031eca2a8f12f37bbc9d37 2018-05-09T14:44:27Z Море.jpg Wed, 09 May 2018 14:44:27 GMT image/jpeg 1080301 /%D0%9C%D0%BE%D1%81%D0%BA%D0%B2%D0%B0.jpg HTTP/1.1 200 OK d27d72a3059ad5ebed7a5470459d2670 2018-05-09T14:44:27Z Москва.jpg Wed, 09 May 2018 14:44:27 GMT image/jpeg 1454228 /%D0%A1%D0%B0%D0%BD%D0%BA%D1%82-%D0%9F%D0%B5%D1%82%D0%B5%D1%80%D0%B1%D1%83%D1%80%D0%B3.jpg HTTP/1.1 200 OK f1abe3b27b410128623fd1ca00a45c29 2018-05-09T14:44:27Z Санкт-Петербург.jpg Wed, 09 May 2018 14:44:27 GMT image/jpeg 2573704 /%D0%A5%D0%BB%D0%B5%D0%B1%D0%BD%D1%8B%D0%B5%20%D0%BA%D1%80%D0%BE%D1%88%D0%BA%D0%B8.mp4 HTTP/1.1 200 OK ea977f513074d5524bee3638798183b9 2018-05-09T14:44:28Z Хлебные крошки.mp4 Wed, 09 May 2018 14:44:28 GMT video/mp4 31000079 webdav-client-python-3-3.14.6/tests/responses/is_dir_directory_not_supported.xml000066400000000000000000000007671410526511000302440ustar00rootroot00000000000000 /test_dir/ HTTP/1.1 200 OK 2018-05-10T07:31:13Z test_dir Thu, 10 May 2018 07:31:13 GMT webdav-client-python-3-3.14.6/tests/responses/is_dir_file.xml000066400000000000000000000022501410526511000241570ustar00rootroot00000000000000 /test_dir/ HTTP/1.1 200 OK 2018-05-10T07:40:11Z test_dir Thu, 10 May 2018 07:40:11 GMT /test_dir/test.txt HTTP/1.1 200 OK ab0b4b7973803c03639b848682b5f38c 2018-05-10T07:40:12Z test.txt Thu, 10 May 2018 07:40:12 GMT text/plain 41 webdav-client-python-3-3.14.6/tests/test.txt000066400000000000000000000000511410526511000206610ustar00rootroot00000000000000test content for testing of webdav clientwebdav-client-python-3-3.14.6/tests/test_client_it.py000066400000000000000000000413271410526511000225370ustar00rootroot00000000000000import os.path import shutil import unittest from io import BytesIO, StringIO from os import path from time import sleep from tests.base_client_it import BaseClientTestCase from webdav3.client import Client from webdav3.exceptions import MethodNotSupported, OptionNotValid, RemoteResourceNotFound class ClientTestCase(BaseClientTestCase): pulled_file = BaseClientTestCase.local_path_dir + os.sep + BaseClientTestCase.local_file def test_timeout_set(self): self.assertEqual(10, self.client.timeout) def test_list(self): self._prepare_for_downloading() file_list = self.client.list() self.assertIsNotNone(file_list, 'List of files should not be None') self.assertGreater(file_list.__len__(), 0, 'Expected that amount of files more then 0') def test_list_no_parent(self): self._prepare_for_downloading(inner_dir=True) file_list = self.client.list(self.remote_path_dir) for file_name in file_list: self.assertNotEqual(self.remote_path_dir, file_name, 'Result should not contain parent directory') def test_list_info(self): self._prepare_for_downloading() list_info = self.client.list(get_info=True) self.assertIsNotNone(list_info, 'List of files should not be None') self.assertTrue('created' in list_info[0].keys(), 'info should contain created') self.assertTrue('name' in list_info[0].keys(), 'info should contain name') self.assertTrue('modified' in list_info[0].keys(), 'info should contain modified') self.assertTrue('size' in list_info[0].keys(), 'info should contain size') self.assertTrue('etag' in list_info[0].keys(), 'info should contain etag') self.assertTrue('isdir' in list_info[0].keys(), 'info should contain isdir') self.assertTrue('path' in list_info[0].keys(), 'info should contain path') self.assertTrue('content_type' in list_info[0].keys(), 'info should contain content_type') def test_free(self): if 'localhost' in self.options['webdav_hostname']: with self.assertRaises(MethodNotSupported): self.client.free() else: self.assertNotEqual(self.client.free(), 0, 'Expected that free space on WebDAV server is more then 0 bytes') def test_check(self): self._prepare_for_downloading(inner_dir=True) self.assertTrue(self.client.check(), 'Expected that root directory is exist') self.assertTrue(self.client.check(self.remote_path_dir), 'Expected that the directory is exist') self.assertTrue(self.client.check(self.remote_inner_path_dir), 'Expected that the inner directory is exist') self.assertTrue(self.client.check(self.remote_path_file), 'Expected that the file is exist') self.assertTrue(self.client.check(self.remote_inner_path_file), 'Expected that the inner file is exist') def test_check_does_not_exist(self): self._prepare_for_downloading(inner_dir=True) self.assertFalse(self.client.check('wrong'), 'Expected that the directory is not exist') self.assertFalse(self.client.check(self.remote_path_dir + '/wrong'), 'Expected that the inner directory is not exist') self.assertFalse(self.client.check(self.remote_path_dir + '/wrong.txt'), 'Expected that the file is not exist') self.assertFalse(self.client.check(self.remote_inner_path_dir + '/wrong.txt'), 'Expected that the inner file is not exist') def test_check_another_client(self): self._prepare_for_uploading() client = Client(self.options) if self.client.check(self.remote_path_dir): self.client.clean(self.remote_path_dir) self.assertTrue(self.client.mkdir(self.remote_path_dir)) self.assertTrue(self.client.check(self.remote_path_dir)) self.client.upload_sync(remote_path=self.remote_path_file, local_path=self.local_path_dir) self.assertTrue(self.client.check(self.remote_path_file)) self.assertTrue(client.check(self.remote_path_dir)) self.assertTrue(client.check(self.remote_path_file)) def test_mkdir(self): if self.client.check(self.remote_path_dir): self.client.clean(self.remote_path_dir) self.client.mkdir(self.remote_path_dir) self.assertTrue(self.client.check(self.remote_path_dir), 'Expected the directory is created.') def test_download_from(self): self._prepare_for_downloading() buff = BytesIO() self.client.download_from(buff=buff, remote_path=self.remote_path_file) self.assertEqual(buff.getvalue(), b'test content for testing of webdav client') def test_download_from_compressed(self): self._prepare_dir_for_downloading(self.remote_path_dir, self.remote_compressed_path_file, local_file_path=self.local_compressed_file_path) buff = BytesIO() self.client.download_from(buff=buff, remote_path=self.remote_compressed_path_file) self.assertIn(b'test content for testing of webdav client', buff.getvalue()) def test_download_from_dir(self): self._prepare_for_downloading() buff = BytesIO() with self.assertRaises(OptionNotValid): self.client.download_from(buff=buff, remote_path=self.remote_path_dir) def test_download_from_wrong_file(self): self._prepare_for_downloading() buff = BytesIO() with self.assertRaises(RemoteResourceNotFound): self.client.download_from(buff=buff, remote_path='wrong') def test_download_directory_wrong(self): self._prepare_for_downloading() with self.assertRaises(RemoteResourceNotFound): self.client.download_directory(remote_path='wrong', local_path=self.local_path_dir) def test_download(self): self._prepare_for_downloading() self.client.download(local_path=self.local_path_dir, remote_path=self.remote_path_dir) self.assertTrue(path.exists(self.local_path_dir), 'Expected the directory is downloaded.') self.assertTrue(path.isdir(self.local_path_dir), 'Expected this is a directory.') self.assertTrue(path.exists(self.local_path_dir + os.path.sep + self.local_file), 'Expected the file is downloaded') self.assertTrue(path.isfile(self.local_path_dir + os.path.sep + self.local_file), 'Expected this is a file') def test_download_sync(self): self._prepare_for_downloading() def callback(): self.assertTrue(path.exists(self.local_path_dir + os.path.sep + self.local_file), 'Expected the file is downloaded') self.assertTrue(path.isfile(self.local_path_dir + os.path.sep + self.local_file), 'Expected this is a file') self.client.download_sync(local_path=self.local_path_dir + os.path.sep + self.local_file, remote_path=self.remote_path_file, callback=callback) self.assertTrue(path.exists(self.local_path_dir + os.path.sep + self.local_file), 'Expected the file has already been downloaded') def test_download_async(self): self._prepare_for_downloading() def callback(): self.assertTrue(path.exists(self.local_path_dir + os.path.sep + self.local_file), 'Expected the file is downloaded') self.assertTrue(path.isfile(self.local_path_dir + os.path.sep + self.local_file), 'Expected this is a file') self.client.download_async(local_path=self.local_path_dir + os.path.sep + self.local_file, remote_path=self.remote_path_file, callback=callback) self.assertFalse(path.exists(self.local_path_dir + os.path.sep + self.local_file), 'Expected the file has not been downloaded yet') # It needs for ending download before environment will be cleaned in tearDown sleep(0.4) def test_upload_from(self): self._prepare_for_uploading() buff = StringIO() buff.write(u'test content for testing of webdav client') self.client.upload_to(buff=buff, remote_path=self.remote_path_file) self.assertTrue(self.client.check(self.remote_path_file), 'Expected the file is uploaded.') def test_upload(self): self._prepare_for_uploading() self.client.upload(remote_path=self.remote_path_file, local_path=self.local_path_dir) self.assertTrue(self.client.check(self.remote_path_dir), 'Expected the directory is created.') self.assertTrue(self.client.check(self.remote_path_file), 'Expected the file is uploaded.') def test_upload_file(self): self._prepare_for_uploading() self.client.upload_file(remote_path=self.remote_path_file, local_path=self.local_file_path) self.assertTrue(self.client.check(remote_path=self.remote_path_file), 'Expected the file is uploaded.') def test_upload_sync(self): self._prepare_for_uploading() def callback(): self.assertTrue(self.client.check(self.remote_path_dir), 'Expected the directory is created.') self.assertTrue(self.client.check(self.remote_path_file), 'Expected the file is uploaded.') self.client.upload_sync(remote_path=self.remote_path_file, local_path=self.local_path_dir, callback=callback) def test_copy(self): self._prepare_for_downloading() self.client.mkdir(remote_path=self.remote_path_dir2) self.client.copy(remote_path_from=self.remote_path_file, remote_path_to=self.remote_path_file2) self.assertTrue(self.client.check(remote_path=self.remote_path_file2)) def test_move(self): self._prepare_for_downloading() self.client.mkdir(remote_path=self.remote_path_dir2) self.client.move(remote_path_from=self.remote_path_file, remote_path_to=self.remote_path_file2) self.assertFalse(self.client.check(remote_path=self.remote_path_file)) self.assertTrue(self.client.check(remote_path=self.remote_path_file2)) def test_clean(self): self._prepare_for_downloading() self.client.clean(remote_path=self.remote_path_dir) self.assertFalse(self.client.check(remote_path=self.remote_path_file)) self.assertFalse(self.client.check(remote_path=self.remote_path_dir)) def test_info(self): self._prepare_for_downloading() result = self.client.info(remote_path=self.remote_path_file) self.assertEqual(result['size'], '41') self.assertTrue('created' in result) self.assertTrue('modified' in result) def test_directory_is_dir(self): self._prepare_for_downloading() self.assertTrue(self.client.is_dir(self.remote_path_dir), 'Should return True for directory') def test_file_is_not_dir(self): self._prepare_for_downloading() self.assertFalse(self.client.is_dir(self.remote_path_file), 'Should return False for file') def test_get_property_of_non_exist(self): self._prepare_for_downloading() result = self.client.get_property(remote_path=self.remote_path_file, option={'name': 'aProperty'}) self.assertEqual(result, None, 'For not found property should return value as None') def test_set_property(self): self._prepare_for_downloading() self.client.set_property(remote_path=self.remote_path_file, option={ 'namespace': 'http://test.com/ns', 'name': 'aProperty', 'value': 'aValue' }) result = self.client.get_property(remote_path=self.remote_path_file, option={'namespace': 'http://test.com/ns', 'name': 'aProperty'}) self.assertEqual(result, 'aValue', 'Property value should be set') def test_set_property_batch(self): self._prepare_for_downloading() self.client.set_property_batch(remote_path=self.remote_path_file, option=[ { 'namespace': 'http://test.com/ns', 'name': 'aProperty', 'value': 'aValue' }, { 'namespace': 'http://test.com/ns', 'name': 'aProperty2', 'value': 'aValue2' } ]) result = self.client.get_property(remote_path=self.remote_path_file, option={'namespace': 'http://test.com/ns', 'name': 'aProperty'}) self.assertEqual(result, 'aValue', 'First property value should be set') result = self.client.get_property(remote_path=self.remote_path_file, option={'namespace': 'http://test.com/ns', 'name': 'aProperty2'}) self.assertEqual(result, 'aValue2', 'Second property value should be set') def test_pull(self): self._prepare_for_downloading(True) self.client.pull(self.remote_path_dir, self.local_path_dir) self.assertTrue(path.exists(self.local_path_dir), 'Expected the directory is downloaded.') self.assertTrue(path.exists(self.local_path_dir + os.path.sep + self.inner_dir_name), 'Expected the directory is downloaded.') self.assertTrue(path.exists(self.local_path_dir + os.path.sep + self.inner_dir_name), 'Expected the directory is downloaded.') self.assertTrue(path.isdir(self.local_path_dir), 'Expected this is a directory.') self.assertTrue(path.isdir(self.local_path_dir + os.path.sep + self.inner_dir_name), 'Expected this is a directory.') self.assertTrue(path.exists(self.local_path_dir + os.path.sep + self.local_file), 'Expected the file is downloaded') self.assertTrue(path.isfile(self.local_path_dir + os.path.sep + self.local_file), 'Expected this is a file') def test_push(self): self._prepare_for_uploading() self.client.push(self.remote_path_dir, self.local_path_dir) self.assertTrue(self.client.check(self.remote_path_dir), 'Expected the directory is created.') self.assertTrue(self.client.check(self.remote_path_file), 'Expected the file is uploaded.') def test_valid(self): self.assertTrue(self.client.valid()) def test_check_is_overridden(self): self.assertEqual('GET', self.client.requests['check']) def test_pull_newer(self): init_modification_time = int(self._prepare_local_test_file_and_get_modification_time()) sleep(1) self._prepare_for_downloading(base_path='time/') result = self.client.pull('time/' + self.remote_path_dir, self.local_path_dir) update_modification_time = int(os.path.getmtime(self.pulled_file)) self.assertTrue(result) self.assertGreater(update_modification_time, init_modification_time) self.client.clean(remote_path='time/' + self.remote_path_dir) def test_pull_older(self): self._prepare_for_downloading(base_path='time/') sleep(1) init_modification_time = int(self._prepare_local_test_file_and_get_modification_time()) result = self.client.pull('time/' + self.remote_path_dir, self.local_path_dir) update_modification_time = int(os.path.getmtime(self.pulled_file)) self.assertFalse(result) self.assertEqual(update_modification_time, init_modification_time) self.client.clean(remote_path='time/' + self.remote_path_dir) def test_push_newer(self): self._prepare_for_downloading(base_path='time/') sleep(1) self._prepare_for_uploading() init_modification_time = self.client.info('time/' + self.remote_path_file)['modified'] result = self.client.push('time/' + self.remote_path_dir, self.local_path_dir) update_modification_time = self.client.info('time/' + self.remote_path_file)['modified'] self.assertTrue(result) self.assertNotEqual(init_modification_time, update_modification_time) self.client.clean(remote_path='time/' + self.remote_path_dir) def test_push_older(self): self._prepare_for_uploading() sleep(1) self._prepare_for_downloading(base_path='time/') init_modification_time = self.client.info('time/' + self.remote_path_file)['modified'] result = self.client.push('time/' + self.remote_path_dir, self.local_path_dir) update_modification_time = self.client.info('time/' + self.remote_path_file)['modified'] self.assertFalse(result) self.assertEqual(init_modification_time, update_modification_time) self.client.clean(remote_path='time/' + self.remote_path_dir) def _prepare_local_test_file_and_get_modification_time(self): if not path.exists(path=self.local_path_dir): os.mkdir(self.local_path_dir) if not path.exists(path=self.local_path_dir + os.sep + self.local_file): shutil.copy(src=self.local_file_path, dst=self.pulled_file) return os.path.getmtime(self.pulled_file) if __name__ == '__main__': unittest.main() webdav-client-python-3-3.14.6/tests/test_client_resource_it.py000066400000000000000000000065471410526511000244530ustar00rootroot00000000000000import io import unittest from os import path from os.path import sep from tests.base_client_it import BaseClientTestCase from webdav3.client import Resource from webdav3.urn import Urn class ResourceTestCase(BaseClientTestCase): def test_str(self): self._prepare_for_downloading() resource = Resource(self.client, Urn(self.remote_path_file)) self.assertEqual('resource /test_dir/test.txt', resource.__str__()) def test_is_not_dir(self): self._prepare_for_downloading() resource = Resource(self.client, Urn(self.remote_path_file)) self.assertFalse(resource.is_dir()) def test_is_dir(self): self._prepare_for_downloading() resource = Resource(self.client, Urn(self.remote_path_dir)) self.assertTrue(resource.is_dir()) def test_rename(self): self._prepare_for_downloading() resource = Resource(self.client, Urn(self.remote_path_file)) resource.rename('new_name.text') self.assertTrue(self.client.check(self.remote_path_dir + '/new_name.text')) def test_move(self): self._prepare_for_downloading() resource = Resource(self.client, Urn(self.remote_path_file)) self.client.mkdir(self.remote_path_dir2) resource.move(self.remote_path_file2) self.assertFalse(self.client.check(self.remote_path_file)) self.assertTrue(self.client.check(self.remote_path_file2)) def test_copy(self): self._prepare_for_downloading() resource = Resource(self.client, Urn(self.remote_path_file)) self.client.mkdir(self.remote_path_dir2) resource.copy(self.remote_path_file2) self.assertTrue(self.client.check(self.remote_path_file)) self.assertTrue(self.client.check(self.remote_path_file2)) def test_info(self): self._prepare_for_downloading() resource = Resource(self.client, Urn(self.remote_path_file)) info = resource.info() self.assertIsNotNone(info) self.assertGreater(len(info), 0) def test_info_params(self): self._prepare_for_downloading() resource = Resource(self.client, Urn(self.remote_path_file)) info = resource.info(['size']) self.assertIsNotNone(info) self.assertEqual(1, len(info)) self.assertTrue('size' in info) def test_clean(self): self._prepare_for_downloading() resource = Resource(self.client, Urn(self.remote_path_file)) resource.clean() self.assertFalse(self.client.check(self.remote_path_file)) def test_check(self): self._prepare_for_downloading() resource = Resource(self.client, Urn(self.remote_path_file)) self.assertTrue(resource.check()) def test_read_from_and_write_to(self): self._prepare_for_downloading() resource = Resource(self.client, Urn(self.remote_path_file)) resource.read_from('string') buff = io.BytesIO(b'') resource.write_to(buff) self.assertEqual(buff.getvalue().decode(), 'string') def test_read_and_write(self): self._prepare_for_uploading() resource = Resource(self.client, Urn(self.remote_path_file)) resource.read(self.local_file_path) resource.write(self.local_path_dir + sep + 'test2.txt') self.assertTrue(path.exists(self.local_path_dir + sep + 'test2.txt')) if __name__ == '__main__': unittest.main() webdav-client-python-3-3.14.6/tests/test_client_unit.py000066400000000000000000000274721410526511000231070ustar00rootroot00000000000000# coding=utf-8 import unittest from unittest import TestCase from unittest.mock import patch, Mock, PropertyMock from lxml.etree import ElementTree, Element from webdav3.client import WebDavXmlUtils as Utils, listdir, MethodNotSupported, RemoteResourceNotFound, Client from webdav3.exceptions import ResponseErrorCode, NotEnoughSpace def read_file_content(file_name): with open(file_name, encoding='utf-8') as f: return f.read().encode('utf-8') class ClientTestCase(TestCase): def test_parse_get_list_response(self): content = read_file_content('./tests/responses/get_list.xml') result = Utils.parse_get_list_response(content) self.assertEqual(result.__len__(), 2) self.assertTrue(result[0].is_dir(), '{} should be marked as directory'.format(result[0].path())) self.assertFalse(result[1].is_dir(), '{} should be marked as file'.format(result[1].path())) self.assertEqual(result[1].__str__(), '/test_dir/test.txt') def test_parse_get_list_info_response(self): content = read_file_content('./tests/responses/get_list_info.xml') result = Utils.parse_get_list_info_response(content) print(result) self.assertEqual(result[0]['created'], '2017-10-18T15:16:04Z') self.assertEqual(result[0]['name'], 'test.txt') self.assertEqual(result[0]['modified'], 'Wed, 18 Oct 2017 15:16:04 GMT') self.assertEqual(result[0]['size'], '41') self.assertEqual(result[0]['etag'], 'ab0b4b7973803c03639b848682b5f38c') self.assertEqual(result[0]['isdir'], False) self.assertEqual(result[0]['path'], '/test_dir/test.txt') self.assertEqual(result[0]['content_type'], 'text/plain') def test_parse_get_list_response_empty(self): content = read_file_content('./tests/responses/get_list_empty.xml') result = Utils.parse_get_list_response(content) self.assertEqual(result.__len__(), 0) def test_parse_get_list_response_incorrect(self): content = read_file_content('./tests/responses/get_list_incorrect.xml') result = Utils.parse_get_list_response(content) self.assertEqual(result.__len__(), 0) def test_parse_get_list_response_dirs(self): content = read_file_content('./tests/responses/get_list_directories.xml') result = Utils.parse_get_list_response(content) self.assertEqual(result.__len__(), 5) for d in result: self.assertTrue(d.is_dir(), '{} should be marked as directory'.format(d.path())) def test_create_free_space_request_content(self): result = Utils.create_free_space_request_content() self.assertEqual(result, b'\n' b'') def test_parse_free_space_response(self): content = read_file_content('./tests/responses/free_space.xml') result = Utils.parse_free_space_response(content, 'localhost') self.assertEqual(result, 10737417543) def test_parse_free_space_response_not_supported(self): content = read_file_content('./tests/responses/free_space_not_supported.xml') self.assertRaises(MethodNotSupported, Utils.parse_free_space_response, content, 'localhost') def test_parse_free_space_response_incorrect(self): content = read_file_content('./tests/responses/free_space_incorrect.xml') result = Utils.parse_free_space_response(content, 'localhost') self.assertEqual(result, '') def test_parse_info_response(self): content = read_file_content('./tests/responses/get_info.xml') result = Utils.parse_info_response(content, '/test_dir/test.txt', 'localhost') self.assertEqual(result['created'], '2017-10-18T15:16:04Z') self.assertEqual(result['name'], 'test.txt') self.assertEqual(result['modified'], 'Wed, 18 Oct 2017 15:16:04 GMT') self.assertEqual(result['size'], '41') self.assertEqual(result['content_type'], 'text/plain') def test_get_info_from_response(self): content = read_file_content('./tests/responses/get_info.xml') response = Utils.extract_response_for_path(content, '/test_dir/test.txt', 'localhost') result = Utils.get_info_from_response(response) self.assertEqual(result['created'], '2017-10-18T15:16:04Z') self.assertEqual(result['name'], 'test.txt') self.assertEqual(result['modified'], 'Wed, 18 Oct 2017 15:16:04 GMT') self.assertEqual(result['size'], '41') self.assertEqual(result['content_type'], 'text/plain') def test_create_get_property_request_content(self): option = { 'namespace': 'test', 'name': 'aProperty' } result = Utils.create_get_property_request_content(option=option, ) self.assertEqual(result, b'\n' b'') def test_create_get_property_request_content_name_only(self): option = { 'name': 'aProperty' } result = Utils.create_get_property_request_content(option=option) self.assertEqual(result, b'\n' b'') def test_parse_get_property_response(self): content = read_file_content('./tests/responses/get_property.xml') result = Utils.parse_get_property_response(content=content, name='aProperty') self.assertEqual(result, 'aValue') def test_create_set_one_property_request_content(self): option = { 'namespace': 'test', 'name': 'aProperty', 'value': 'aValue' } result = Utils.create_set_property_batch_request_content(options=[option]) self.assertEqual(result, b'\n' b'aValue') def test_create_set_one_property_request_content_name_only(self): option = { 'name': 'aProperty' } result = Utils.create_set_property_batch_request_content(options=[option]) self.assertEqual(result, b'\n' b'') def test_create_set_property_batch_request_content(self): options = [ { 'namespace': 'test', 'name': 'aProperty', 'value': 'aValue' }, { 'namespace': 'test2', 'name': 'aProperty2', 'value': 'aValue2' } ] result = Utils.create_set_property_batch_request_content(options=options) self.assertEqual(result, b'\n' b'aValueaValue2' b'') def test_create_set_property_batch_request_content_name_only(self): options = [ { 'name': 'aProperty' }, { 'name': 'aProperty2' } ] result = Utils.create_set_property_batch_request_content(options=options) self.assertEqual(result, b'\n' b'' b'') def test_etree_to_string(self): tree = ElementTree(Element('test')) result = Utils.etree_to_string(tree) self.assertEqual(result, b'\n') def test_parse_is_dir_response_not_supported(self): content = read_file_content('./tests/responses/is_dir_directory_not_supported.xml') path = '/test_dir' hostname = 'https://webdav.yandex.ru' self.assertRaises(MethodNotSupported, Utils.parse_is_dir_response, content, path, hostname) def test_parse_is_dir_response_directory(self): content = read_file_content('./tests/responses/is_dir_directory.xml') path = '/test_dir' hostname = 'https://webdav.yandex.ru' result = Utils.parse_is_dir_response(content, path, hostname) self.assertTrue(result, 'It should be directory') def test_parse_is_dir_response_file(self): content = read_file_content('./tests/responses/is_dir_file.xml') path = '/test_dir/test.txt' hostname = 'https://webdav.yandex.ru' result = Utils.parse_is_dir_response(content, path, hostname) self.assertFalse(result, 'It should be file') def test_listdir_inner_dir(self): file_names = listdir('.') self.assertGreater(len(file_names), 0) self.assertTrue('README.md' in file_names) def test_extract_response_for_path_not_supported(self): self.assertRaises(MethodNotSupported, Utils.extract_response_for_path, 'WrongXML', 'test', 'https://webdav.ru') def test_extract_response_for_path_not_found(self): content = read_file_content('./tests/responses/is_dir_directory.xml') hostname = 'https://webdav.yandex.ru' self.assertRaises(RemoteResourceNotFound, Utils.extract_response_for_path, content, 'wrong_name', hostname) def test_parse_is_dir_response_file_with_prefix(self): content = read_file_content('./tests/responses/is_dir_file.xml') path = '/test.txt' hostname = 'https://webdav.yandex.ru/test_dir/' result = Utils.parse_is_dir_response(content, path, hostname) self.assertFalse(result, 'It should be file') def test_utils_created(self): self.assertIsNotNone(Utils()) options = { 'webdav_hostname': 'http://localhost:8585', 'webdav_login': 'alice', 'webdav_password': 'secret1234' } @patch('requests.Session') def test_auth_invoked(self, mock_session): client = Client(self.options) client.session.auth.return_value = True client.session.request.return_value.status_code = 200 client.execute_request(action='list', path='') client.session.request.assert_any_call(auth=None, cert=None, data=None, headers={'Accept': '*/*', 'Depth': '1'}, method='PROPFIND', stream=True, timeout=30, url='http://localhost:8585', verify=True) @patch('requests.Session') def test_response_error_code(self, mock_session): client = Client(self.options) client.session.request.return_value.status_code = 400 self.assertRaises(ResponseErrorCode, client.execute_request, action='list', path='') @patch('requests.Session') def test_method_not_supported(self, mock_session): client = Client(self.options) client.session.request.return_value.status_code = 405 self.assertRaises(MethodNotSupported, client.execute_request, action='list', path='') @patch('requests.Session') def test_not_found(self, mock_session): client = Client(self.options) client.session.request.return_value.status_code = 404 self.assertRaises(RemoteResourceNotFound, client.execute_request, action='list', path='') @patch('requests.Session') def test_not_enough_space(self, mock_session): client = Client(self.options) client.session.request.return_value.status_code = 507 self.assertRaises(NotEnoughSpace, client.execute_request, action='list', path='') if __name__ == '__main__': unittest.main() webdav-client-python-3-3.14.6/tests/test_connection.py000066400000000000000000000103761410526511000227240ustar00rootroot00000000000000import unittest from webdav3.client import get_options from webdav3.connection import WebDAVSettings, OptionNotValid, ConnectionSettings class ConnectionTestCase(unittest.TestCase): def test_connection_settings_valid(self): options = { 'webdav_hostname': 'http://localhost:8585', 'webdav_login': 'alice', 'webdav_password': 'secret1234' } webdav_options = get_options(option_type=WebDAVSettings, from_options=options) settings = WebDAVSettings(webdav_options) self.assertTrue(settings.is_valid()) self.assertTrue(settings.valid()) def test_connection_settings_timeout_set(self): options = { 'webdav_hostname': 'http://localhost:8585', 'webdav_login': 'alice', 'webdav_password': 'secret1234', 'timeout': 60 } webdav_options = get_options(option_type=WebDAVSettings, from_options=options) settings = WebDAVSettings(webdav_options) self.assertEqual(60, settings.timeout) def test_connection_settings_timeout_default(self): options = { 'webdav_hostname': 'http://localhost:8585', 'webdav_login': 'alice', 'webdav_password': 'secret1234' } webdav_options = get_options(option_type=WebDAVSettings, from_options=options) settings = WebDAVSettings(webdav_options) self.assertEqual(30, settings.timeout) def test_connection_settings_no_hostname(self): options = { 'webdav_login': 'alice', 'webdav_password': 'secret1234' } webdav_options = get_options(option_type=WebDAVSettings, from_options=options) settings = WebDAVSettings(webdav_options) self.assertRaises(OptionNotValid, settings.is_valid) self.assertFalse(settings.valid()) def test_connection_settings_no_login(self): options = { 'webdav_hostname': 'http://localhost:8585', 'webdav_password': 'secret1234' } webdav_options = get_options(option_type=WebDAVSettings, from_options=options) settings = WebDAVSettings(webdav_options) self.assertRaises(OptionNotValid, settings.is_valid) self.assertFalse(settings.valid()) def test_connection_settings_anonymous_login(self): options = { 'webdav_hostname': 'http://localhost:8585' } webdav_options = get_options(option_type=WebDAVSettings, from_options=options) settings = WebDAVSettings(webdav_options) self.assertTrue(settings.valid()) def test_connection_settings_wrong_cert_path(self): options = { 'webdav_hostname': 'http://localhost:8585', 'webdav_login': 'alice', 'cert_path': './wrong.file', 'webdav_password': 'secret1234' } webdav_options = get_options(option_type=WebDAVSettings, from_options=options) settings = WebDAVSettings(webdav_options) self.assertRaises(OptionNotValid, settings.is_valid) self.assertFalse(settings.valid()) def test_connection_settings_wrong_key_path(self): options = { 'webdav_hostname': 'http://localhost:8585', 'webdav_login': 'alice', 'key_path': './wrong.file', 'webdav_password': 'secret1234' } webdav_options = get_options(option_type=WebDAVSettings, from_options=options) settings = WebDAVSettings(webdav_options) self.assertRaises(OptionNotValid, settings.is_valid) self.assertFalse(settings.valid()) def test_connection_settings_with_key_path_an_no_cert_path(self): options = { 'webdav_hostname': 'http://localhost:8585', 'webdav_login': 'alice', 'key_path': './publish.sh', 'webdav_password': 'secret1234' } webdav_options = get_options(option_type=WebDAVSettings, from_options=options) settings = WebDAVSettings(webdav_options) self.assertRaises(OptionNotValid, settings.is_valid) self.assertFalse(settings.valid()) def test_connection_settings_does_nothing(self): settings = ConnectionSettings() settings.is_valid() self.assertTrue(settings.valid()) if __name__ == '__main__': unittest.main() webdav-client-python-3-3.14.6/tests/test_cyrilic_client_it.py000066400000000000000000000016371410526511000242550ustar00rootroot00000000000000import os import unittest from tests.test_client_it import ClientTestCase class MultiClientTestCase(ClientTestCase): remote_path_file = 'директория/тестовый.txt' remote_path_file2 = 'директория/тестовый2.txt' remote_compressed_path_file = 'директория/сжатый.txt' remote_inner_path_file = 'директория/вложенная/тестовый.txt' remote_path_dir = 'директория' remote_path_dir2 = 'директория2' remote_inner_path_dir = 'директория/вложенная' inner_dir_name = 'вложенная' local_base_dir = 'tests/' local_file = 'тестовый.txt' local_file_path = local_base_dir + 'тестовый.txt' local_path_dir = local_base_dir + 'res/директория' pulled_file = local_path_dir + os.sep + local_file if __name__ == '__main__': unittest.main() webdav-client-python-3-3.14.6/tests/test_exceptions.py000066400000000000000000000042171410526511000227430ustar00rootroot00000000000000import unittest from webdav3.exceptions import OptionNotValid, LocalResourceNotFound, RemoteResourceNotFound, MethodNotSupported, ConnectionException, NoConnection, \ RemoteParentNotFound, NotConnection, ResponseErrorCode, NotEnoughSpace class ExceptionsTestCase(unittest.TestCase): def test_option_not_valid(self): exception = OptionNotValid('Name', 'Value', 'Namespace/') self.assertEqual("Option (Namespace/Name=Value) have invalid name or value", exception.__str__()) def test_local_resource_not_found(self): exception = LocalResourceNotFound('Path') self.assertEqual("Local file: Path not found", exception.__str__()) def test_remote_resource_not_found(self): exception = RemoteResourceNotFound('Path') self.assertEqual("Remote resource: Path not found", exception.__str__()) def test_remote_parent_not_found(self): exception = RemoteParentNotFound('Path') self.assertEqual("Remote parent for: Path not found", exception.__str__()) def test_method_not_supported(self): exception = MethodNotSupported('HEAD', 'Server') self.assertEqual("Method 'HEAD' not supported for Server", exception.__str__()) def test_connection_exception(self): exception = ConnectionException(MethodNotSupported('HEAD', 'Server')) self.assertEqual("Method 'HEAD' not supported for Server", exception.__str__()) def test_no_connection(self): exception = NoConnection('Server') self.assertEqual("No connection with Server", exception.__str__()) def test_not_connection_legacy(self): exception = NotConnection('Server') self.assertEqual("No connection with Server", exception.__str__()) def test_response_error_code(self): exception = ResponseErrorCode('http://text/', 502, 'Service Unavailable') self.assertEqual("Request to http://text/ failed with code 502 and message: Service Unavailable", exception.__str__()) def test_not_enough_space(self): exception = NotEnoughSpace() self.assertEqual("Not enough space on the server", exception.__str__()) if __name__ == '__main__': unittest.main() webdav-client-python-3-3.14.6/tests/test_multi_client_it.py000066400000000000000000000011761410526511000237470ustar00rootroot00000000000000import unittest from tests.test_client_it import ClientTestCase from webdav3.client import Client class MultiClientTestCase(ClientTestCase): options2 = { 'webdav_hostname': 'https://wrong.url.ru', 'webdav_login': 'webdavclient.test2', 'webdav_password': 'Qwerty123!', 'webdav_override_methods': { 'check': 'FAKE', 'download': 'FAKE', 'upload': 'FAKE', 'clean': 'FAKE', } } def setUp(self): super(ClientTestCase, self).setUp() self.second_client = Client(self.options2) if __name__ == '__main__': unittest.main() webdav-client-python-3-3.14.6/tests/test_tailing_slash_client_it.py000066400000000000000000000014371410526511000254360ustar00rootroot00000000000000import unittest from tests.test_client_it import ClientTestCase class TailingSlashClientTestCase(ClientTestCase): options = { 'webdav_hostname': 'http://localhost:8585/', 'webdav_login': 'alice', 'webdav_password': 'secret1234', 'webdav_override_methods': { 'check': 'GET' } } def test_timeout_set(self): self.assertEqual(30, self.client.timeout) def test_list_inner(self): self._prepare_for_downloading(True) file_list = self.client.list(self.remote_inner_path_dir) self.assertIsNotNone(file_list, 'List of files should not be None') def test_hostname_no_tailing_slash(self): self.assertEqual('5', self.client.webdav.hostname[-1]) if __name__ == '__main__': unittest.main() webdav-client-python-3-3.14.6/tests/тестовый.txt000066400000000000000000000000511410526511000255430ustar00rootroot00000000000000test content for testing of webdav clientwebdav-client-python-3-3.14.6/wdc000066400000000000000000000531061410526511000165100ustar00rootroot00000000000000#!/usr/bin/python # PYTHON_ARGCOMPLETE_OK from __future__ import print_function import argparse import getpass import os import platform import shlex import struct import subprocess import sys from base64 import b64decode, b64encode from distutils.util import strtobool import argcomplete from webdav3.client import Client, WebDavException, NotConnection, Urn def get_terminal_size(): current_os = platform.system() tuple_xy = None if current_os == 'Windows': tuple_xy = _get_terminal_size_windows() if tuple_xy is None: tuple_xy = _get_terminal_size_input() if current_os in ['Linux', 'Darwin'] or current_os.startswith('CYGWIN'): tuple_xy = _get_terminal_size_linux() if tuple_xy is None: tuple_xy = 80, 25 return tuple_xy def _get_terminal_size_windows(): try: from ctypes import windll, create_string_buffer h = windll.kernel32.GetStdHandle(-12) csbi = create_string_buffer(22) res = windll.kernel32.GetConsoleScreenBufferInfo(h, csbi) if res: (bufx, bufy, curx, cury, wattr, left, top, right, bottom, maxx, maxy) = struct.unpack("hhhhHhhhhhh", csbi.raw) sizex = right - left + 1 sizey = bottom - top + 1 return sizex, sizey except: pass def _get_terminal_size_input(): try: cols = int(subprocess.check_call(shlex.split('tput cols'))) rows = int(subprocess.check_call(shlex.split('tput lines'))) return (cols, rows) except: pass def _get_terminal_size_linux(): def ioctl_GWINSZ(fd): try: import fcntl import termios return struct.unpack('hh', fcntl.ioctl(fd, termios.TIOCGWINSZ, '1234')) except: pass cr = ioctl_GWINSZ(0) or ioctl_GWINSZ(1) or ioctl_GWINSZ(2) if not cr: try: fd = os.open(os.ctermid(), os.O_RDONLY) cr = ioctl_GWINSZ(fd) os.close(fd) except: pass if not cr: try: cr = (os.environ['LINES'], os.environ['COLUMNS']) except: return None return int(cr[1]), int(cr[0]) class ProgressBar: def __init__(self): self.precise = 0 self.total = 0 def show(self): progress_line = self._progress_line() import sys if self.precise == 100: print(progress_line, end="") else: print(progress_line, end="") sys.stdout.write("\r") def _progress_line(self): sizex, sizey = get_terminal_size() available_width = sizex precise = self._get_field_precise() ratio = self._get_field_ratio() available_width -= len(precise) + len(ratio) progress = self._get_field_progress(available_width-2) return "{precise} {progress} {ratio}".format(precise=precise, progress=progress, ratio=ratio) def _get_field_precise(self): line = "{precise}%".format(precise=self.precise) return "{:<4}".format(line) def _get_field_ratio(self): current = float(self.precise * self.total / 100) total = float(self.total) current_line = "{:.2f}".format(current) total_line = "{:.2f}".format(total) line = "{current}/{total}".format(current=current_line, total=total_line) available = len(total_line) * 2 + 1 format_line = "{prefix}{value}{sufix}".format(prefix="{:>", value=available, sufix="}") line = format_line.format(line) return line def _get_field_progress(self, width): available_width = width - 2 current = int(self.precise * available_width / 100) available_width -= current + 1 tip = ">" if not self.precise == 100 else "" progress = "{arrow}{tip}{space}".format(arrow="=" * current, tip=tip, space=" " * available_width) return "[{progress}]".format(progress=progress) def callback(self, current, total): if total and not self.total: self.total = total if not total: return precise = int(float(current) * 100 / total) if self.precise == precise: return else: self.precise = precise self.show() setting_keys = ['webdav_hostname', 'webdav_root', 'webdav_login', 'webdav_password', 'webdav_token', 'proxy_hostname', 'proxy_login', 'proxy_password', 'cert_path', 'key_path'] crypto_keys = ['webdav_password', 'webdav_token', 'proxy_password'] def encoding(source): if not source: return "" return b64encode(source.encode('utf-8')) def decoding(source): if not source: return "" return b64decode(source).decode('utf-8') def import_options(): options = dict() for setting_key in setting_keys: options[setting_key] = os.environ.get(setting_key.upper()) for crypto_key in crypto_keys: if not options[crypto_key]: continue options[crypto_key] = decoding(options[crypto_key]) return options def valid(options): if 'webdav_hostname' not in options: return False if not options['webdav_token'] and not options['webdav_login']: return False if options['webdav_login'] and not options['webdav_password']: return False return True class Formatter(argparse.RawTextHelpFormatter): def _get_default_metavar_for_optional(self, action): if not action.option_strings: return action.dest else: return "" def _format_action_invocation(self, action): if not action.option_strings: default = self._get_default_metavar_for_optional(action) metavar, = self._metavar_formatter(action, default)(1) return metavar else: parts = [] if action.nargs == 0: parts.extend(action.option_strings) else: default = self._get_default_metavar_for_optional(action) args_string = self._format_args(action, default) for option_string in action.option_strings: parts.append(option_string) return '%s %s' % (', '.join(parts), args_string) return ', '.join(parts) def _metavar_formatter(self, action, default_metavar): if action.metavar is not None: result = action.metavar else: result = default_metavar def format(tuple_size): if isinstance(result, tuple): return result else: return (result, ) * tuple_size return format def logging_exception(exception): print(exception) def urn_completer(prefix, **kwargs): options = import_options() try: client = Client(options) prefix_urn = Urn(prefix) if prefix_urn.is_dir(): return (prefix+filename for filename in client.list(prefix_urn.path())) else: parent = prefix_urn.parent() prefix_filename = prefix_urn.filename() prefix_filename_length = len(prefix_filename) return (prefix + filename[prefix_filename_length:] for filename in client.list(parent) if filename.startswith(prefix_filename)) except WebDavException: pass return tuple() if __name__ == "__main__": epilog = """ Examples: -------- $ wdc login https://webdav.server.ru webdav_login: login webdav_password: password success $ wdc login https://webdav.server.ru --token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx not success $ wdc check success $ wdc check file1 not success $ wdc free 245234120344 $ wdc ls dir1 file1 ... fileN $ wdc mkdir dir2 $ wdc copy dir1/file1 -t dir2/file1 $ wdc move dir2/file1 -t dir2/file2 $ wdc download dir1/file1 -t ~/Downloads/file1 $ wdc download dir1/ -t ~/Downloads/dir1/ $ wdc upload dir2/file2 -f ~/Documents/file1 $ wdc upload dir2/ -f ~/Documents/ $ wdc publish di2/file2 https://yadi.sk/i/vWtTUcBucAc6k $ wdc unpublish dir2/file2 $ wdc pull dir1/ -t ~/Documents/dir1/ $ wdc push dir1/ -f ~/Documents/dir1/ $ wdc info dir1/file1 {'name': 'file1', 'modified': 'Thu, 23 Oct 2014 16:16:37 GMT', 'size': '3460064', 'created': '2014-10-23T16:16:37Z'} """ usage = """ wdc [-h] [-v] wdc login https://webdav.server.ru [--token] [-r] [-p] [-c] [-k] wdc [action] [path] [-t] [-f] """ actions = "login logout check info free ls clean mkdir copy move download upload publish unpublish push pull".split() actions_help = "check, info, free, ls, clean, mkdir, copy, move,\ndownload, upload, publish, unpublish, push, pull" parser = argparse.ArgumentParser(prog='wdc', formatter_class=Formatter, epilog=epilog, usage=usage) parser.add_argument("action", help=actions_help, choices=actions) from webdav3.client import __version__ as version version_text = "{name} {version}".format(name="%(prog)s", version=version) parser.add_argument("-v", '--version', action='version', version=version_text) parser.add_argument("-r", "--root", help="example: dir1/dir2") parser.add_argument("--token", help="example: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") parser.add_argument("-c", "--cert-path", help="example: /etc/ssl/certs/certificate.crt") parser.add_argument("-k", "--key-path", help="example: /etc/ssl/private/certificate.key") parser.add_argument("-p", "--proxy", help="example: http://127.0.0.1:8080") parser.add_argument("path", help="example: dir1/dir2/file1", nargs='?').completer = urn_completer parser.add_argument("-f", '--from-path', help="example: ~/Documents/file1") parser.add_argument("-t", "--to-path", help="example for download and pull: ~/Download/file1\nexample for copy and move: dir1/dir2").completer = urn_completer argcomplete.autocomplete(parser, exclude=("-h", "--help", "--proxy", "-p", "-r", "--root", "-c", "--cert-path", "-t", "--to-path", "-v", "--version", "-f", "--from-path", "-k", "--key-path")) args = parser.parse_args() action = args.action if action == 'login': env = dict() if not args.path: try: env['webdav_hostname'] = raw_input("webdav_hostname: ") except NameError: env['webdav_hostname'] = input("webdav_hostname: ") else: env['webdav_hostname'] = args.path if not args.token: try: env['webdav_login'] = raw_input("webdav_login: ") except NameError: env['webdav_login'] = input("webdav_login: ") env['webdav_password'] = getpass.getpass("webdav_password: ") else: env['webdav_token'] = args.token if args.proxy: env['proxy_hostname'] = args.proxy try: env['proxy_login'] = raw_input("proxy_login: ") except NameError: env['proxy_login'] = input("proxy_login: ") env['proxy_password'] = getpass.getpass("proxy_password: ") if args.root: env['webdav_root'] = args.root if args.cert_path: env['cert_path'] = args.cert_path if args.key_path: env['key_path'] = args.key_path try: client = Client(env) check = client.check() text = "success" if check else "not success" print(text) if check: for crypto_key in crypto_keys: if crypto_key not in env: continue if not env[crypto_key]: continue env[crypto_key] = encoding(env[crypto_key]) for (key, value) in env.items(): os.putenv(key.upper(), value) os.system('bash') except WebDavException as e: print("not success") sys.exit() else: options = import_options() if not valid(options): print("First log on webdav server using the following command: wdc login.") sys.exit() elif action == "logout": os.system("exit") elif action == 'check': options = import_options() try: client = Client(options) connection = client.check() if not connection: raise NotConnection(options["webdav_hostname"]) check = client.check(args.path) if args.path else client.check() text = "success" if check else "not success" print(text) except WebDavException as e: logging_exception(e) elif action == 'free': options = import_options() try: client = Client(options) connection = client.check() if not connection: raise NotConnection(options["webdav_hostname"]) free_size = client.free() print(free_size) except WebDavException as e: logging_exception(e) elif action == 'ls': options = import_options() try: client = Client(options) connection = client.check() if not connection: raise NotConnection(options["webdav_hostname"]) paths = client.list(args.path) if args.path else client.list() for path in paths: print(path) except WebDavException as e: logging_exception(e) elif action == 'clean': if not args.path: parser.print_help() else: options = import_options() try: client = Client(options) connection = client.check() if not connection: raise NotConnection(options["webdav_hostname"]) client.clean(args.path) except WebDavException as e: logging_exception(e) elif action == 'mkdir': if not args.path: parser.print_help() else: options = import_options() try: client = Client(options) connection = client.check() if not connection: raise NotConnection(options["webdav_hostname"]) client.mkdir(args.path) except WebDavException as e: logging_exception(e) elif action == 'copy': if not args.path or not args.to_path: parser.print_help() else: options = import_options() try: client = Client(options) connection = client.check() if not connection: raise NotConnection(options["webdav_hostname"]) client.copy(remote_path_from=args.path, remote_path_to=args.to_path) except WebDavException as e: logging_exception(e) elif action == 'move': if not args.path or not args.to_path: parser.print_help() else: options = import_options() try: client = Client(options) connection = client.check() if not connection: raise NotConnection(options["webdav_hostname"]) client.move(remote_path_from=args.path, remote_path_to=args.to_path) except WebDavException as e: logging_exception(e) elif action == 'download': if not args.path or not args.to_path: parser.print_help() else: options = import_options() progress_bar = ProgressBar() def download_progress(download_t, download_d, upload_t, upload_d): progress_bar.callback(current=download_d, total=download_t) try: client = Client(options) connection = client.check() if not connection: raise NotConnection(options["webdav_hostname"]) if not os.path.exists(path=args.to_path): client.download(remote_path=args.path, local_path=args.to_path, progress=download_progress) print("\n") else: try: choice = raw_input("Local path exists, do you want to overwrite it? [Y/n] ") except NameError: choice = input("Local path exists, do you want to overwrite it? [Y/n] ") try: yes = strtobool(choice.lower()) if yes: client.download(remote_path=args.path, local_path=args.to_path, progress=download_progress) print("\n") except ValueError: print("Incorrect answer") except WebDavException as e: logging_exception(e) elif action == 'upload': if not args.path or not args.from_path: parser.print_help() else: options = import_options() progress_bar = ProgressBar() def upload_progress(download_t, download_d, upload_t, upload_d): progress_bar.callback(current=upload_d, total=upload_t) try: client = Client(options) connection = client.check() if not connection: raise NotConnection(options["webdav_hostname"]) if not client.check(remote_path=args.path): client.upload(remote_path=args.path, local_path=args.from_path, progress=upload_progress) print("\n") else: try: choice = raw_input("Remote resource exists, do you want to overwrite it? [Y/n] ") except NameError: choice = input("Remote resource exists, do you want to overwrite it? [Y/n] ") try: yes = strtobool(choice.lower()) if yes: client.upload(remote_path=args.path, local_path=args.from_path, progress=upload_progress) print("\n") except ValueError: print("Incorrect answer") except WebDavException as e: logging_exception(e) elif action == 'publish': if not args.path: parser.print_help() else: options = import_options() try: client = Client(options) connection = client.check() if not connection: raise NotConnection(options["webdav_hostname"]) link = client.publish(args.path) print(link) except WebDavException as e: logging_exception(e) elif action == 'unpublish': if not args.path: parser.print_help() else: options = import_options() try: client = Client(options) connection = client.check() if not connection: raise NotConnection(options["webdav_hostname"]) client.unpublish(args.path) except WebDavException as e: logging_exception(e) elif action == 'push': if not args.path or not args.from_path: parser.print_help() else: options = import_options() try: client = Client(options) connection = client.check() if not connection: raise NotConnection(options["webdav_hostname"]) client.push(remote_directory=args.path, local_directory=args.from_path) except WebDavException as e: logging_exception(e) elif action == 'pull': if not args.path or not args.to_path: parser.print_help() else: options = import_options() try: client = Client(options) connection = client.check() if not connection: raise NotConnection(options["webdav_hostname"]) client.pull(remote_directory=args.path, local_directory=args.to_path) except WebDavException as e: logging_exception(e) elif action == 'info': if not args.path: parser.print_help() else: options = import_options() try: client = Client(options) connection = client.check() if not connection: raise NotConnection(options["webdav_hostname"]) info = client.info(args.path) print(info) except WebDavException as e: logging_exception(e) else: parser.print_help() webdav-client-python-3-3.14.6/webdav3/000077500000000000000000000000001410526511000173365ustar00rootroot00000000000000webdav-client-python-3-3.14.6/webdav3/__init__.py000066400000000000000000000000001410526511000214350ustar00rootroot00000000000000webdav-client-python-3-3.14.6/webdav3/client.py000066400000000000000000001653471410526511000212060ustar00rootroot00000000000000# -*- coding: utf-8 import functools import logging import os import shutil import threading from io import BufferedReader, BytesIO, FileIO from re import sub from urllib.parse import unquote, urlsplit, urlparse import lxml.etree as etree import requests from dateutil import parser as dateutil_parser from webdav3.connection import WebDAVSettings from webdav3.exceptions import NoConnection, ConnectionException, NotEnoughSpace, RemoteResourceNotFound, \ MethodNotSupported, ResponseErrorCode, \ RemoteParentNotFound, OptionNotValid, LocalResourceNotFound from webdav3.urn import Urn log = logging.getLogger(__name__) def listdir(directory): """Returns list of nested files and directories for local directory by path :param directory: absolute or relative path to local directory :return: list nested of file or directory names """ file_names = list() for filename in os.listdir(directory): file_path = os.path.join(directory, filename) if os.path.isdir(file_path): filename = "{filename}{separate}".format(filename=filename, separate=os.path.sep) file_names.append(filename) return file_names def get_options(option_type, from_options): """Extract options for specified option type from all options :param option_type: the object of specified type of options :param from_options: all options dictionary :return: the dictionary of options for specified type, each option can be filled by value from all options dictionary or blank in case the option for specified type is not exist in all options dictionary """ _options = dict() for key in option_type.keys: key_with_prefix = "{prefix}{key}".format(prefix=option_type.prefix, key=key) if key not in from_options and key_with_prefix not in from_options: _options[key] = "" elif key in from_options: _options[key] = from_options.get(key) else: _options[key] = from_options.get(key_with_prefix) return _options def wrap_connection_error(fn): @functools.wraps(fn) def _wrapper(self, *args, **kw): log.debug("Requesting %s(%s, %s)", fn, args, kw) try: res = fn(self, *args, **kw) except requests.ConnectionError: raise NoConnection(self.webdav.hostname) except requests.RequestException as re: raise ConnectionException(re) else: return res return _wrapper class Client(object): """The client for WebDAV servers provides an ability to control files on remote WebDAV server. """ # path to root directory of WebDAV root = '/' # controls whether to verify the server's TLS certificate or not verify = True # HTTP headers for different actions default_http_header = { 'list': ["Accept: */*", "Depth: 1"], 'free': ["Accept: */*", "Depth: 0", "Content-Type: text/xml"], 'copy': ["Accept: */*"], 'move': ["Accept: */*"], 'mkdir': ["Accept: */*", "Connection: Keep-Alive"], 'clean': ["Accept: */*", "Connection: Keep-Alive"], 'check': ["Accept: */*"], 'info': ["Accept: */*", "Depth: 1"], 'get_property': ["Accept: */*", "Depth: 1", "Content-Type: application/x-www-form-urlencoded"], 'set_property': ["Accept: */*", "Depth: 1", "Content-Type: application/x-www-form-urlencoded"] } # mapping of actions to WebDAV methods default_requests = { 'options': 'OPTIONS', 'download': "GET", 'upload': "PUT", 'copy': "COPY", 'move': "MOVE", 'mkdir': "MKCOL", 'clean': "DELETE", 'check': "HEAD", 'list': "PROPFIND", 'free': "PROPFIND", 'info': "PROPFIND", 'publish': "PROPPATCH", 'unpublish': "PROPPATCH", 'published': "PROPPATCH", 'get_property': "PROPFIND", 'set_property': "PROPPATCH" } meta_xmlns = { 'https://webdav.yandex.ru': "urn:yandex:disk:meta", } def __init__(self, options): """Constructor of WebDAV client :param options: the dictionary of connection options to WebDAV. WebDev settings: `webdav_hostname`: url for WebDAV server should contain protocol and ip address or domain name. Example: `https://webdav.server.com`. `webdav_login`: (optional) Login name for WebDAV server. Can be empty when using token auth. `webdav_password`: (optional) Password for WebDAV server. Can be empty when using token auth. `webdav_token': (optional) Authentication token for WebDAV server. Can be empty when using login/password auth. `webdav_root`: (optional) Root directory of WebDAV server. Default is `/`. `webdav_cert_path`: (optional) Path to client certificate. `webdav_key_path`: (optional) Path to private key of the client certificate. `webdav_recv_speed`: (optional) Rate limit of data download speed in Bytes per second. Defaults to unlimited speed. `webdav_send_speed`: (optional) Rate limit of data upload speed in Bytes per second. Defaults to unlimited speed. `webdav_timeout`: (optional) Timeout in seconds used in HTTP connection managed by requests. Defaults to 30 seconds. `webdav_verbose`: (optional) Set verbose mode on/off. By default verbose mode is off. """ self.session = requests.Session() self.http_header = Client.default_http_header.copy() self.requests = Client.default_requests.copy() webdav_options = get_options(option_type=WebDAVSettings, from_options=options) self.webdav = WebDAVSettings(webdav_options) self.requests.update(self.webdav.override_methods) self.default_options = {} self.timeout = self.webdav.timeout self.chunk_size = 65536 def get_headers(self, action, headers_ext=None): """Returns HTTP headers of specified WebDAV actions. :param action: the identifier of action. :param headers_ext: (optional) the addition headers list witch sgould be added to basic HTTP headers for the specified action. :return: the dictionary of headers for specified action. """ if action in self.http_header: try: headers = self.http_header[action].copy() except AttributeError: headers = self.http_header[action][:] else: headers = list() if headers_ext: headers.extend(headers_ext) if self.webdav.token: webdav_token = "Authorization: Bearer {token}".format(token=self.webdav.token) headers.append(webdav_token) return dict([map(lambda s: s.strip(), i.split(':', 1)) for i in headers]) def get_url(self, path): """Generates url by uri path. :param path: uri path. :return: the url string. """ url = {'hostname': self.webdav.hostname, 'root': self.webdav.root, 'path': path} return "{hostname}{root}{path}".format(**url) def get_full_path(self, urn): """Generates full path to remote resource exclude hostname. :param urn: the URN to resource. :return: full path to resource with root path. """ return "{root}{path}".format(root=self.webdav.root, path=urn.path()) def execute_request(self, action, path, data=None, headers_ext=None): """Generate request to WebDAV server for specified action and path and execute it. :param action: the action for WebDAV server which should be executed. :param path: the path to resource for action :param data: (optional) Dictionary or list of tuples ``[(key, value)]`` (will be form-encoded), bytes, or file-like object to send in the body of the :class:`Request`. :param headers_ext: (optional) the addition headers list witch should be added to basic HTTP headers for the specified action. :return: HTTP response of request. """ response = self.session.request( method=self.requests[action], url=self.get_url(path), auth=(self.webdav.login, self.webdav.password) if (not self.webdav.token and not self.session.auth) and ( self.webdav.login and self.webdav.password) else None, headers=self.get_headers(action, headers_ext), timeout=self.timeout, cert=(self.webdav.cert_path, self.webdav.key_path) if ( self.webdav.cert_path and self.webdav.key_path) else None, data=data, stream=True, verify=self.verify ) if response.status_code == 507: raise NotEnoughSpace() if response.status_code == 404: raise RemoteResourceNotFound(path=path) if response.status_code == 405: raise MethodNotSupported(name=action, server=self.webdav.hostname) if response.status_code >= 400: raise ResponseErrorCode(url=self.get_url(path), code=response.status_code, message=response.content) return response def valid(self): """Validates of WebDAV settings. :return: True in case settings are valid and False otherwise. """ return True if self.webdav.valid() else False @wrap_connection_error def list(self, remote_path=root, get_info=False): """Returns list of nested files and directories for remote WebDAV directory by path. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_PROPFIND :param remote_path: path to remote directory. :param get_info: path and element info to remote directory, like cmd 'ls -l'. :return: if get_info=False it returns list of nested file or directory names, otherwise it returns list of information, the information is a dictionary and it values with following keys: `created`: date of resource creation, `name`: name of resource, `size`: size of resource, `modified`: date of resource modification, `etag`: etag of resource, `content_type`: content type of resource, `isdir`: type of resource, `path`: path of resource. """ directory_urn = Urn(remote_path, directory=True) if directory_urn.path() != Client.root and not self.check(directory_urn.path()): raise RemoteResourceNotFound(directory_urn.path()) path = Urn.normalize_path(self.get_full_path(directory_urn)) response = self.execute_request(action='list', path=directory_urn.quote()) if get_info: subfiles = WebDavXmlUtils.parse_get_list_info_response(response.content) return [subfile for subfile in subfiles if Urn.compare_path(path, subfile.get('path')) is False] urns = WebDavXmlUtils.parse_get_list_response(response.content) return [urn.filename() for urn in urns if Urn.compare_path(path, urn.path()) is False] @wrap_connection_error def free(self): """Returns an amount of free space on remote WebDAV server. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_PROPFIND :return: an amount of free space in bytes. """ data = WebDavXmlUtils.create_free_space_request_content() response = self.execute_request(action='free', path='', data=data) return WebDavXmlUtils.parse_free_space_response(response.content, self.webdav.hostname) @wrap_connection_error def check(self, remote_path=root): """Checks an existence of remote resource on WebDAV server by remote path. More information you can find by link http://webdav.org/specs/rfc4918.html#rfc.section.9.4 :param remote_path: (optional) path to resource on WebDAV server. Defaults is root directory of WebDAV. :return: True if resource is exist or False otherwise """ if self.webdav.disable_check: return True urn = Urn(remote_path) try: response = self.execute_request(action='check', path=urn.quote()) except RemoteResourceNotFound: return False except ResponseErrorCode: return False if int(response.status_code) == 200: return True return False @wrap_connection_error def mkdir(self, remote_path): """Makes new directory on WebDAV server. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_MKCOL :param remote_path: path to directory :return: True if request executed with code 200 or 201 and False otherwise. """ directory_urn = Urn(remote_path, directory=True) if not self.check(directory_urn.parent()): raise RemoteParentNotFound(directory_urn.path()) try: response = self.execute_request(action='mkdir', path=directory_urn.quote()) except MethodNotSupported: # Yandex WebDAV returns 405 status code when directory already exists return True return response.status_code in (200, 201) @wrap_connection_error def download_iter(self, remote_path): """Downloads file from WebDAV and return content in generator :param remote_path: path to file on WebDAV server. """ urn = Urn(remote_path) if self.is_dir(urn.path()): raise OptionNotValid(name="remote_path", value=remote_path) if not self.check(urn.path()): raise RemoteResourceNotFound(urn.path()) response = self.execute_request(action='download', path=urn.quote()) return response.iter_content(chunk_size=self.chunk_size) @wrap_connection_error def download_from(self, buff, remote_path, progress=None, progress_args=()): """Downloads file from WebDAV and writes it in buffer. :param buff: buffer object for writing of downloaded file content. :param remote_path: path to file on WebDAV server. :param progress: Pass a callback function to view the file transmission progress. The function must take *(current, total)* as positional arguments (look at Other Parameters below for a detailed description) and will be called back each time a new file chunk has been successfully transmitted. Example def progress_update(current, total, *args) ... :param progress_args: A tuple with extra custom arguments for the progress callback function. You can pass anything you need to be available in the progress callback scope; for example, a Message object or a Client instance in order to edit the message with the updated progress status. """ urn = Urn(remote_path) if self.is_dir(urn.path()): raise OptionNotValid(name="remote_path", value=remote_path) if not self.check(urn.path()): raise RemoteResourceNotFound(urn.path()) response = self.execute_request(action='download', path=urn.quote()) total = int(response.headers['content-length']) current = 0 if callable(progress): progress(current, total, *progress_args) # zero call for chunk in response.iter_content(chunk_size=self.chunk_size): buff.write(chunk) current += self.chunk_size if callable(progress): progress(current, total, *progress_args) def download(self, remote_path, local_path, progress=None, progress_args=()): """Downloads remote resource from WebDAV and save it in local path. More information you can find by link http://webdav.org/specs/rfc4918.html#rfc.section.9.4 :param remote_path: the path to remote resource for downloading can be file and directory. :param local_path: the path to save resource locally. :param progress: Pass a callback function to view the file transmission progress. The function must take *(current, total)* as positional arguments (look at Other Parameters below for a detailed description) and will be called back each time a new file chunk has been successfully transmitted. Example def progress_update(current, total, *args) ... :param progress_args: A tuple with extra custom arguments for the progress callback function. You can pass anything you need to be available in the progress callback scope; for example, a Message object or a Client instance in order to edit the message with the updated progress status. """ urn = Urn(remote_path) if self.is_dir(urn.path()): self.download_directory(local_path=local_path, remote_path=remote_path, progress=progress, progress_args=progress_args) else: self.download_file(local_path=local_path, remote_path=remote_path, progress=progress, progress_args=progress_args) def download_directory(self, remote_path, local_path, progress=None, progress_args=()): """Downloads directory and downloads all nested files and directories from remote WebDAV to local. If there is something on local path it deletes directories and files then creates new. :param remote_path: the path to directory for downloading form WebDAV server. :param local_path: the path to local directory for saving downloaded files and directories. :param progress: Pass a callback function to view the file transmission progress. The function must take *(current, total)* as positional arguments (look at Other Parameters below for a detailed description) and will be called back each time a new file chunk has been successfully transmitted. Example def progress_update(current, total, *args) ... :param progress_args: A tuple with extra custom arguments for the progress callback function. You can pass anything you need to be available in the progress callback scope; for example, a Message object or a Client instance in order to edit the message with the updated progress status. """ urn = Urn(remote_path, directory=True) if not self.is_dir(urn.path()): raise OptionNotValid(name="remote_path", value=remote_path) if os.path.exists(local_path): shutil.rmtree(local_path) os.makedirs(local_path) for resource_name in self.list(urn.path()): if urn.path().endswith(resource_name): continue _remote_path = "{parent}{name}".format(parent=urn.path(), name=resource_name) _local_path = os.path.join(local_path, resource_name) self.download(local_path=_local_path, remote_path=_remote_path, progress=progress, progress_args=progress_args) @wrap_connection_error def download_file(self, remote_path, local_path, progress=None, progress_args=()): """Downloads file from WebDAV server and save it locally. More information you can find by link http://webdav.org/specs/rfc4918.html#rfc.section.9.4 :param remote_path: the path to remote file for downloading. :param local_path: the path to save file locally. :param progress: Pass a callback function to view the file transmission progress. The function must take *(current, total)* as positional arguments (look at Other Parameters below for a detailed description) and will be called back each time a new file chunk has been successfully transmitted. Example def progress_update(current, total, *args) ... :param progress_args: A tuple with extra custom arguments for the progress callback function. You can pass anything you need to be available in the progress callback scope; for example, a Message object or a Client instance in order to edit the message with the updated progress status. """ urn = Urn(remote_path) if self.is_dir(urn.path()): raise OptionNotValid(name="remote_path", value=remote_path) if os.path.isdir(local_path): raise OptionNotValid(name="local_path", value=local_path) if not self.check(urn.path()): raise RemoteResourceNotFound(urn.path()) with open(local_path, 'wb') as local_file: response = self.execute_request('download', urn.quote()) total = int(response.headers['content-length']) current = 0 if callable(progress): progress(current, total, *progress_args) # zero call for block in response.iter_content(chunk_size=self.chunk_size): local_file.write(block) current += self.chunk_size if callable(progress): progress(current, total, *progress_args) def download_sync(self, remote_path, local_path, callback=None, progress=None, progress_args=()): """Downloads remote resources from WebDAV server synchronously. :param remote_path: the path to remote resource on WebDAV server. Can be file and directory. :param local_path: the path to save resource locally. :param callback: the callback which will be invoked when downloading is complete. :param progress: Pass a callback function to view the file transmission progress. The function must take *(current, total)* as positional arguments (look at Other Parameters below for a detailed description) and will be called back each time a new file chunk has been successfully transmitted. Example def progress_update(current, total, *args) ... :param progress_args: A tuple with extra custom arguments for the progress callback function. You can pass anything you need to be available in the progress callback scope; for example, a Message object or a Client instance in order to edit the message with the updated progress status. """ self.download(local_path=local_path, remote_path=remote_path, progress=progress, progress_args=progress_args) if callback: callback() def download_async(self, remote_path, local_path, callback=None, progress=None, progress_args=()): """Downloads remote resources from WebDAV server asynchronously :param remote_path: the path to remote resource on WebDAV server. Can be file and directory. :param local_path: the path to save resource locally. :param callback: the callback which will be invoked when downloading is complete. :param progress: Pass a callback function to view the file transmission progress. The function must take *(current, total)* as positional arguments (look at Other Parameters below for a detailed description) and will be called back each time a new file chunk has been successfully transmitted. Example def progress_update(current, total, *args) ... :param progress_args: A tuple with extra custom arguments for the progress callback function. You can pass anything you need to be available in the progress callback scope; for example, a Message object or a Client instance in order to edit the message with the updated progress status. """ target = (lambda: self.download_sync(local_path=local_path, remote_path=remote_path, callback=callback, progress=progress, progress_args=progress_args)) threading.Thread(target=target).start() @wrap_connection_error def upload_iter(self, read_callback, remote_path): """Uploads file from buffer to remote path on WebDAV server. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_PUT :param callable read_callback: the read callback. :param str remote_path: the path to save file remotely on WebDAV server. """ urn = Urn(remote_path) if urn.is_dir(): raise OptionNotValid(name="remote_path", value=remote_path) if not self.check(urn.parent()): raise RemoteParentNotFound(urn.path()) if not callable(read_callback): raise OptionNotValid(name='read_callback', value=read_callback) self.execute_request(action='upload', path=urn.quote(), data=read_callback) @wrap_connection_error def upload_to(self, buff, remote_path): """Uploads file from buffer to remote path on WebDAV server. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_PUT :param buff: the buffer with content for file. :param remote_path: the path to save file remotely on WebDAV server. """ urn = Urn(remote_path) if urn.is_dir(): raise OptionNotValid(name="remote_path", value=remote_path) if not self.check(urn.parent()): raise RemoteParentNotFound(urn.path()) self.execute_request(action='upload', path=urn.quote(), data=buff) def upload(self, remote_path, local_path, progress=None, progress_args=()): """Uploads resource to remote path on WebDAV server. In case resource is directory it will upload all nested files and directories. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_PUT :param remote_path: the path for uploading resources on WebDAV server. Can be file and directory. :param local_path: the path to local resource for uploading. :param progress: Pass a callback function to view the file transmission progress. The function must take *(current, total)* as positional arguments (look at Other Parameters below for a detailed description) and will be called back each time a new file chunk has been successfully transmitted. Example def progress_update(current, total, *args) ... :param progress_args: A tuple with extra custom arguments for the progress callback function. You can pass anything you need to be available in the progress callback scope; for example, a Message object or a Client instance in order to edit the message with the updated progress status. """ if os.path.isdir(local_path): self.upload_directory(local_path=local_path, remote_path=remote_path, progress=progress, progress_args=progress_args) else: self.upload_file(local_path=local_path, remote_path=remote_path, progress_args=progress_args) def upload_directory(self, remote_path, local_path, progress=None, progress_args=()): """Uploads directory to remote path on WebDAV server. In case directory is exist on remote server it will delete it and then upload directory with nested files and directories. :param remote_path: the path to directory for uploading on WebDAV server. :param local_path: the path to local directory for uploading. :param progress: Pass a callback function to view the file transmission progress. The function must take *(current, total)* as positional arguments (look at Other Parameters below for a detailed description) and will be called back each time a new file chunk has been successfully transmitted. Example def progress_update(current, total, *args) ... :param progress_args: A tuple with extra custom arguments for the progress callback function. You can pass anything you need to be available in the progress callback scope; for example, a Message object or a Client instance in order to edit the message with the updated progress status. """ urn = Urn(remote_path, directory=True) if not urn.is_dir(): raise OptionNotValid(name="remote_path", value=remote_path) if not os.path.isdir(local_path): raise OptionNotValid(name="local_path", value=local_path) if not os.path.exists(local_path): raise LocalResourceNotFound(local_path) if self.check(urn.path()): self.clean(urn.path()) self.mkdir(remote_path) for resource_name in listdir(local_path): _remote_path = "{parent}{name}".format(parent=urn.path(), name=resource_name).replace('\\', '') _local_path = os.path.join(local_path, resource_name) self.upload(local_path=_local_path, remote_path=_remote_path, progress=progress, progress_args=progress_args) @wrap_connection_error def upload_file(self, remote_path, local_path, progress=None, progress_args=()): """Uploads file to remote path on WebDAV server. File should be 2Gb or less. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_PUT :param remote_path: the path to uploading file on WebDAV server. :param local_path: the path to local file for uploading. :param progress: Pass a callback function to view the file transmission progress. The function must take *(current, total)* as positional arguments (look at Other Parameters below for a detailed description) and will be called back each time a new file chunk has been successfully transmitted. Example def progress_update(current, total, *args) ... :param progress_args: A tuple with extra custom arguments for the progress callback function. You can pass anything you need to be available in the progress callback scope; for example, a Message object or a Client instance in order to edit the message with the updated progress status. """ if not os.path.exists(local_path): raise LocalResourceNotFound(local_path) urn = Urn(remote_path) if urn.is_dir(): raise OptionNotValid(name="remote_path", value=remote_path) if os.path.isdir(local_path): raise OptionNotValid(name="local_path", value=local_path) if not self.check(urn.parent()): raise RemoteParentNotFound(urn.path()) with open(local_path, "rb") as local_file: total = os.path.getsize(local_path) def read_in_chunks(file_object): progress(0, total, *progress_args) current = 0 while current < total: data = file_object.read(self.chunk_size) progress(current, total, *progress_args) # call to progress function current += len(data) if not data: break yield data if callable(progress): self.execute_request(action='upload', path=urn.quote(), data=read_in_chunks(local_file)) else: self.execute_request(action='upload', path=urn.quote(), data=local_file) def upload_sync(self, remote_path, local_path, callback=None, progress=None, progress_args=()): """Uploads resource to remote path on WebDAV server synchronously. In case resource is directory it will upload all nested files and directories. :param remote_path: the path for uploading resources on WebDAV server. Can be file and directory. :param local_path: the path to local resource for uploading. :param callback: the callback which will be invoked when downloading is complete. :param progress: Pass a callback function to view the file transmission progress. The function must take *(current, total)* as positional arguments (look at Other Parameters below for a detailed description) and will be called back each time a new file chunk has been successfully transmitted. Example def progress_update(current, total, *args) ... :param progress_args: A tuple with extra custom arguments for the progress callback function. You can pass anything you need to be available in the progress callback scope; for example, a Message object or a Client instance in order to edit the message with the updated progress status. """ self.upload(local_path=local_path, remote_path=remote_path, progress=progress, progress_args=progress_args) if callback: callback() def upload_async(self, remote_path, local_path, callback=None, progress=None, progress_args=()): """Uploads resource to remote path on WebDAV server asynchronously. In case resource is directory it will upload all nested files and directories. :param remote_path: the path for uploading resources on WebDAV server. Can be file and directory. :param local_path: the path to local resource for uploading. :param callback: the callback which will be invoked when downloading is complete. :param progress: Pass a callback function to view the file transmission progress. The function must take *(current, total)* as positional arguments (look at Other Parameters below for a detailed description) and will be called back each time a new file chunk has been successfully transmitted. Example def progress_update(current, total, *args) ... :param progress_args: A tuple with extra custom arguments for the progress callback function. You can pass anything you need to be available in the progress callback scope; for example, a Message object or a Client instance in order to edit the message with the updated progress status. """ target = (lambda: self.upload_sync(local_path=local_path, remote_path=remote_path, callback=callback, progress=progress, progress_args=progress_args)) threading.Thread(target=target).start() @wrap_connection_error def copy(self, remote_path_from, remote_path_to, depth=1): """Copies resource from one place to another on WebDAV server. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_COPY :param remote_path_from: the path to resource which will be copied, :param remote_path_to: the path where resource will be copied. :param depth: folder depth to copy """ urn_from = Urn(remote_path_from) if not self.check(urn_from.path()): raise RemoteResourceNotFound(urn_from.path()) urn_to = Urn(remote_path_to) if not self.check(urn_to.parent()): raise RemoteParentNotFound(urn_to.path()) headers = [ "Destination: {url}".format(url=self.get_url(urn_to.quote())) ] if self.is_dir(urn_from.path()): headers.append("Depth: {depth}".format(depth=depth)) self.execute_request(action='copy', path=urn_from.quote(), headers_ext=headers) @wrap_connection_error def move(self, remote_path_from, remote_path_to, overwrite=False): """Moves resource from one place to another on WebDAV server. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_MOVE :param remote_path_from: the path to resource which will be moved, :param remote_path_to: the path where resource will be moved. :param overwrite: (optional) the flag, overwrite file if it exists. Defaults is False """ urn_from = Urn(remote_path_from) if not self.check(urn_from.path()): raise RemoteResourceNotFound(urn_from.path()) urn_to = Urn(remote_path_to) if not self.check(urn_to.parent()): raise RemoteParentNotFound(urn_to.path()) header_destination = "Destination: {path}".format(path=self.get_url(urn_to.quote())) header_overwrite = "Overwrite: {flag}".format(flag="T" if overwrite else "F") self.execute_request(action='move', path=urn_from.quote(), headers_ext=[header_destination, header_overwrite]) @wrap_connection_error def clean(self, remote_path): """Cleans (Deletes) a remote resource on WebDAV server. The name of method is not changed for back compatibility with original library. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_DELETE :param remote_path: the remote resource whisch will be deleted. """ urn = Urn(remote_path) self.execute_request(action='clean', path=urn.quote()) @wrap_connection_error def info(self, remote_path): """Gets information about resource on WebDAV. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_PROPFIND :param str remote_path: the path to remote resource. :return: a dictionary of information attributes and them values with following keys: `created`: date of resource creation, `name`: name of resource, `size`: size of resource, `modified`: date of resource modification, `etag`: etag of resource, `content_type`: content type of resource. """ urn = Urn(remote_path) self._check_remote_resource(remote_path, urn) response = self.execute_request(action='info', path=urn.quote()) path = self.get_full_path(urn) return WebDavXmlUtils.parse_info_response(content=response.content, path=path, hostname=self.webdav.hostname) def _check_remote_resource(self, remote_path, urn): if not self.check(urn.path()) and not self.check(Urn(remote_path, directory=True).path()): raise RemoteResourceNotFound(remote_path) @wrap_connection_error def is_dir(self, remote_path): """Checks is the remote resource directory. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_PROPFIND :param remote_path: the path to remote resource. :return: True in case the remote resource is directory and False otherwise. """ urn = Urn(remote_path) self._check_remote_resource(remote_path, urn) response = self.execute_request(action='info', path=urn.quote(), headers_ext=["Depth: 0"]) path = self.get_full_path(urn) return WebDavXmlUtils.parse_is_dir_response(content=response.content, path=path, hostname=self.webdav.hostname) @wrap_connection_error def get_property(self, remote_path, option): """Gets metadata property of remote resource on WebDAV server. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_PROPFIND :param remote_path: the path to remote resource. :param option: the property attribute as dictionary with following keys: `namespace`: (optional) the namespace for XML property which will be set, `name`: the name of property which will be set. :return: the value of property or None if property is not found. """ urn = Urn(remote_path) if not self.check(urn.path()): raise RemoteResourceNotFound(urn.path()) data = WebDavXmlUtils.create_get_property_request_content(option) response = self.execute_request(action='get_property', path=urn.quote(), data=data) return WebDavXmlUtils.parse_get_property_response(response.content, option['name']) @wrap_connection_error def set_property(self, remote_path, option): """Sets metadata property of remote resource on WebDAV server. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_PROPPATCH :param remote_path: the path to remote resource. :param option: the property attribute as dictionary with following keys: `namespace`: (optional) the namespace for XML property which will be set, `name`: the name of property which will be set, `value`: (optional) the value of property which will be set. Defaults is empty string. """ self.set_property_batch(remote_path=remote_path, option=[option]) @wrap_connection_error def set_property_batch(self, remote_path, option): """Sets batch metadata properties of remote resource on WebDAV server in batch. More information you can find by link http://webdav.org/specs/rfc4918.html#METHOD_PROPPATCH :param remote_path: the path to remote resource. :param option: the property attributes as list of dictionaries with following keys: `namespace`: (optional) the namespace for XML property which will be set, `name`: the name of property which will be set, `value`: (optional) the value of property which will be set. Defaults is empty string. """ urn = Urn(remote_path) if not self.check(urn.path()): raise RemoteResourceNotFound(urn.path()) data = WebDavXmlUtils.create_set_property_batch_request_content(option) self.execute_request(action='set_property', path=urn.quote(), data=data) def resource(self, remote_path): urn = Urn(remote_path) return Resource(self, urn) def push(self, remote_directory, local_directory): def prune(src, exp): return [sub(exp, "", item) for item in src] updated = False urn = Urn(remote_directory, directory=True) self._validate_remote_directory(urn) self._validate_local_directory(local_directory) paths = self.list(urn.path()) expression = "{begin}{end}".format(begin="^", end=urn.path()) remote_resource_names = prune(paths, expression) for local_resource_name in listdir(local_directory): local_path = os.path.join(local_directory, local_resource_name) remote_path = "{remote_directory}{resource_name}".format(remote_directory=urn.path(), resource_name=local_resource_name) if os.path.isdir(local_path): if not self.check(remote_path=remote_path): self.mkdir(remote_path=remote_path) result = self.push(remote_directory=remote_path, local_directory=local_path) updated = updated or result else: if local_resource_name in remote_resource_names \ and not self.is_local_more_recent(local_path, remote_path): continue self.upload_file(remote_path=remote_path, local_path=local_path) updated = True return updated def pull(self, remote_directory, local_directory): def prune(src, exp): return [sub(exp, "", item) for item in src] updated = False urn = Urn(remote_directory, directory=True) self._validate_remote_directory(urn) self._validate_local_directory(local_directory) local_resource_names = listdir(local_directory) paths = self.list(urn.path()) expression = "{begin}{end}".format(begin="^", end=remote_directory) remote_resource_names = prune(paths, expression) for remote_resource_name in remote_resource_names: if urn.path().endswith(remote_resource_name): continue local_path = os.path.join(local_directory, remote_resource_name) remote_path = "{remote_directory}{resource_name}".format(remote_directory=urn.path(), resource_name=remote_resource_name) remote_urn = Urn(remote_path) if remote_urn.path().endswith("/"): if not os.path.exists(local_path): updated = True os.mkdir(local_path) result = self.pull(remote_directory=remote_path, local_directory=local_path) updated = updated or result else: if remote_resource_name in local_resource_names and self.is_local_more_recent(local_path, remote_path): continue self.download_file(remote_path=remote_path, local_path=local_path) updated = True return updated def is_local_more_recent(self, local_path, remote_path): """Tells if local resource is more recent that the remote on if possible :param str local_path: the path to local resource. :param str remote_path: the path to remote resource. :return: True if local resource is more recent, False if the remote one is None if comparison is not possible """ try: remote_info = self.info(remote_path) remote_last_mod_date = remote_info['modified'] remote_last_mod_date = dateutil_parser.parse(remote_last_mod_date) remote_last_mod_date_unix_ts = int(remote_last_mod_date.timestamp()) local_last_mod_date_unix_ts = int(os.stat(local_path).st_mtime) return remote_last_mod_date_unix_ts < local_last_mod_date_unix_ts except (ValueError, RuntimeWarning, KeyError): # If there is problem when parsing dates, or cannot get # last modified information, return None return None def sync(self, remote_directory, local_directory): self.pull(remote_directory=remote_directory, local_directory=local_directory) self.push(remote_directory=remote_directory, local_directory=local_directory) def _validate_remote_directory(self, urn): if not self.is_dir(urn.path()): raise OptionNotValid(name="remote_path", value=urn.path()) @staticmethod def _validate_local_directory(local_directory): if not os.path.isdir(local_directory): raise OptionNotValid(name="local_path", value=local_directory) if not os.path.exists(local_directory): raise LocalResourceNotFound(local_directory) class Resource(object): def __init__(self, client, urn): self.client = client self.urn = urn def __str__(self): return "resource {path}".format(path=self.urn.path()) def is_dir(self): return self.client.is_dir(self.urn.path()) def rename(self, new_name): old_path = self.urn.path() parent_path = self.urn.parent() new_name = Urn(new_name).filename() new_path = "{directory}{filename}".format(directory=parent_path, filename=new_name) self.client.move(remote_path_from=old_path, remote_path_to=new_path) self.urn = Urn(new_path) def move(self, remote_path): new_urn = Urn(remote_path) self.client.move(remote_path_from=self.urn.path(), remote_path_to=new_urn.path()) self.urn = new_urn def copy(self, remote_path): urn = Urn(remote_path) self.client.copy(remote_path_from=self.urn.path(), remote_path_to=remote_path) return Resource(self.client, urn) def info(self, params=None): info = self.client.info(self.urn.path()) if not params: return info return {key: value for (key, value) in info.items() if key in params} def clean(self): return self.client.clean(self.urn.path()) def check(self): return self.client.check(self.urn.path()) def read_from(self, buff): self.client.upload_to(buff=buff, remote_path=self.urn.path()) def read(self, local_path): return self.client.upload_sync(local_path=local_path, remote_path=self.urn.path()) def read_async(self, local_path, callback=None): return self.client.upload_async(local_path=local_path, remote_path=self.urn.path(), callback=callback) def write_to(self, buff): return self.client.download_from(buff=buff, remote_path=self.urn.path()) def write(self, local_path): return self.client.download_sync(local_path=local_path, remote_path=self.urn.path()) def write_async(self, local_path, callback=None): return self.client.download_async(local_path=local_path, remote_path=self.urn.path(), callback=callback) def publish(self): return self.client.publish(self.urn.path()) def unpublish(self): return self.client.unpublish(self.urn.path()) def get_property(self, option): return self.client.get_property(remote_path=self.urn.path(), option=option) def set_property(self, option, value): option['value'] = value.__str__() self.client.set_property(remote_path=self.urn.path(), option=option) class WebDavXmlUtils: def __init__(self): pass @staticmethod def parse_get_list_info_response(content): """Parses of response content XML from WebDAV server and extract file and directory infos :param content: the XML content of HTTP response from WebDAV server for getting list of files by remote path. :return: list of information, the information is a dictionary and it values with following keys: `created`: date of resource creation, `name`: name of resource, `size`: size of resource, `modified`: date of resource modification, `etag`: etag of resource, `content_type`: content type of resource, `isdir`: type of resource, `path`: path of resource. """ try: tree = etree.fromstring(content) infos = [] for response in tree.findall(".//{DAV:}response"): href_el = next(iter(response.findall(".//{DAV:}href")), None) if href_el is None: continue path = unquote(urlsplit(href_el.text).path) info = dict() is_dir = len(response.findall(".//{DAV:}collection")) > 0 info = WebDavXmlUtils.get_info_from_response(response) info['isdir'] = is_dir info['path'] = path infos.append(info) return infos except etree.XMLSyntaxError: return list() @staticmethod def parse_get_list_response(content): """Parses of response content XML from WebDAV server and extract file and directory names. :param content: the XML content of HTTP response from WebDAV server for getting list of files by remote path. :return: list of extracted file or directory names. """ try: tree = etree.fromstring(content) urns = [] for response in tree.findall(".//{DAV:}response"): href_el = next(iter(response.findall(".//{DAV:}href")), None) if href_el is None: continue href = Urn.separate + unquote(urlsplit(href_el.text).path) is_dir = len(response.findall(".//{DAV:}collection")) > 0 urns.append(Urn(href, is_dir)) return urns except etree.XMLSyntaxError: return list() @staticmethod def create_free_space_request_content(): """Creates an XML for requesting of free space on remote WebDAV server. :return: the XML string of request content. """ root = etree.Element("propfind", xmlns="DAV:") prop = etree.SubElement(root, "prop") etree.SubElement(prop, "quota-available-bytes") etree.SubElement(prop, "quota-used-bytes") tree = etree.ElementTree(root) return WebDavXmlUtils.etree_to_string(tree) @staticmethod def parse_free_space_response(content, hostname): """Parses of response content XML from WebDAV server and extract an amount of free space. :param content: the XML content of HTTP response from WebDAV server for getting free space. :param hostname: the server hostname. :return: an amount of free space in bytes. """ try: tree = etree.fromstring(content) node = tree.find('.//{DAV:}quota-available-bytes') if node is not None: return int(node.text) else: raise MethodNotSupported(name='free', server=hostname) except TypeError: raise MethodNotSupported(name='free', server=hostname) except etree.XMLSyntaxError: return str() @staticmethod def get_info_from_response(response): """ Get information attributes from response :param response: XML object of response for the remote resource defined by path :return: a dictionary of information attributes and them values with following keys: `created`: date of resource creation, `name`: name of resource, `size`: size of resource, `modified`: date of resource modification, `etag`: etag of resource, `content_type`: content type of resource. """ find_attributes = { 'created': ".//{DAV:}creationdate", 'name': ".//{DAV:}displayname", 'size': ".//{DAV:}getcontentlength", 'modified': ".//{DAV:}getlastmodified", 'etag': ".//{DAV:}getetag", 'content_type': ".//{DAV:}getcontenttype", } info = dict() for (name, value) in find_attributes.items(): info[name] = response.findtext(value) return info @staticmethod def parse_info_response(content, path, hostname): """Parses of response content XML from WebDAV server and extract an information about resource. :param content: the XML content of HTTP response from WebDAV server. :param path: the path to resource. :param hostname: the server hostname. :return: a dictionary of information attributes and them values with following keys: `created`: date of resource creation, `name`: name of resource, `size`: size of resource, `modified`: date of resource modification, `etag`: etag of resource, `content_type`: content type of resource. """ response = WebDavXmlUtils.extract_response_for_path(content=content, path=path, hostname=hostname) return WebDavXmlUtils.get_info_from_response(response) @staticmethod def parse_is_dir_response(content, path, hostname): """Parses of response content XML from WebDAV server and extract an information about resource. :param content: the XML content of HTTP response from WebDAV server. :param path: the path to resource. :param hostname: the server hostname. :return: True in case the remote resource is directory and False otherwise. """ response = WebDavXmlUtils.extract_response_for_path(content=content, path=path, hostname=hostname) resource_type = response.find(".//{DAV:}resourcetype") if resource_type is None: raise MethodNotSupported(name="is_dir", server=hostname) dir_type = resource_type.find("{DAV:}collection") return True if dir_type is not None else False @staticmethod def create_get_property_request_content(option): """Creates an XML for requesting of getting a property value of remote WebDAV resource. :param option: the property attributes as dictionary with following keys: `namespace`: (optional) the namespace for XML property which will be get, `name`: the name of property which will be get. :return: the XML string of request content. """ root = etree.Element("propfind", xmlns="DAV:") prop = etree.SubElement(root, "prop") etree.SubElement(prop, option.get('name', ""), xmlns=option.get('namespace', "")) tree = etree.ElementTree(root) return WebDavXmlUtils.etree_to_string(tree) @staticmethod def parse_get_property_response(content, name): """Parses of response content XML from WebDAV server for getting metadata property value for some resource. :param content: the XML content of response as string. :param name: the name of property for finding a value in response :return: the value of property if it has been found or None otherwise. """ tree = etree.fromstring(content) return tree.xpath('//*[local-name() = $name]', name=name)[0].text @staticmethod def create_set_property_batch_request_content(options): """Creates an XML for requesting of setting a property values for remote WebDAV resource in batch. :param options: the property attributes as list of dictionaries with following keys: `namespace`: (optional) the namespace for XML property which will be set, `name`: the name of property which will be set, `value`: (optional) the value of property which will be set. Defaults is empty string. :return: the XML string of request content. """ root_node = etree.Element('propertyupdate', xmlns='DAV:') set_node = etree.SubElement(root_node, 'set') prop_node = etree.SubElement(set_node, 'prop') for option in options: opt_node = etree.SubElement(prop_node, option['name'], xmlns=option.get('namespace', '')) opt_node.text = option.get('value', '') tree = etree.ElementTree(root_node) return WebDavXmlUtils.etree_to_string(tree) @staticmethod def etree_to_string(tree): """Creates string from lxml.etree.ElementTree with XML declaration and UTF-8 encoding. :param tree: the instance of ElementTree :return: the string of XML. """ buff = BytesIO() tree.write(buff, xml_declaration=True, encoding='UTF-8') return buff.getvalue() @staticmethod def extract_response_for_path(content, path, hostname): """Extracts single response for specified remote resource. :param content: raw content of response as string. :param path: the path to needed remote resource. :param hostname: the server hostname. :return: XML object of response for the remote resource defined by path. """ prefix = urlparse(hostname).path try: tree = etree.fromstring(content) responses = tree.findall("{DAV:}response") n_path = Urn.normalize_path(path) for resp in responses: href = resp.findtext("{DAV:}href") if Urn.compare_path(n_path, href) is True: return resp href_without_prefix = href[len(prefix):] if href.startswith(prefix) else href if Urn.compare_path(n_path, href_without_prefix) is True: return resp raise RemoteResourceNotFound(path) except etree.XMLSyntaxError: raise MethodNotSupported(name="is_dir", server=hostname) webdav-client-python-3-3.14.6/webdav3/connection.py000066400000000000000000000043611410526511000220530ustar00rootroot00000000000000from os.path import exists from webdav3.exceptions import * from webdav3.urn import Urn class ConnectionSettings: def is_valid(self): """ Method checks is settings are valid :return: True if settings are valid otherwise False """ pass def valid(self): try: self.is_valid() except OptionNotValid: return False else: return True class WebDAVSettings(ConnectionSettings): ns = "webdav:" prefix = "webdav_" keys = {'hostname', 'login', 'password', 'token', 'root', 'cert_path', 'key_path', 'recv_speed', 'send_speed', 'verbose', 'disable_check', 'override_methods', 'timeout', 'chunk_size'} def __init__(self, options): self.hostname = None self.login = None self.password = None self.token = None self.root = None self.cert_path = None self.key_path = None self.recv_speed = None self.send_speed = None self.verbose = None self.disable_check = False self.override_methods = {} self.timeout = 30 self.chunk_size = 65536 self.options = dict() for key in self.keys: value = options.get(key, '') if not (self.__dict__[key] and not value): self.options[key] = value self.__dict__[key] = value self.root = Urn(self.root).quote() if self.root else '' self.root = self.root.rstrip(Urn.separate) self.hostname = self.hostname.rstrip(Urn.separate) def is_valid(self): if not self.hostname: raise OptionNotValid(name="hostname", value=self.hostname, ns=self.ns) if self.cert_path and not exists(self.cert_path): raise OptionNotValid(name="cert_path", value=self.cert_path, ns=self.ns) if self.key_path and not exists(self.key_path): raise OptionNotValid(name="key_path", value=self.key_path, ns=self.ns) if self.key_path and not self.cert_path: raise OptionNotValid(name="cert_path", value=self.cert_path, ns=self.ns) if self.password and not self.login: raise OptionNotValid(name="login", value=self.login, ns=self.ns) return True webdav-client-python-3-3.14.6/webdav3/exceptions.py000066400000000000000000000051441410526511000220750ustar00rootroot00000000000000class WebDavException(Exception): pass class NotValid(WebDavException): pass class OptionNotValid(NotValid): def __init__(self, name, value, ns=""): self.name = name self.value = value self.ns = ns def __str__(self): return "Option ({ns}{name}={value}) have invalid name or value".format(ns=self.ns, name=self.name, value=self.value) class CertificateNotValid(NotValid): pass class NotFound(WebDavException): pass class LocalResourceNotFound(NotFound): def __init__(self, path): self.path = path def __str__(self): return "Local file: {path} not found".format(path=self.path) class RemoteResourceNotFound(NotFound): def __init__(self, path): self.path = path def __str__(self): return "Remote resource: {path} not found".format(path=self.path) class RemoteParentNotFound(NotFound): def __init__(self, path): self.path = path def __str__(self): return "Remote parent for: {path} not found".format(path=self.path) class MethodNotSupported(WebDavException): def __init__(self, name, server): self.name = name self.server = server def __str__(self): return "Method '{name}' not supported for {server}".format(name=self.name, server=self.server) class ConnectionException(WebDavException): def __init__(self, exception): self.exception = exception def __str__(self): return self.exception.__str__() class NoConnection(WebDavException): def __init__(self, hostname): self.hostname = hostname def __str__(self): return "No connection with {hostname}".format(hostname=self.hostname) # This exception left only for supporting original library interface. class NotConnection(WebDavException): def __init__(self, hostname): self.hostname = hostname def __str__(self): return "No connection with {hostname}".format(hostname=self.hostname) class ResponseErrorCode(WebDavException): def __init__(self, url, code, message): self.url = url self.code = code self.message = message def __str__(self): return "Request to {url} failed with code {code} and message: {message}".format(url=self.url, code=self.code, message=self.message) class NotEnoughSpace(WebDavException): def __init__(self): self.message = "Not enough space on the server" def __str__(self): return self.message webdav-client-python-3-3.14.6/webdav3/urn.py000066400000000000000000000035721410526511000205230ustar00rootroot00000000000000from re import sub from urllib.parse import unquote, quote, urlsplit class Urn(object): separate = "/" def __init__(self, path, directory=False): self._path = quote(path) expressions = "/\.+/", "/+" for expression in expressions: self._path = sub(expression, Urn.separate, self._path) if not self._path.startswith(Urn.separate): self._path = "{begin}{end}".format(begin=Urn.separate, end=self._path) if directory and not self._path.endswith(Urn.separate): self._path = "{begin}{end}".format(begin=self._path, end=Urn.separate) def __str__(self): return self.path() def path(self): return unquote(self._path) def quote(self): return self._path def filename(self): path_split = self._path.split(Urn.separate) name = path_split[-2] + Urn.separate if path_split[-1] == '' else path_split[-1] return unquote(name) def parent(self): path_split = self._path.split(Urn.separate) nesting_level = self.nesting_level() parent_path_split = path_split[:nesting_level] parent = self.separate.join(parent_path_split) if nesting_level != 1 else Urn.separate if not parent.endswith(Urn.separate): return unquote(parent + Urn.separate) else: return unquote(parent) def nesting_level(self): return self._path.count(Urn.separate, 0, -1) def is_dir(self): return self._path[-1] == Urn.separate @staticmethod def normalize_path(path): result = sub('/{2,}', '/', path) return result if len(result) < 1 or result[-1] != Urn.separate else result[:-1] @staticmethod def compare_path(path_a, href): unqouted_path = Urn.separate + unquote(urlsplit(href).path) return Urn.normalize_path(path_a) == Urn.normalize_path(unqouted_path)