aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/sessionmanager.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index 5c40f756..264c296b 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -181,7 +181,12 @@ end
function streamopened(session, attr)
local send = session.send;
- session.host = attr.to or error("Client failed to specify destination hostname");
+ session.host = attr.to;
+ if not session.host then
+ session:close{ condition = "improper-addressing",
+ text = "A 'to' attribute is required on stream headers" };
+ return;
+ end
session.host = nameprep(session.host);
session.version = tonumber(attr.version) or 0;
session.streamid = uuid_generate();