diff options
| author | sylvainhubsch <sylvain.hubsch@gmail.com> | 2016-04-19 00:46:07 -0700 |
|---|---|---|
| committer | Michael Klishin <michael@clojurewerkz.org> | 2016-06-06 15:03:34 +0300 |
| commit | b6db63151efffa7c091702b78aac64f84f4ffcb2 (patch) | |
| tree | 8af523d886b6315e359f164885a6ff118a12648e | |
| parent | ac7225809362f2df541a656bc0611506566e361a (diff) | |
| download | rabbitmq-server-git-b6db63151efffa7c091702b78aac64f84f4ffcb2.tar.gz | |
Compare values only on headers match
| -rw-r--r-- | src/rabbit_exchange_type_headers.erl | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/rabbit_exchange_type_headers.erl b/src/rabbit_exchange_type_headers.erl index 444d507c7e..c9dedbbe95 100644 --- a/src/rabbit_exchange_type_headers.erl +++ b/src/rabbit_exchange_type_headers.erl @@ -111,26 +111,16 @@ headers_match(Pattern = [{PK, _PT, _PV} | _], [{DK, _DT, _DV} | DRest], headers_match([{PK, _PT, _PV} | PRest], Data = [{DK, _DT, _DV} | _], _AllMatch, AnyMatch, MatchKind) when PK < DK -> headers_match(PRest, Data, false, AnyMatch, MatchKind); - -%% It's not properly specified, but a "no value" in a -%% pattern field is supposed to mean simple presence of -%% the corresponding data field. I've interpreted that to -%% mean a type of "void" for the pattern field. headers_match([{PK, void, _PV} | PRest], [{DK, _DT, _DV} | DRest], AllMatch, _AnyMatch, MatchKind) when PK == DK -> headers_match(PRest, DRest, AllMatch, true, MatchKind); - -% Complete match, true with any, go next headers_match([{PK, _PT, PV} | PRest], [{DK, _DT, DV} | DRest], AllMatch, _AnyMatch, MatchKind) when PK == DK andalso PV == DV -> headers_match(PRest, DRest, AllMatch, true, MatchKind); - -% Value does not match, false with all, go next headers_match([{PK, _PT, _PV} | PRest], [{DK, _DT, _DV} | DRest], _AllMatch, AnyMatch, MatchKind) when PK == DK -> headers_match(PRest, DRest, false, AnyMatch, MatchKind). - validate(_X) -> ok. create(_Tx, _X) -> ok. delete(_Tx, _X, _Bs) -> ok. |
