Software /
code /
prosody
Comparison
plugins/mod_websocket.lua @ 7923:81f3068fc30c
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 01 Mar 2017 02:38:05 +0100 |
parent | 7914:a6eb3b6bf903 |
child | 7937:5b03a8003659 |
comparison
equal
deleted
inserted
replaced
7910:91db637be237 | 7923:81f3068fc30c |
---|---|
133 return data; | 133 return data; |
134 end | 134 end |
135 function handle_request(event) | 135 function handle_request(event) |
136 local request, response = event.request, event.response; | 136 local request, response = event.request, event.response; |
137 local conn = response.conn; | 137 local conn = response.conn; |
138 | |
139 conn.starttls = false; -- Prevent mod_tls from believing starttls can be done | |
138 | 140 |
139 if not request.headers.sec_websocket_key then | 141 if not request.headers.sec_websocket_key then |
140 response.headers.content_type = "text/html"; | 142 response.headers.content_type = "text/html"; |
141 return [[<!DOCTYPE html><html><head><title>Websocket</title></head><body> | 143 return [[<!DOCTYPE html><html><head><title>Websocket</title></head><body> |
142 <p>It works! Now point your WebSocket client to this URL to connect to Prosody.</p> | 144 <p>It works! Now point your WebSocket client to this URL to connect to Prosody.</p> |