anchor.diff:  parse_specific_type(?PUBLISH,<<Dup:1,QoS:2,Retain:1>>,S) when QoS =< 2 ->
   
       %% validate flags - @todo: should we do that here? or in the connection process???
  -    case {Dup,QoS,Retain} of
  -        {1,0,_}->
  -            throw({error,invalid_flags});
  -        _ ->
  -            ok
  +    case {Dup,QoS} of
  +        {1,0} -> throw({error,invalid_flags});
  +        _     -> ok
       end,
   
       %#parse_state{buffer = Rest } = S,
  
positive.code: -include("mqtt_packets.hrl").
  
  %% API
  -export([parse_packet/1
      %% ,read/1, read/3, read_at_least/2, parse_string/1, parse_variable_length/1
      , parse_string/1, parse_variable_length/1]).
  
  
  %% ========================================================
  
negative.code:     {ok,undefined,Buffer};
  
  maybe_parse_will_details(_WillFlag = 1,WillRetain,WillQoS,Buffer) when WillQoS =< 2 ->
      {ok,WillTopic,Rest1}   =  parse_string(Buffer),
      {ok,WillMessage,Rest2} =  parse_string(Rest1),
      {
          ok,
          #will_details{
  