Software /
code /
prosody
Changeset
5323:4c30f638ff55
net.http.parser: Ensure full URL in status line contains a path.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 08 Feb 2013 00:27:59 +0500 |
parents | 5322:8d525f58f916 |
children | 5324:8602fffdd1df |
files | net/http/parser.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/http/parser.lua Fri Feb 08 00:18:40 2013 +0500 +++ b/net/http/parser.lua Fri Feb 08 00:27:59 2013 +0500 @@ -99,7 +99,7 @@ parsed_url = { path = _path, query = _query }; else parsed_url = url_parse(path); - if not parsed_url then error = true; return error_cb("invalid-url"); end + if not(parsed_url and parsed_url.path) then error = true; return error_cb("invalid-url"); end end path = preprocess_path(parsed_url.path); headers.host = parsed_url.host or headers.host;