# HG changeset patch # User Waqas Hussain # Date 1288996865 -18000 # Node ID 51d5578965a535af4accfdf56a62c1b6f06fa9ce # Parent 94828fb2dab8aa43d66dcfcb2dce7e89cda5a4de util.httpstream: Fixed a possible string to number comparison error. diff -r 94828fb2dab8 -r 51d5578965a5 util/httpstream.lua --- a/util/httpstream.lua Sat Nov 06 01:58:46 2010 +0500 +++ b/util/httpstream.lua Sat Nov 06 03:41:05 2010 +0500 @@ -67,7 +67,8 @@ -- 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