anchor.diff:  					  snp_article_parser_server:create(Item, StartDelay) 
   			  end, Items),
   	ok.
  +
  +
  +extract_etag(Headers) ->
  +	case lists:keyfind("etag", 1, Headers) of
  +		{_, ETag} -> ETag;
  +		false -> none
  +	end.
  +
  +extract_last_modified(Headers) ->
  +	case lists:keyfind("last-modified", 1, Headers) of
  +		{_, LastModified} -> LastModified;
  +		false -> none
  +	end.
  +
  +
  +get_etag_header(#state{etag=none}) -> []; 
  +get_etag_header(#state{etag=ETag}) when is_list(ETag) ->
  +	[{"If-None-Match", ETag}].
  +	
  +get_last_modified_header(#state{last_modified=none}) -> [];
  +get_last_modified_header(#state{last_modified=LastModified}) 
  +  when is_list(LastModified) -> [{"If-Modified-Since", LastModified}].
  +
  +	
  +%% --------------------------------------------------------------------
  +%%% Unit tests
  +%% --------------------------------------------------------------------
  +
  +
  +-ifdef(TEST).
  +
  +get_etag_headers_none_test() ->
  +	State = #state{etag=none},
  +	Headers = get_etag_header(State),
  +	?assertEqual([], Headers).
  +
  +get_etag_headers_test() ->
  +	State = #state{etag=45},
  +	?assertError(function_clause, get_etag_header(State)).
  +
  +extract_etag_test() ->
  +	Headers = [{"Header1", "val1"}, {"etag", "etag-val"}, {"Header2", "val3"}],
  +	ETag = extract_etag(Headers),
  +	?assertEqual("etag-val", ETag).
  +
  +extract_etag_not_found_test() ->
  +	Headers = [{"Header1", "val1"}, {"Header2", "val3"}],
  +	ETag = extract_etag(Headers),
  +	?assertEqual(none, ETag).	
  +	
  +
  +-endif.
positive.code: 
  -behaviour(gen_server).
  
  -export([start_link/3, create/3]).
  
  -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
      terminate/2, code_change/3]).
  
  -include("snp_logging.hrl").
  -include("snp_rss_item.hrl").
  
  -define(START_DELAY_MAX, 4000).
  
  -record(state, {url, repeat_time}).
  
  
  start_link(Url, RepeatTime, Index) ->
  	gen_server:start_link(?MODULE, [Url, RepeatTime, Index], []).
  
  create(Url, RepeatTime, Index) ->
  	snp_rss_parse_sup:start_child(Url, RepeatTime, Index).
  
  %% RepeatTime is passed in seconds
  init([Url, RepeatTime, Index]) ->
  
negative.code:     {noreply, State}.
  
  handle_info({rss_update}, State) ->
  	NewState = process_rss(State),
  	?INFO("New state: ~p", [NewState]),
  	erlang:send_after(NewState#state.repeat_time, self(), {rss_update}),
  	{noreply, NewState};
  
  handle_info(_Info, State) ->
      {noreply, State}.
  