diff options
author | Kim Alvefur <zash@zash.se> | 2018-09-21 22:14:40 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-09-21 22:14:40 +0200 |
commit | 853b4c3a2c21943e21b42f09056c0134dac2c61d (patch) | |
tree | 4a0a03ae857fc3a35b08e359714cb405ec8af405 /net | |
parent | aa34271523fce1875037d19d7c5400876991d347 (diff) | |
download | prosody-853b4c3a2c21943e21b42f09056c0134dac2c61d.tar.gz prosody-853b4c3a2c21943e21b42f09056c0134dac2c61d.zip |
Revert 2dc7490899ae::5d6b252bc36f: Unfinished and broken
Diffstat (limited to 'net')
-rw-r--r-- | net/http/server.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/http/server.lua b/net/http/server.lua index 2d9eed21..877c7f17 100644 --- a/net/http/server.lua +++ b/net/http/server.lua @@ -219,7 +219,7 @@ function handle_request(conn, request, finish_cb) err_code, err = 400, "Invalid path"; elseif not hosts[host] then if hosts[default_host] then - request.host = default_host; + host = default_host; elseif host then err_code, err = 404, "Unknown host: "..host; else @@ -233,7 +233,7 @@ function handle_request(conn, request, finish_cb) return; end - local event = request.method.." "..request.path:match("[^?]*"); + local event = request.method.." "..host..request.path:match("[^?]*"); local payload = { request = request, response = response }; log("debug", "Firing event: %s", event); local result = events.fire_event(event, payload); |