Feature #4122

[Keep] Keepstore respects HTTP HEAD method semantics

Added by Tim Pierce almost 5 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
-
Category:
Keep
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
1.0

Description

Currently keepstore violates HTTP specification by returning a non-empty response body.

It should behave exactly the same as GET (including checksum verification) but return an empty response body.


Related issues

Related to Arvados - Feature #2706: [SDKs] Python SDK Keep client can enable "HEAD before PUT" mode when writing. Expose this as an arv-put option.New

Has duplicate Arvados - Bug #8702: [Keep] HEAD request should do a checksum of the blob without sending itResolved03/15/2016

History

#1 Updated by Tim Pierce almost 5 years ago

  • Target version changed from Bug Triage to Arvados Future Sprints

Currently, Keepstore responds to both HEAD and GET requests the same way, with a full data block.

If the server responded to HEAD requests properly, with just a report of success or failure, it would permit writing applications to check whether a block exists at the destination. That would be a significant performance improvement to tools like arv-copy, which cannot efficiently resume copying a collection if interrupted.

#2 Updated by Tim Pierce almost 5 years ago

  • Story points set to 1.0

#3 Updated by Ward Vandewege almost 5 years ago

  • Subject changed from Keepstore supports proper HEAD requests to [Keep] Keepstore supports proper HEAD requests

#4 Updated by Ward Vandewege almost 5 years ago

  • Tracker changed from Bug to Feature

#5 Updated by Ward Vandewege almost 5 years ago

  • Target version changed from Arvados Future Sprints to 2014-10-29 sprint

#6 Updated by Tom Clegg almost 5 years ago

  • Subject changed from [Keep] Keepstore supports proper HEAD requests to [Keep] Keepstore respects HTTP HEAD method semantics
  • Description updated (diff)
  • Category set to Keep
  • Target version changed from 2014-10-29 sprint to Arvados Future Sprints

Tim Pierce wrote:

Currently, Keepstore responds to both HEAD and GET requests the same way, with a full data block.

If the server responded to HEAD requests properly, with just a report of success or failure, it would permit writing applications to check whether a block exists at the destination. That would be a significant performance improvement to tools like arv-copy, which cannot efficiently resume copying a collection if interrupted.

I don't think HEAD could enable this functionality unless the permission system is disabled. (But obeying the HTTP specification is a good idea anyway.)

#7 Updated by Tom Clegg over 3 years ago

  • Target version deleted (Arvados Future Sprints)
  • Status changed from New to Resolved
tomclegg@shell:~$ time curl --head -H "Authorization: OAuth2 $ARVADOS_API_TOKEN" "http://keep6.c97qk.arvadosapi.com:25107/a59f44608b780c968af43da75cc9d6e8+67108864+Ad9785dc3247c083f49c7524690e140659bfef7b3@56fdbbaa" 
HTTP/1.1 200 OK
Content-Length: 67108864
Content-Type: application/octet-stream
Date: Fri, 18 Mar 2016 00:11:29 GMT

real    0m2.036s
user    0m0.000s
sys     0m0.014s

Also available in: Atom PDF