Skip to content
Open
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
8 changes: 2 additions & 6 deletions fsspec/implementations/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ def _open(
autocommit=None, # XXX: This differs from the base class.
cache_type=None,
cache_options=None,
size=None,
**kwargs,
):
"""Make a file-like object
Expand All @@ -355,16 +354,14 @@ def _open(
kw = self.kwargs.copy()
kw["asynchronous"] = self.asynchronous
kw.update(kwargs)
size = size or self.info(path, **kwargs)["size"]
session = sync(self.loop, self.set_session)
if block_size and size:
if block_size:
return HTTPFile(
self,
path,
session=session,
block_size=block_size,
mode=mode,
size=size,
cache_type=cache_type or self.cache_type,
cache_options=cache_options or self.cache_options,
loop=self.loop,
Expand Down Expand Up @@ -549,7 +546,6 @@ def __init__(
mode="rb",
cache_type="bytes",
cache_options=None,
size=None,
loop=None,
asynchronous=False,
**kwargs,
Expand All @@ -559,7 +555,7 @@ def __init__(
self.asynchronous = asynchronous
self.url = url
self.session = session
self.details = {"name": url, "size": size, "type": "file"}
self.details = {"name": url, "size": None, "type": "file"}
super().__init__(
fs=fs,
path=url,
Expand Down