Software /
code /
prosody
Comparison
util/httpstream.lua @ 3563:544d9d2e3046
util.httpstream: Fixed a nil variable access introduced in the last commit.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 05 Nov 2010 03:06:11 +0500 |
parent | 3562:98f9dca3eb94 |
child | 3564:90f4e6dc1c11 |
comparison
equal
deleted
inserted
replaced
3562:98f9dca3eb94 | 3563:544d9d2e3046 |
---|---|
34 local key, val = line:match("^([^%s:]+): *(.*)$"); | 34 local key, val = line:match("^([^%s:]+): *(.*)$"); |
35 if not key then coroutine.yield("invalid-header-line"); end -- TODO handle multi-line and invalid headers | 35 if not key then coroutine.yield("invalid-header-line"); end -- TODO handle multi-line and invalid headers |
36 key = key:lower(); | 36 key = key:lower(); |
37 headers[key] = headers[key] and headers[key]..","..val or val; | 37 headers[key] = headers[key] and headers[key]..","..val or val; |
38 end | 38 end |
39 return headers; | |
39 end | 40 end |
40 | 41 |
41 while true do | 42 while true do |
42 -- read status line | 43 -- read status line |
43 local status_line = readline(); | 44 local status_line = readline(); |