summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2012-01-24 19:05:24 +0000
committerAlexandru Scvortov <alexandru@rabbitmq.com>2012-01-24 19:05:24 +0000
commit2c53e3452477d6063e0424db9cd37371ab9b94c7 (patch)
tree5e42623c33b1669c702875022e863e5e76d1d01d /src
parent9f1793492d497a5dda19c5685228b38a8ea29410 (diff)
downloadrabbitmq-server-git-2c53e3452477d6063e0424db9cd37371ab9b94c7.tar.gz
overwrite malformed x-death headers
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_amqqueue_process.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index bd6a8d2dde..5d3d939a73 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -861,11 +861,12 @@ make_dead_letter_msg(DLX, Reason,
[{<<"x-death">>, array, [DeathTable]}];
_ ->
case rabbit_misc:table_lookup(Headers, <<"x-death">>) of
- undefined ->
- [{<<"x-death">>, array, [DeathTable]} | Headers];
{array, Prior} ->
rabbit_misc:set_table_value(
- Headers, <<"x-death">>, array, [DeathTable | Prior])
+ Headers, <<"x-death">>, array,
+ [DeathTable | Prior]);
+ _ ->
+ [{<<"x-death">>, array, [DeathTable]} | Headers]
end
end,
{DeathRoutingKeys, Headers2} =