Commit Graph

121 Commits

Author SHA1 Message Date
Sebastian Lohff dce8c995f6 Add test requirements to setup.py 2020-02-08 01:13:43 +01:00
Sebastian Lohff 2b138446d4 Change shebang to /usr/bin/env python
Using /usr/bin/python might have side-effects, such as the system
python being used even when the script is called from within a
python virtual env. env python should give us the right interpreter.
As we are both python2 and python3 compatible this should cause no
problems.
2020-01-15 00:48:06 +01:00
Sebastian Lohff ccd01e8b6e Fix -4/-6 crash caused by broken filter statement
In python3 filter returns a generator instead of a list. When -4 or
-6 is used or if the host system has either of those address
families disabled len() gets called onto this filter expression
which results into a crash. This commit makes a filter expression
out of this statement and also adds a test for ipv4-only downloading.
2020-01-15 00:48:06 +01:00
MasterofJOKers 907013522c Make `targetDir` absolute by default
When serving a `../` as directory (with `-l`), servefile creates an
endless 301-redirect loop. Having an absolute path fixes this. Since
this error might come up any time again, we're setting `targetDir` to
its absolute path right from the beginning and never have to worry about
it later on.
2020-01-15 00:07:07 +01:00
MasterofJOKers e5f9b39025 tests: Pass additional tox args to pytest
This allows to run specific tests e.g. via `tox -e py3
tests/test_servefile.py::test_serve_relative_directory`.
2019-02-24 16:00:38 +01:00
Sebastian Lohff 6e27ecfe8c Python3 SSL socket handling 2019-02-24 13:59:12 +01:00
Sebastian Lohff 0e33743293 Fix imports and unicode handling for Python3 2019-02-17 23:14:54 +01:00
Sebastian Lohff 93e0c3dd7e Initial tests 2019-02-17 21:29:23 +01:00
MasterofJOKers 08ac08718b List view allows sorting by "Last Modified", "Name", "Size"
This is implemented in JavaScript, because for implementing it in
Python, the concept of creating the directory listing view would have to
be changed.
2019-02-17 20:19:22 +01:00
Sebastian Lohff 30738981f4 Document lzma/xz support in manpage 2019-02-14 23:25:36 +01:00
Sebastian Lohff 53d803626d
Merge pull request #2 from bitwave/tar-lzma-support
added compression method lzma for tar files
2019-02-14 23:22:58 +01:00
bitwave aeb8588198 added compression method lzma for tar files 2018-04-25 19:08:58 +02:00
Sebastian Lohff a0b8ae4932 Moved to v0.4.4 2015-11-10 21:12:49 +01:00
Sebastian Lohff cd7eee21be Fixed directory traversal bug with direcotry listing 2015-11-10 20:51:18 +01:00
Sebastian Lohff 11ad07cc76 Replaced posixpath calls with os.path 2015-11-10 20:51:01 +01:00
Sebastian Lohff 0c781c2b73 Send correct headers on range/HEAD request 2015-08-03 05:41:51 +02:00
Sebastian Lohff cb4ebb017f Only catch ValueError, not all exceptions 2015-08-03 05:33:57 +02:00
Sebastian Lohff 42949c1403 Swallow traces when client aborts transmission 2015-03-18 00:22:21 +01:00
Sebastian Lohff 46757ff89b Mute SSL exceptions on connection shutdown
Happens most frequently with SSL errors being sent by the
client
2015-03-17 23:47:51 +01:00
Sebastian Lohff 659383bf30 Issue v3 certificate with --ssl 2015-03-17 23:38:46 +01:00
Sebastian Lohff 9201b62f18 Use TLS1.2 / TLS1 with --ssl if available 2015-03-17 23:32:20 +01:00
Sebastian Lohff 6b85d23752 Moved to v0.4.3 2013-12-28 02:31:19 +01:00
Sebastian Lohff 320839d856 Display user/password in url-list when authentication is used 2013-12-28 00:19:10 +01:00
Sebastian Lohff 80c9d9fe0a Connection: close headers to disable http-keep-alive
Some Connection: close headers are needed so clients know that
servefile does not support keepalive connections.
2012-11-13 03:01:05 +01:00
Sebastian Lohff 72b561ace7 Fixed connection keep-alive bug for basic auth 2012-11-13 02:56:50 +01:00
Sebastian Lohff d54b3f5b8d Nicer display of OSError exception messages 2012-11-12 19:47:16 +01:00
Robert Buchholz affa42dae8 Do not swallow exceptions that can be helpful in error messages 2012-11-12 19:46:03 +01:00
Sebastian Pipping 2886d1fb07 Hide ../ in listing of the (virtual) root directory 2012-10-29 19:12:48 +01:00
Sebastian Lohff 6a38212242 Merge branch 'spingpatches'
Conflicts:
	servefile
2012-10-25 03:08:40 +02:00
Sebastian Pipping dece73be04 Make sorting case-insensitive so that "aaa" and "AAA" end up next to each other 2012-10-25 01:35:34 +02:00
Sebastian Pipping 0df9c56214 Make all directories go on top in listings 2012-10-25 01:31:41 +02:00
Sebastian Pipping 4452d86498 Extract method DirListingHandler._appendToListing (so we can re-use it) 2012-10-24 01:01:42 +02:00
Sebastian Lohff 8c4439cc2b Moved to v0.4.2 2012-06-27 01:44:49 +02:00
Sebastian Lohff 602dba42f9 Enhanced regexes for *bsd compability 2012-06-27 01:44:34 +02:00
Sebastian Lohff d628770d73 Startup parameter fixups 2012-06-26 02:40:41 +02:00
Sebastian Lohff 12169eafe4 Added keyword argument to function for clarification 2012-06-26 02:19:04 +02:00
Sebastian Lohff 18775c5c72 Improved the dirlisting's display of sizes 2012-06-26 02:18:18 +02:00
Sebastian Lohff c5cb5f45a7 Added link to seba-geek.de to dirlisting bottom 2012-06-26 02:16:20 +02:00
Sebastian Lohff 8a32b02eed Added 404 message to dirlisting 2012-06-26 02:16:02 +02:00
Sebastian Lohff fbbbeb3fd2 Code cleanup
List of bugs and improvemends provided by Sebastian Pipping
2012-06-26 02:13:24 +02:00
Sebastian Lohff 5374315e76 Only allow directories for directorylisting 2012-06-25 20:45:37 +02:00
Sebastian Lohff 8a040fbb75 Enhanced error message for broken SSL keyfiles 2012-06-25 20:33:21 +02:00
Sebastian Lohff 2ce2a9c228 Better error messages when socket could not be opened 2012-06-25 20:03:34 +02:00
Sebastian Lohff f48838f63c Fixed bug where --tar produced filenames with duplicate extension 2012-06-25 19:30:18 +02:00
Sebastian Lohff 8274849c8a Moved to new print function and python3 support 2012-06-25 19:23:50 +02:00
Sebastian Lohff df6e6f403a Fixed documentation for --realm option 2012-06-25 13:05:43 +02:00
Sebastian Lohff 2e1af7785b Fixed minor punctuation mistake 2012-06-25 12:39:56 +02:00
Sebastian Lohff c357b585e6 Added option for changing the http basic auth realm 2012-06-25 12:39:19 +02:00
Sebastian Lohff 9c4df009ee Fixed bug where content-length overflowed on 32bit systems
Content-Lenght could be too big for 32bit systems when uploading
big files.
2012-06-25 03:37:42 +02:00
Sebastian Lohff 98d4aeb26b Manpage now reflects -4 and -6 options 2012-06-25 02:45:28 +02:00