Skip to content

Commit

Permalink
Merge pull request #495 from kyleknap/empty-structure-s3
Browse files Browse the repository at this point in the history
Fix issue with rest-xml serialization
  • Loading branch information
kyleknap committed Mar 24, 2015
2 parents c7ad6a8 + 4cd5a43 commit 54c4615
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion botocore/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def _serialize_payload(self, partitioned, parameters,
# If there's a payload member, we serialized that
# member to they body.
body_params = parameters.get(payload_member)
if body_params:
if body_params is not None:
serialized['body'] = self._serialize_body_params(
body_params,
shape_members[payload_member])
Expand Down
42 changes: 42 additions & 0 deletions tests/unit/protocols/input/rest-xml.json
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,48 @@
"body": "",
"uri": "/"
}
},
{
"given": {
"http": {
"method": "POST",
"requestUri": "/"
},
"input": {
"shape": "InputShape",
"payload": "foo"
},
"name": "OperationName"
},
"params": {
"foo": {}
},
"serialized": {
"method": "POST",
"body": "<foo />",
"uri": "/"
}
},
{
"given": {
"http": {
"method": "POST",
"requestUri": "/"
},
"input": {
"shape": "InputShape",
"payload": "foo"
},
"name": "OperationName"
},
"params": {
"foo": null
},
"serialized": {
"method": "POST",
"body": "",
"uri": "/"
}
}
]
},
Expand Down

0 comments on commit 54c4615

Please sign in to comment.