← Back to team overview

registry team mailing list archive

[Bug 646039] Re: PUT with X-Copy-From header requires content length header

 

I think this should be "won't fix"

PUT's require the content-length of the body (or chunked encoding, your
choice).  On a X-Copy-From the body of the request should be length zero
(it's ignored anyway).  I think the correct behavior is to require the
user/agent to explicitly state the content-length of the request as
zero.

If you don't want to specify content-length use COPY.

curl -XCOPY -H "Destination: big_files/copiedfile" -k -H "x-auth-token: xxx" https://xxx.clouddrive.com/v1/xxx/big_files/mytestfile.out
<html>
 <head>
  <title>201 Created</title>
 </head>
 <body>
  <h1>201 Created</h1>
  <br /><br />


If anything we *might* file a bug that swift should return a 412 on PUT requests with an X-Copy-From header in which the content-length is NON-zero, or a body is included.  But that's probably also low importance.  Simply ignoring these those values is unlikely to cause anyone grief.

-- 
PUT with X-Copy-From header requires content length header
https://bugs.launchpad.net/bugs/646039
You received this bug notification because you are a member of Registry
Administrators, which is subscribed to OpenStack Object Storage (swift).



References