Permalink
Browse files

Fix for mochiweb 2.4.1

  • Loading branch information...
choptastic committed Jan 31, 2013
1 parent fa08340 commit ce98375ff386f0bd7701d8326a1eb3fa781a19a3
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/mochiweb_bridge_modules/mochiweb_request_bridge.erl
@@ -20,7 +20,10 @@
%% {Req, DocRoot} is deprecated
%% Maintained for backwards compatibility.
-init({Req, _DocRoot}) ->
+%% In Mochiweb 2.4.1, Req is a two-tuple, and this was parsing out just the
+%% first element of the tuple. This ensures that only if it's an old-style
+%% {req, docroot} tuple will this clause match.
+init({Req, _DocRoot}) when Req =/= mochiweb_request ->
init(Req);
init(Req) ->
Req.

0 comments on commit ce98375

Please sign in to comment.