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

Download dies when only metadata for a cached file is present #137

Open
mstoykov opened this issue Oct 16, 2015 · 0 comments
Open

Download dies when only metadata for a cached file is present #137

mstoykov opened this issue Oct 16, 2015 · 0 comments
Labels

Comments

@mstoykov
Copy link
Collaborator

When only the metadata is present and a request for the whole file comes the cache tries a range request with start 0 and length the size of the file. If OK instead of Partial Content is returned the cache handler errors out with no data returned or cached.

Easily reproducible with wget on a still not cached file. Make a request and stop it early enough so that not one piece gets cached and then try to download it again.

$ wget -S -O /dev/null "http://127.0.0.1:8282/cts1.mp4"
--2015-10-16 11:57:12--  http://127.0.0.1:8282/cts1.mp4
Connecting to 127.0.0.1:8282... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Accept-Ranges: bytes
  Content-Length: 23978230
  Content-Type: video/mp4
  Date: Fri, 16 Oct 2015 08:57:12 GMT
  Last-Modified: Wed, 01 Aug 2012 22:48:29 GMT
  X-Host: 127.0.0.50
  X-Host: 127.0.0.1
Length: 23978230 (23M) [video/mp4]
Saving to: ‘/dev/null’

/dev/null                                                                         2%[====>                                                                                                                                                                                                    ] 671.79K   119KB/s   eta 3m 12s^C
$ #  download it again
$ wget -S -O /dev/null "http://127.0.0.1:8282/cts1.mp4"
--2015-10-16 11:57:39--  http://127.0.0.1:8282/cts1.mp4
Connecting to 127.0.0.1:8282... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Accept-Ranges: bytes
  Content-Length: 23978230
  Content-Type: video/mp4
  Date: Fri, 16 Oct 2015 08:57:12 GMT
  Last-Modified: Wed, 01 Aug 2012 22:48:29 GMT
  X-Host: 127.0.0.50
  X-Host: 127.0.0.1
Length: 23978230 (23M) [video/mp4]
Saving to: ‘/dev/null’

/dev/null                                                                         0%[                                                                                                                                                                                                         ]       0  --.-KB/s   in 0s

2015-10-16 11:57:39 (0.00 B/s) - Connection closed at byte 0. Retrying.

--2015-10-16 11:57:40--  (try: 2)  http://127.0.0.1:8282/cts1.mp4
Connecting to 127.0.0.1:8282... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Accept-Ranges: bytes
  Content-Length: 23978230
  Content-Type: video/mp4
  Date: Fri, 16 Oct 2015 08:57:39 GMT
  Last-Modified: Wed, 01 Aug 2012 22:48:29 GMT
  X-Host: 127.0.0.50
  X-Host: 127.0.0.1
Length: 23978230 (23M) [video/mp4]
Saving to: ‘/dev/null’

/dev/null                                                                         0%[                                                                                                                                                                                                         ]       0  --.-KB/s   in 0s

2015-10-16 11:57:40 (0.00 B/s) - Connection closed at byte 0. Retrying.
@mstoykov mstoykov added the bug label Oct 16, 2015
@mstoykov mstoykov self-assigned this Oct 16, 2015
@mstoykov mstoykov added this to the Alpha 1 milestone Oct 16, 2015
@ironsmile ironsmile changed the title download dies when only metadata present Download dies when only metadata for a cached file is present Oct 20, 2015
@ironsmile ironsmile removed this from the Alpha 1 milestone Oct 30, 2015
@mstoykov mstoykov removed their assignment Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants