net.http.parser: Convert status_code to a number before trying to compare it to numbers
--- a/net/http/parser.lua Thu Apr 11 17:39:10 2013 +0100
+++ b/net/http/parser.lua Thu Apr 11 19:58:53 2013 +0100
@@ -65,6 +65,7 @@
first_line = line;
if client then
httpversion, status_code, reason_phrase = line:match("^HTTP/(1%.[01]) (%d%d%d) (.*)$");
+ status_code = tonumber(status_code);
if not status_code then error = true; return error_cb("invalid-status-line"); end
have_body = not
( (options_cb and options_cb().method == "HEAD")