Software /
code /
prosody
Comparison
net/http/server.lua @ 10952:05d218aae3d1
Merge 0.11->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 23 Jun 2020 17:59:24 +0200 |
parent | 10719:977c9883f625 |
parent | 10951:f4215f8baa5d |
child | 11096:dd1713862c20 |
comparison
equal
deleted
inserted
replaced
10949:8b5b35baf370 | 10952:05d218aae3d1 |
---|---|
252 done = _M.finish_response; | 252 done = _M.finish_response; |
253 finish_cb = finish_cb; | 253 finish_cb = finish_cb; |
254 }; | 254 }; |
255 conn._http_open_response = response; | 255 conn._http_open_response = response; |
256 | 256 |
257 local host = (request.headers.host or ""):match("[^:]+"); | 257 local host = request.headers.host; |
258 if host then host = host:gsub(":%d+$",""); end | |
258 | 259 |
259 -- Some sanity checking | 260 -- Some sanity checking |
260 local err_code, err; | 261 local err_code, err; |
261 if not request.path then | 262 if not request.path then |
262 err_code, err = 400, "Invalid path"; | 263 err_code, err = 400, "Invalid path"; |