Skip to content

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

@milahu

Description

@milahu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions