Comparison

net/http/parser.lua @ 4879:45bb378a4a98

net.http.parser: Keep the Host header no host is present in the URI
author Kim Alvefur <zash@zash.se>
date Tue, 15 May 2012 14:00:57 +0200
parent 4866:d54999db3aa1
child 4910:e5ec60dfb202
comparison
equal deleted inserted replaced
4878:80ab7c50608d 4879:45bb378a4a98
91 responseheaders = headers; 91 responseheaders = headers;
92 }; 92 };
93 else 93 else
94 local parsed_url = url_parse(path); 94 local parsed_url = url_parse(path);
95 path = preprocess_path(parsed_url.path); 95 path = preprocess_path(parsed_url.path);
96 headers.host = parsed_url.host; 96 headers.host = parsed_url.host or headers.host;
97 97
98 len = len or 0; 98 len = len or 0;
99 packet = { 99 packet = {
100 method = method; 100 method = method;
101 url = parsed_url; 101 url = parsed_url;