Software /
code /
prosody
Comparison
net/http/parser.lua @ 5222:61c47d26481d
net.http.parser: Fix syntax error introduced in c5edb08fc7cb.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 03 Dec 2012 10:01:06 +0500 |
parent | 5207:c5edb08fc7cb |
child | 5259:c85c348253bd |
comparison
equal
deleted
inserted
replaced
5220:98b71d519fff | 5222:61c47d26481d |
---|---|
3 local assert = assert; | 3 local assert = assert; |
4 local url_parse = require "socket.url".parse; | 4 local url_parse = require "socket.url".parse; |
5 local urldecode = require "net.http".urldecode; | 5 local urldecode = require "net.http".urldecode; |
6 | 6 |
7 local function preprocess_path(path) | 7 local function preprocess_path(path) |
8 path = urldecode((path:gsub("//+". "/"))); | 8 path = urldecode((path:gsub("//+", "/"))); |
9 if path:sub(1,1) ~= "/" then | 9 if path:sub(1,1) ~= "/" then |
10 path = "/"..path; | 10 path = "/"..path; |
11 end | 11 end |
12 local level = 0; | 12 local level = 0; |
13 for component in path:gmatch("([^/]+)/") do | 13 for component in path:gmatch("([^/]+)/") do |