Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle missing content-length header, rename folder simple_httpfs to httpfs #21

Open
milahu opened this issue Oct 12, 2021 · 0 comments

Comments

@milahu
Copy link

milahu commented Oct 12, 2021

make consistent with module name = httpfs

also, change imports to make it portable = run without install

diff --git a/httpfs/__init__.py b/httpfs/__init__.py
index df9fe47..550da80 100644
--- a/httpfs/__init__.py
+++ b/httpfs/__init__.py
@@ -1,3 +1,3 @@
-from .httpfs import HttpFs
+from httpfs import HttpFs
 
 __version__ = "0.4.12"
diff --git a/httpfs/__main__.py b/httpfs/__main__.py
index bb713b2..41543ab 100644
--- a/httpfs/__main__.py
+++ b/httpfs/__main__.py
@@ -5,7 +5,7 @@ import sys
 
 from fuse import FUSE
 
-from .httpfs import HttpFs
+from __init__ import HttpFs
 
 
 def main():

handle missing content-length header

work in progress: https://github.com/milahu/fuse-httpfs/tree/wip-stash

  • rename simple_httpfs to httpfs
  • cache file_data on first get request in HttpFs.getSize

edit: downloading files only for the file size is a terrible waste of bandwidth.
better solution: show file as symlink -> no need for file size
download only when symlink is resolved in readlink syscall

some http servers dont support range requests, so range 0-1 has no effect

@milahu milahu changed the title rename folder simple_httpfs to httpfs handle missing content-length header, rename folder simple_httpfs to httpfs Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant