aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Nehab <diego.nehab@gmail.com>2013-09-09 09:54:08 -0700
committerDiego Nehab <diego.nehab@gmail.com>2013-09-09 09:54:08 -0700
commit244e5d34a0bd77a42efbd6a9ecafeff0aec4539e (patch)
tree7371fbb164839db33c2dac43087db9542b3c2322
parentc715993fb8b4d1e79c437ad499cdfd403fb57a64 (diff)
parent87d72dce4e76807b28b7c90e93d4b1645ea0af46 (diff)
downloadluasocket-244e5d34a0bd77a42efbd6a9ecafeff0aec4539e.tar.gz
luasocket-244e5d34a0bd77a42efbd6a9ecafeff0aec4539e.tar.bz2
luasocket-244e5d34a0bd77a42efbd6a9ecafeff0aec4539e.zip
Merge pull request #74 from catwell/pull-hostport
Include port in default Host header
-rw-r--r--src/http.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/http.lua b/src/http.lua
index f83dcc5..1d0eb50 100644
--- a/src/http.lua
+++ b/src/http.lua
@@ -209,9 +209,11 @@ end
209 209
210local function adjustheaders(reqt) 210local function adjustheaders(reqt)
211 -- default headers 211 -- default headers
212 local host = reqt.host
213 if reqt.port then host = host .. ":" .. reqt.port end
212 local lower = { 214 local lower = {
213 ["user-agent"] = _M.USERAGENT, 215 ["user-agent"] = _M.USERAGENT,
214 ["host"] = reqt.host, 216 ["host"] = host,
215 ["connection"] = "close, TE", 217 ["connection"] = "close, TE",
216 ["te"] = "trailers" 218 ["te"] = "trailers"
217 } 219 }