Changeset

3920:215c0ec63816

util.httpstream: A little cleanup of the HTTP path.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 19 Dec 2010 20:27:13 +0500
parents 3900:e1f19f437ddd
children 3921:70dd7f6026bd
files util/httpstream.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/httpstream.lua	Sun Dec 19 02:57:58 2010 +0000
+++ b/util/httpstream.lua	Sun Dec 19 20:27:13 2010 +0500
@@ -46,7 +46,7 @@
 			local status_line = readline();
 			local method, path, httpversion = status_line:match("^(%S+)%s+(%S+)%s+HTTP/(%S+)$");
 			if not method then coroutine.yield("invalid-status-line"); end
-			-- TODO parse url
+			path = path:gsub("^//+", "/"); -- TODO parse url more
 			local headers = readheaders();
 			
 			-- read body