From 3a4fad07cb5097598eefd0cd7f588c5881a61c8f Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Sat, 21 Nov 2009 17:01:50 +0000 Subject: upgrade mochiweb to r113, use hooks instead of forking mochijson2. COUCHDB-474 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@882941 13f79535-47bb-0310-9956-ffa450edef68 --- src/mochiweb/mochiweb_util.erl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/mochiweb/mochiweb_util.erl') diff --git a/src/mochiweb/mochiweb_util.erl b/src/mochiweb/mochiweb_util.erl index 7bf18d15..73cacea4 100644 --- a/src/mochiweb/mochiweb_util.erl +++ b/src/mochiweb/mochiweb_util.erl @@ -78,7 +78,7 @@ safe_relative_path("", Acc) -> [] -> ""; _ -> - join(lists:reverse(Acc), "/") + string:join(lists:reverse(Acc), "/") end; safe_relative_path(P, Acc) -> case partition(P, "/") of @@ -423,9 +423,7 @@ record_to_proplist(Record, Fields) -> %% Fields should be obtained by calling record_info(fields, record_type) %% where record_type is the record type of Record record_to_proplist(Record, Fields, TypeKey) - when is_tuple(Record), - is_list(Fields), - size(Record) - 1 =:= length(Fields) -> + when tuple_size(Record) - 1 =:= length(Fields) -> lists:zip([TypeKey | Fields], tuple_to_list(Record)). -- cgit v1.2.3