Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demo/rebar.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%%-*- mode: erlang -*-

{deps, [
{webmachine, "1.10.*", {git, "git://github.com/basho/webmachine", "HEAD"}},
{erlydtl, ".*", {git, "git://github.com/evanmiller/erlydtl", "HEAD"}}
{webmachine, "1.10.*", {git, "https://github.com/basho/webmachine", "HEAD"}},
{erlydtl, ".*", {git, "https://github.com/evanmiller/erlydtl", "HEAD"}}
]}.
2 changes: 1 addition & 1 deletion priv/templates/rebar.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
%%-*- mode: erlang -*-

{deps, [{webmachine, "1.10.*", {git, "git://github.com/basho/webmachine", "HEAD"}}]}.
{deps, [{webmachine, "1.10.*", {git, "https://github.com/basho/webmachine", "HEAD"}}]}.
6 changes: 3 additions & 3 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
{xref_checks, [undefined_function_calls]}.

{deps,
[{mochiweb, "2.9.0", {git, "git://github.com/basho/mochiweb.git", {tag, "v2.9.0p1"}}}
[{mochiweb, "2.9.0.*", {git, "https://github.com/basho/mochiweb.git", {tag, "v2.9.0p2"}}}
]}.

{dev_only_deps,
[{meck, "0.8.*", {git, "git://github.com/basho/meck.git", {tag, "0.8.2"}}},
{ibrowse, "4.0.2", {git, "git://github.com/cmullaparthi/ibrowse.git", {tag, "v4.0.2"}}}
[{meck, "0.8.*", {git, "https://github.com/basho/meck.git", {tag, "0.8.2"}}},
{ibrowse, "4.*", {git, "https://github.com/basho/ibrowse.git", {tag, "v4.3"}}}
]}.
2 changes: 1 addition & 1 deletion rebar.config.script
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ft=erlang ts=4 sw=4 et
OtpVersion = erlang:system_info(otp_release),
Config1 = case hd(OtpVersion) =:= $R andalso OtpVersion =< "R15B01" of
Config1 = case hd(OtpVersion) =:= $R andalso OtpVersion < "R15B02" of
true ->
HashDefine = [{d,old_hash}],
case lists:keysearch(erl_opts, 1, CONFIG) of
Expand Down
6 changes: 5 additions & 1 deletion src/webmachine_multipart.erl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ find_boundary(ReqData) ->

% @doc Turn a multipart form into component parts.
% @spec get_all_parts(incoming_req_body(), boundary()) -> [fpart()]
get_all_parts(Body, Boundary) when is_list(Body), is_list(Boundary) ->
get_all_parts(list_to_binary(Body), Boundary);
get_all_parts(Body, Boundary) when is_binary(Body), is_list(Boundary) ->
StreamStruct = send_streamed_body(Body,1024),
getparts1(stream_parts(StreamStruct, Boundary), []).
Expand All @@ -71,6 +73,8 @@ stream_form({Hunk, Next}, Boundary, []) ->
stream_form(get_more_data(Next), Boundary, re:split(Hunk, Boundary,[]));
stream_form({Hunk, Next}, Boundary, [<<>>|DQ]) ->
stream_form({Hunk, Next}, Boundary, DQ);
stream_form({Hunk, Next}, Boundary, [<<"\r\n">>|DQ]) ->
stream_form({Hunk, Next}, Boundary, DQ);
stream_form({Hunk, Next}, Boundary, [H|[T1|T2]]) ->
{make_part(H), fun() ->
stream_form({Hunk, Next}, Boundary, [T1|T2]) end};
Expand All @@ -94,7 +98,7 @@ stream_parts([H|T]) -> {make_part(H), fun() -> stream_parts(T) end}.

get_more_data(done) -> {<<"--\n">>, really_done};
get_more_data(Fun) -> Fun().

make_part(PartData) ->
%% Remove the trailing \r\n
[HeadData, BodyWithCRLF] = re:split(PartData, "\\r\\n\\r\\n", [{parts,2}]),
Expand Down