anchor.diff:  -export([ init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3 ]).
   
   -include("include/orc_http.hrl").
  --record(orc, { socket, request = #request{}, redirect = false }).
  +-record(orc, { socket, request = #request{} }).
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   % Public API
  
positive.code: 
  code_change( _Old, Orc, _Extra) ->
  	{ ok, Orc }.
  
  %% redirects to wss
  redirect(#request{ socket =Socket, path = Path, headers = Headers }) ->
  	Host = proplists:get_value(<<"Host">>, Headers ),
  	error_logger:info_msg("Path ~p~nHost ~p~n", [ Path, Host ]),
  	Location =  <<"wss://", Host/binary, Path/binary>>,
  	#response{
  		socket = Socket,
  		status = 302,
  		headers = [
  			{ <<"Location">>, Location }
  		],
  		body = <<"302 Found ", Location/binary>>
  	}.
  	
  
  
negative.code: 						request = #request{ socket = Socket }
  					}};
  				{ error, timeout } ->
  					error_logger:error_msg("SSl timeout~n"),
  					{ stop, no_ssl };
  				{ error, Reason } ->
  					error_logger:error_msg("SSL connection failed: ~p", [ Reason ]),
  					{ stop, Reason }
  