mod_storage_*: Don't explicitly set driver name, to ease copying/renaming modules.
[prosody.git] / util / httpstream.lua
index 4b5060a1a6835e1303a463af5d2a9d0d8474c636..190b3ed657a5fc37ee36f1f59779a295b3d545bd 100644 (file)
@@ -46,7 +46,7 @@ local function parser(success_cb, parser_type, options_cb)
                        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
@@ -104,8 +104,8 @@ local function parser(success_cb, parser_type, options_cb)
                        
                        success_cb({
                                code = status_code;
-                               responseversion = httpversion;
-                               responseheaders = headers;
+                               httpversion = httpversion;
+                               headers = headers;
                                body = body;
                        });
                end