Просмотр исходного кода

Fix the process_post/2 function in cowboy_http_rest

Loïc Hoguin 13 лет назад
Родитель
Сommit
168405830d
1 измененных файлов с 3 добавлено и 4 удалено
  1. 3 4
      src/cowboy_http_rest.erl

+ 3 - 4
src/cowboy_http_rest.erl

@@ -623,12 +623,11 @@ create_path(Req, State) ->
 			put_resource(Req3, State2, 303)
 	end.
 
-%% @todo process_post/2 isn't fully implemented yet.
 process_post(Req, State) ->
 	case call(Req, State, process_post) of
-		{ok, _Req2, HandlerState} ->
-			_ = _State2 = State#state{handler_state=HandlerState},
-			todo %% @todo ???
+		{ok, Req2, HandlerState} ->
+			State2 = State#state{handler_state=HandlerState},
+			next(Req2, State2, 201)
 	end.
 
 is_conflict(Req, State) ->