diff options
| author | Michael Bridgen <mikeb@rabbitmq.com> | 2010-08-02 12:02:12 +0100 |
|---|---|---|
| committer | Michael Bridgen <mikeb@rabbitmq.com> | 2010-08-02 12:02:12 +0100 |
| commit | e759510a5dcfa87b213609c4075a34e2664953bc (patch) | |
| tree | 9411bfb432c4a121255e50fd9590bb4a313a09c2 | |
| parent | c76a37ac41de8f00525dbe09dd47567443078616 (diff) | |
| download | rabbitmq-server-git-e759510a5dcfa87b213609c4075a34e2664953bc.tar.gz | |
The crazy protocol header is the 0-8 spec's fault; adjust comment to not impugn py-amqp's good name (and document other headers)
| -rw-r--r-- | src/rabbit_reader.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index f687f814c8..a8b2ae5414 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -562,14 +562,19 @@ handle_input({frame_payload, Type, Channel, PayloadSize}, PayloadAndMarker, Stat handle_input(handshake, <<"AMQP", 0, 0, 9, 1>>, State) -> start_connection({0, 9, 1}, rabbit_framing_amqp_0_9_1, State); +%% This is the protocol header for 0-9, which we can safely treat as +%% though it were 0-9-1. handle_input(handshake, <<"AMQP", 1, 1, 0, 9>>, State) -> start_connection({0, 9, 0}, rabbit_framing_amqp_0_9_1, State); -%% the 0-8 spec, confusingly, defines the version as 8-0 +%% This is what most clients send for 0-8. The 0-8 spec, confusingly, +%% defines the version as 8-0. handle_input(handshake, <<"AMQP", 1, 1, 8, 0>>, State) -> start_connection({8, 0, 0}, rabbit_framing_amqp_0_8, State); -%% py-amqplib has always sent this broken version. It wants 0-8. +%% The 0-8 spec as on the AMQP web site actually has this as the +%% protocol header; some libraries e.g., py-amqplib, send it when they +%% want 0-8. handle_input(handshake, <<"AMQP", 1, 1, 9, 1>>, State) -> start_connection({8, 0, 0}, rabbit_framing_amqp_0_8, State); |
