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

Lib requesting out of bound range #77

Open
pkwong4321 opened this issue May 28, 2024 · 0 comments
Open

Lib requesting out of bound range #77

pkwong4321 opened this issue May 28, 2024 · 0 comments

Comments

@pkwong4321
Copy link
Contributor

Got an error from zsync while updating, stating the server couldn't handle partial content.
Upon inspecing with CURLOPT_VERBOSE=1 I found that it's only the last request returning full content (200)
It's doing that because while the total file size is 243233088, it's requesting the range past it at 243236863.

I'm not sure how to reproduce, here is the log and the version of tools i used.
OS: Debian 10
zsyncmake: 0.6.2-3
AppImageUpdate: 2.0.0-alpha-1-20230526

> GET xxx.AppImage HTTP/1.1
Host: host.com
Range: bytes=218681344-218685439
Accept: */*

< HTTP/1.1 206 Partial Content
< Server: AliyunOSS
< Date: Mon, 27 May 2024 16:22:24 GMT
< Content-Type: application/octet-stream
< Content-Length: 4096
< Connection: keep-alive
< x-oss-request-id: 6654B3402A8F622C553851A4
< Content-Range: bytes 218681344-218685439/243233088
< Accept-Ranges: bytes
< ETag: "954B7FD219F2CB384BA1E687F9A920C2-95"
< Last-Modified: Mon, 27 May 2024 04:24:38 GMT
< x-oss-object-type: Multipart
< x-oss-hash-crc64ecma: 5989594152036317672
< x-oss-storage-class: Standard
< x-oss-server-time: 29
< 
* Connection #1 to host host.com left intact
* Expire in 0 ms for 6 (transfer 0x7f7138684a40)
* Found bundle for host host.com: 0x7f71380026e0 [can pipeline]
* Could pipeline, but not asked to!
* Re-using existing connection! (#1) with host host.com
* Connected to host.com port 80 (#1)
* Expire in 0 ms for 6 (transfer 0x7f7138684a40)
> GET xxx.AppImage HTTP/1.1
Host: host.com
Range: bytes=218697728-243236863
Accept: */*

< HTTP/1.1 200 OK
< Server: AliyunOSS
< Date: Mon, 27 May 2024 16:22:25 GMT
< Content-Type: application/octet-stream
< Content-Length: 243233088
< Connection: keep-alive
< x-oss-request-id: 6654B340CE4EF5B4BF3C38C5
< Accept-Ranges: bytes
< ETag: "954B7FD219F2CB384BA1E687F9A920C2-95"
< Last-Modified: Mon, 27 May 2024 04:24:38 GMT
< x-oss-object-type: Multipart
< x-oss-hash-crc64ecma: 5989594152036317672
< x-oss-storage-class: Standard
< x-oss-server-time: 26

zsync received a data response (code 200) but this is not a partial content response
zsync can only work with servers that support returning partial content from files. The person/entity creating this .zsync has tried to use a server that is not returning partial content. zsync cannot be used with this server.
See http://zsync.moria.orc.uk/server-issues
Other error? -1
-1 returned
* Closing connection 1

Note:
If I naively limit the final range to filesize-1 in fetchRemainingBlocksHttp(), the update works. It would seem to be a calculation error in the zsync calls, or and error in my generated .zsync meta?

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