Remove symlink from xml listing response
We've had some problems with brittle XML clients in the past - it might be safer to ask that clients that need symlink keys in listings from containers request in JSON. Change-Id: I4ac7457f3ccb10f9e471ec6dc6f0869d71712878
This commit is contained in:
parent
6bae7df275
commit
097e975938
@ -93,10 +93,6 @@ def container_to_xml(listing, base_name):
|
||||
SubElement(sub, field).text = six.text_type(
|
||||
record.pop(field))
|
||||
|
||||
if 'symlink_path' in record:
|
||||
SubElement(sub, 'symlink_path').text = six.text_type(
|
||||
record.pop('symlink_path'))
|
||||
|
||||
return tostring(doc, encoding='UTF-8').replace(
|
||||
"<?xml version='1.0' encoding='UTF-8'?>",
|
||||
'<?xml version="1.0" encoding="UTF-8"?>', 1)
|
||||
|
@ -87,11 +87,12 @@ error. The account level tempurl will allow cross container symlinks.
|
||||
If a symlink object is overwritten while it is in a versioned container, the
|
||||
symlink object itself is versioned, not the referenced object.
|
||||
|
||||
A GET request with query parameter ``?format=json`` or ``?format=xml`` to a
|
||||
container which contains symlinks will respond with additional information
|
||||
``symlink_path`` for each symlink object in the container listing. The
|
||||
``symlink_path`` value is the target path of the symlink. Clients can
|
||||
differentiate symlinks and other objects by this function.
|
||||
A GET request with query parameter ``?format=json`` to a container which
|
||||
contains symlinks will respond with additional information ``symlink_path``
|
||||
for each symlink object in the container listing. The ``symlink_path`` value
|
||||
is the target path of the symlink. Clients can differentiate symlinks and
|
||||
other objects by this function. Note that responses of any other format
|
||||
(e.g.``?format=xml``) won't include ``symlink_path`` info.
|
||||
|
||||
Errors
|
||||
|
||||
|
@ -843,7 +843,6 @@ class TestSymlinkContainerContext(TestSymlinkMiddlewareBase):
|
||||
'<hash>etag</hash><bytes>0</bytes>'
|
||||
'<content_type>text/plain</content_type>'
|
||||
'<last_modified>2014-11-21T14:23:02.206740</last_modified>'
|
||||
'<symlink_path>/v1/a/c/o</symlink_path>'
|
||||
'</object>'
|
||||
'<object><name>normal_obj</name><hash>etag2</hash>'
|
||||
'<bytes>32</bytes><content_type>text/plain</content_type>'
|
||||
|
Loading…
x
Reference in New Issue
Block a user