Browse Source

Use the most recent state on error in cowboy_rest

Loïc Hoguin 10 years ago
parent
commit
1f5b19a0b7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/cowboy_rest.erl

+ 1 - 1
src/cowboy_rest.erl

@@ -621,7 +621,7 @@ not_modified(Req, State) ->
 				{Req4, State3} ->
 					respond(Req4, State3, 304)
 			catch Class:Reason ->
-				error_terminate(Req, State, Class, Reason, expires)
+				error_terminate(Req, State2, Class, Reason, expires)
 			end
 	catch Class:Reason ->
 		error_terminate(Req, State, Class, Reason, generate_etag)