Skip to content

Commit

Permalink
Merge pull request #821 from junamai2000/develop
Browse files Browse the repository at this point in the history
Add support for Cache-Control header

Reviewed-by: kuenishi
  • Loading branch information
borshop committed Mar 25, 2014
2 parents 0c86dc6 + a5a4560 commit bb2ddcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/riak_cs_wm_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ extract_amazon_headers(Headers) ->
ordsets:from_list(lists:foldl(FilterFun, [], Headers)).

%% @doc Extract user metadata from request header
%% Expires, Content-Disposition, Content-Encoding and x-amz-meta-*
%% Expires, Content-Disposition, Content-Encoding, Cache-Control and x-amz-meta-*
%% TODO: pass in x-amz-server-side-encryption?
%% TODO: pass in x-amz-storage-class?
%% TODO: pass in x-amz-grant-* headers?
Expand All @@ -593,7 +593,7 @@ extract_user_metadata([], Acc) ->
Acc;
extract_user_metadata([{Name, Value} | Headers], Acc)
when Name =:= 'Expires' orelse Name =:= 'Content-Encoding'
orelse Name =:= "Content-Disposition" ->
orelse Name =:= "Content-Disposition" orelse Name =:= 'Cache-Control' ->
extract_user_metadata(
Headers, [{any_to_list(Name), unicode:characters_to_list(Value, utf8)} | Acc]);
extract_user_metadata([{Name, Value} | Headers], Acc) when is_list(Name) ->
Expand Down

0 comments on commit bb2ddcf

Please sign in to comment.