equal
deleted
inserted
replaced
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> |