Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fsspec/implementations/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class HTTPFileSystem(AsyncFileSystem):
HTML href tags will be used.
"""

protocol = ("http", "https")
sep = "/"

def __init__(
Expand Down
12 changes: 12 additions & 0 deletions fsspec/implementations/tests/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,3 +630,15 @@ def test_pipe_file(server, tmpdir, reset_files):
bytesio = io.BytesIO(b"BytesIO content")
fs.pipe_file(server.address + "/piped_bytes", bytesio.getvalue())
assert fs.cat(server.address + "/piped_bytes") == b"BytesIO content"


@pytest.mark.parametrize("protocol", ["http", "https"])
def test_protocol_independent_of_first_used_protocol(protocol):
from fsspec import filesystem

filesystem(protocol)
fs0 = filesystem("http")
p0 = fs0.protocol[0] if isinstance(fs0.protocol, tuple) else fs0.protocol
fs1 = filesystem("https")
p1 = fs1.protocol[0] if isinstance(fs1.protocol, tuple) else fs1.protocol
assert p0 == p1 == "http"
Loading