mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
ipn: fix localapi and peerapi protocol for taildrop resume (#9860)
Minor fixes: * The branch for listing or hashing partial files was inverted. * The host for peerapi call needs to be real (rather than bogus). * Handle remote peers that don't support resuming. * Make resume failures non-fatal (since we can still continue). This was tested locally, end-to-end system test is future work. Updates tailscale/corp#14772 Signed-off-by: Joe Tsai <joetsai@digital-static.net> Co-authored-by: Rhea Ghosh <rhea@tailscale.com>
This commit is contained in:
@@ -655,7 +655,7 @@ func (h *peerAPIHandler) handlePeerPut(w http.ResponseWriter, r *http.Request) {
|
||||
var err error
|
||||
id := taildrop.ClientID(h.peerNode.StableID())
|
||||
|
||||
if r.URL.Path == "/v0/put/"+baseName {
|
||||
if prefix == "" {
|
||||
resp, err = h.ps.taildrop.PartialFiles(id)
|
||||
} else {
|
||||
ranges, ok := httphdr.ParseRange(r.Header.Get("Range"))
|
||||
|
Reference in New Issue
Block a user