Comment 0 for bug 1563371

Revision history for this message
Bill Huber (wbhuber) wrote :

Swift is not complying with the RFC rules below on quality values. Using the Accept Header support, Swift is able to generate more than 3 digits after the decimal point instead of producing a status code of 406 - NOT_ACCEPTABLE. Example below after the description:

3.9 Quality Values

 HTTP content negotiation (section 12) uses short "floating point"
 numbers to indicate the relative importance ("weight") of various
 negotiable parameters. A weight is normalized to a real number in
 the range 0 through 1, where 0 is the minimum and 1 the maximum
 value. If a parameter has a quality value of 0, then content with
 this parameter is `not acceptable' for the client. HTTP/1.1
 applications MUST NOT generate more than three digits after the
 decimal point. User configuration of these values SHOULD also be
 limited in this fashion.

{code}
curl -X GET -i -H "X-Auth-Token: $token" http://127.0.0.1:8080/v1/AUTH_test/Tont -H "Accept: text/xml;q=0.2234"
HTTP/1.1 200 OK
Content-Length: 867
X-Container-Object-Count: 4
Accept-Ranges: bytes
X-Storage-Policy: gold
X-Container-Bytes-Used: 0
X-Timestamp: 1457655301.60066
Content-Type: text/xml; charset=utf-8
X-Trans-Id: txf92b4adc15774f8bb29b0-0056fa95bb
Date: Tue, 29 Mar 2016 14:48:27 GMT

<?xml version="1.0" encoding="UTF-8"?>
<container name="Tont"><object><name>c.zip</name><hash>d41d8cd98f00b204e9800998ecf8427e</hash><bytes>0</bytes><content_type>application/zip</content_type><last_modified>2016-03-29T14:31:56.509850</last_modified></object><object><name>e.zip</name><hash>d41d8cd98f00b204e9800998ecf8427e</hash><bytes>0</bytes><content_type>application/zip</content_type><last_modified>2016-03-15T18:33:00.386120</last_modified></object><object><name>sample.zip</name><hash>d41d8cd98f00b204e9800998ecf8427e</hash><bytes>0</bytes><content_type>application/zip</content_type><last_modified>2016-03-28T19:53:50.736990</last_modified></object><object><name>t.zip</name><hash>d41d8cd98f00b204e9800998ecf8427e</hash><bytes>0</bytes><content_type>application/zip</content_type><last_modified>2016-03-29T14:09:48.812170</last_modified></object></container>
{code}