Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
return a duple
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Newson committed Mar 11, 2011
1 parent 9f34ae7 commit 09d9aa9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/monic_file.erl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ handle_call({write, Ref, {Bin, Next}}, _From, #state{main_fd=Fd, write_pos=Pos,
monic_utils:write_index(State#state.index_fd, Index),
ets:insert(State#state.tid, {Index#index.key, Index#index.location,
Index#index.size, Index#index.version}),
{reply, {ok, Index#index.key, Index#index.cookie},
{reply, {ok, {Index#index.key, Index#index.cookie}},
State#state{next_index=nil, next_key=State#state.next_key+1,
reset_pos=Pos1, write_pos=Pos1, writer=nil}};
Else ->
Expand Down
2 changes: 1 addition & 1 deletion src/monic_file_resource.erl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ add_item(ReqData, Context) ->
Size = list_to_integer(wrq:get_req_header("Content-Length", ReqData)),
StreamBody = wrq:stream_req_body(ReqData, ?BUFFER_SIZE),
case monic_file:add(Pid, Size, StreamBody) of
{ok, Key, Cookie} ->
{ok, {Key, Cookie}} ->
File = wrq:path_info(file, ReqData),
Location = io_lib:format("/~s/~B/~B",[File, Key, Cookie]),
ReqData1 = wrq:set_resp_header("Location", Location, ReqData),
Expand Down

0 comments on commit 09d9aa9

Please sign in to comment.