anchor.diff:  %% @end
   %%-------------------------------------------------------------------------
   decode(Message) -> 
  -	M1 = split(Message),
  -	Headers = headers(M1#mime.header_text),
  -	M1#mime{header = Headers}.
  +	MIME = split(Message),
  +	Headers = headers(MIME#mime.header_text),
  +	case lists:keysearch('content-type',1,Headers) of
  +		{value,{'content-type',Value}} ->
  +			case lists:prefix("multipart",http_util:to_lower(Value)) of
  +				true -> 
  +					Pos = string:chr(Value,61),
  +					{_,B} = lists:split(Pos,Value),
  +					Boundary = string:strip(B,both,34),
  +					Parts = split_multipart(Boundary,MIME#mime.body_text),
  +					MIMEParts = lists:map(fun(P) ->
  +							decode(P)
  +						end, Parts),
  +					MIME#mime{header = Headers, body = MIMEParts};
  +				false -> MIME#mime{header = Headers, body = MIME#mime.body_text}
  +			end;
  +		_ -> MIME#mime{header = Headers, body = MIME#mime.body_text}
  +	end.
  +
   
   
   
  
positive.code: %% @end
  %%-------------------------------------------------------------------------
  headers(HeaderText) ->
  	{ok,H,_Lines} = regexp:gsub(HeaderText,";\n",";"),
  	Tokens = string:tokens(H,[10]),
  	headers(Tokens,[]).
  %%-------------------------------------------------------------------------
  %% @spec (list(),Acc::list()) -> list()
  
negative.code: 
  -export([encode/1,decode/1]).
  
  -export([split/1,headers/1,split_multipart/2]).
  
  
  
  