anchor.diff:      {ok, State}.
   
   
  -%% private functions
  +%% --------------------------------------------------------------------
  +%%% Internal functions
  +%% --------------------------------------------------------------------
   
   process_rss(State) ->
   	Url = State#state.url,
   	?INFO("Fetching RSS update for URL ~p", [Url]),
   	
  -	% TODO: add support for expiration headers (If-None-Match/ETag and If-Modified-Since/Last-Modified)
  -	% synchronous download of RSS feed
  -	{ok, {{_Version, 200, _ReasonPhrase}, _Headers, Body}} = 
  -		httpc:request(get, {Url, []}, [], []),
  -	?INFO("Got RSS body of length ~p for Url ~p", [length(Body), Url]),
  +	EtagHeaders = get_etag_header(State),
  +	LastModifiedHeaders = get_last_modified_header(State),
  +	RequestHeaders = EtagHeaders ++ LastModifiedHeaders,
  +	?INFO("Request headers: ~p", [RequestHeaders]),
  +	{ok, {{_Version, ResponseCode, _ReasonPhrase}, Headers, Body}} = 
  +		httpc:request(get, {Url, RequestHeaders}, [], []),
   	
  +	?INFO("Response headers: ~p", [Headers]),
  +	
  +	case ResponseCode of
  +		200 ->
  +			?INFO("Got RSS body of length ~p for Url ~p", [length(Body), Url]),
  +			parse_body(Body);
  +		304 ->
  +			?INFO("Feed is not modified since last call", []),
  +			ok
  +	end,
  +	State#state{
  +				etag=extract_etag(Headers), 
  +				last_modified=extract_last_modified(Headers)
  +			   }.
  +	
  +
  +parse_body(Body) ->
   	{ok, Items} = snp_rss_parse:get_items(Body),
   	
   	lists:map(fun(Item) -> 
  
positive.code:     {noreply, State}.
  
  handle_info({rss_update}, State) ->
  	process_rss(State),
  	erlang:send_after(State#state.repeat_time, self(), {rss_update}),
  	{noreply, State};
  
  handle_info(_Info, State) ->
      {noreply, State}.
  
negative.code: 	?INFO("Starting RSS downloader worker for URL ~p in time ~p", [Url, RandStartTime]),
  	erlang:send_after(RandStartTime * 1000, self(), {rss_update}),
      {ok, 
  	#state{url=Url, repeat_time=RepeatTime * 1000, etag=none, last_modified=none}}.
  
  
  handle_call(_Request, _From, State) ->
  