Is it necessary that storage_uri.get_contents_as_{string|file} sends a HEAD before GET?

12 views
Skip to first unread message

Ning Wang

unread,
May 8, 2015, 11:52:57 AM5/8/15
to boto-...@googlegroups.com
It seems that storage_uri.get_contents_as_string() calls bucket.get_key() first, which sends a HEAD request to check if the object exists or not. Since the following GET request is supposed to return 404 as well when the object does not exist, I'm wondering if this extra HEAD can be eliminated which saves a RTT from latency perspective. Is there any reason get_key() must be called here instead of just constructing a new key?
Reply all
Reply to author
Forward
0 new messages