diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-11-06 03:41:05 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-11-06 03:41:05 +0500 |
commit | f4334cfa053acac57e98a50341e894d613c35a9a (patch) | |
tree | e25f15ab216261b2023e637c20693330bb65a28e /util/httpstream.lua | |
parent | 1bc9eb48694eda80d23beeeb5e197120a21e6fa5 (diff) | |
download | prosody-f4334cfa053acac57e98a50341e894d613c35a9a.tar.gz prosody-f4334cfa053acac57e98a50341e894d613c35a9a.zip |
util.httpstream: Fixed a possible string to number comparison error.
Diffstat (limited to 'util/httpstream.lua')
-rw-r--r-- | util/httpstream.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/httpstream.lua b/util/httpstream.lua index 1aad0d91..b5677128 100644 --- a/util/httpstream.lua +++ b/util/httpstream.lua @@ -67,7 +67,8 @@ local function parser(success_cb, parser_type, options_cb) -- read status line local status_line = readline(); local httpversion, status_code, reason_phrase = status_line:match("^HTTP/(%S+)%s+(%d%d%d)%s+(.*)$"); - if not httpversion then coroutine.yield("invalid-status-line"); end + status_code = tonumber(status_code); + if not status_code then coroutine.yield("invalid-status-line"); end local headers = readheaders(); -- read body |