Commit Graph

7 Commits

Author SHA1 Message Date
Sebastian Lohff 19c1b000a4 Make servefile a python package
servefile is now a valid python package. The single servefile.py can
still be used as a script by just putting it into PATH and making it
executable. Additionally when installed via pip a wrapper script is
created, calling the module's main(). python -m servefile works as well.
2020-09-07 00:26:20 +02:00
Sebastian Pipping 0819d23f47 tests: Use sys.executable during tests 2020-02-08 01:26:47 +01:00
Sebastian Pipping a7d273f13f tests: Prepare version-specific code for extension 2020-02-08 01:15:27 +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
Sebastian Lohff 6e27ecfe8c Python3 SSL socket handling 2019-02-24 13:59:12 +01:00
Sebastian Lohff 93e0c3dd7e Initial tests 2019-02-17 21:29:23 +01:00