[Zsync-users] Out-of-boundary requests and one endless loop issue
Status: Beta
Brought to you by:
cph
From: Aiko B. <ai...@to...> - 2014-02-16 10:20:03
|
Hello, I wrote a simple command line webserver[1] some time ago and I always wanted to support zsync. Though, I had two issues that I solved on my end. Nevertheless, I would like to discuss the issues: 1) The zsync requests are always out-of-boundary. Example: * The file size is 10460861 bytes. * The zsync file header says: "Length: 10460861" But the initial requested size is: > bytes=0-10461183 That is beyond the file size. Is this intentionally? All webservers ignore this and return 10460861 bytes and also advertise this in their reply header. 2) zsync goes into an endless loop internally, ... ... when it requests multiple ranges and the webserver does not send _two_ empty newlines (\r\n) between the HTTP header and the body. Then, zsync does not find the "boundary" header and starts over and over again. Endlessly... I do send _two_ newlines in this special case now. nginx does it too. But why _two_? Kind regards, Aiko [1]: https://github.com/torrentkino/tumbleweed -- :wq ✉ |