mod_bosh: Return if a response has been sent already (See #343)
authorKim Alvefur <zash@zash.se>
Tue, 19 Apr 2016 10:14:07 +0000 (12:14 +0200)
committerKim Alvefur <zash@zash.se>
Tue, 19 Apr 2016 10:14:07 +0000 (12:14 +0200)
plugins/mod_bosh.lua

index 99451754b621b58e59b464d0c1a2b2d965b45cdd..ce51ccc576b9cd96f2ad0b0961f7ebbf7c1cc429 100644 (file)
@@ -179,6 +179,8 @@ function handle_POST(event)
                else
                        return true; -- Inform http server we shall reply later
                end
+       elseif response.finished then
+               return; -- A response has been sent already
        end
        module:log("warn", "Unable to associate request with a session (incomplete request?)");
        return 400;