diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2013-05-07 16:31:40 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2013-05-07 16:31:40 +0100 |
| commit | e495b62dffe7c4a6503accc516c7360ca0094585 (patch) | |
| tree | c175177fc5c01c8f8890a685adb8271c70fae7c1 | |
| parent | 79005d6a9394cc40e3700331614669cad90c0939 (diff) | |
| download | rabbitmq-server-git-e495b62dffe7c4a6503accc516c7360ca0094585.tar.gz | |
Allow x-match header to be missing.
| -rw-r--r-- | src/rabbit_exchange_type_headers.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_exchange_type_headers.erl b/src/rabbit_exchange_type_headers.erl index 44f909ebba..5b7f95feeb 100644 --- a/src/rabbit_exchange_type_headers.erl +++ b/src/rabbit_exchange_type_headers.erl @@ -63,9 +63,10 @@ validate_binding(_X, #binding{args = Args}) -> {binding_invalid, "Invalid x-match field type ~p (value ~p); " "expected longstr", [Type, Other]}}; - undefined -> {error, - {binding_invalid, "x-match field missing", []}} + undefined -> ok %% [0] end. +%% [0] spec is vague on whether it can be omitted but in practice it's +%% useful to allow people to do this parse_x_match({longstr, <<"all">>}) -> all; parse_x_match({longstr, <<"any">>}) -> any; |
