projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2132811
)
libs/http: don't calculate etag twice in If-None-Match, fix typos in inline-doc
author
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 20 Dec 2009 18:35:05 +0000
(18:35 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 20 Dec 2009 18:35:05 +0000
(18:35 +0000)
libs/http/luasrc/http/protocol/conditionals.lua
patch
|
blob
|
history
diff --git
a/libs/http/luasrc/http/protocol/conditionals.lua
b/libs/http/luasrc/http/protocol/conditionals.lua
index
635d6b2
..
75e1f7b
100644
(file)
--- a/
libs/http/luasrc/http/protocol/conditionals.lua
+++ b/
libs/http/luasrc/http/protocol/conditionals.lua
@@
-35,7
+35,7
@@
end
-- compare it against the given stat object.
-- @param req HTTP request message object
-- @param stat A file.stat object
-- compare it against the given stat object.
-- @param req HTTP request message object
-- @param stat A file.stat object
--- @return Boolean indicating whe
a
ther the precondition is ok
+-- @return Boolean indicating whether the precondition is ok
-- @return Alternative status code if the precondition failed
function if_match( req, stat )
local h = req.headers
-- @return Alternative status code if the precondition failed
function if_match( req, stat )
local h = req.headers
@@
-60,7
+60,7
@@
end
-- and compare it against the given stat object.
-- @param req HTTP request message object
-- @param stat A file.stat object
-- and compare it against the given stat object.
-- @param req HTTP request message object
-- @param stat A file.stat object
--- @return Boolean indicating whe
a
ther the precondition is ok
+-- @return Boolean indicating whether the precondition is ok
-- @return Alternative status code if the precondition failed
-- @return Table containing extra HTTP headers if the precondition failed
function if_modified_since( req, stat )
-- @return Alternative status code if the precondition failed
-- @return Table containing extra HTTP headers if the precondition failed
function if_modified_since( req, stat )
@@
-89,7
+89,7
@@
end
-- compare it against the given stat object.
-- @param req HTTP request message object
-- @param stat A file.stat object
-- compare it against the given stat object.
-- @param req HTTP request message object
-- @param stat A file.stat object
--- @return Boolean indicating whe
a
ther the precondition is ok
+-- @return Boolean indicating whether the precondition is ok
-- @return Alternative status code if the precondition failed
-- @return Table containing extra HTTP headers if the precondition failed
function if_none_match( req, stat )
-- @return Alternative status code if the precondition failed
-- @return Table containing extra HTTP headers if the precondition failed
function if_none_match( req, stat )
@@
-103,7
+103,7
@@
function if_none_match( req, stat )
if ( ent == '*' or ent == etag ) and stat ~= nil then
if method == "GET" or method == "HEAD" then
return false, 304, {
if ( ent == '*' or ent == etag ) and stat ~= nil then
if method == "GET" or method == "HEAD" then
return false, 304, {
- ["ETag"] =
mk_etag( stat )
;
+ ["ETag"] =
etag
;
["Date"] = date.to_http( os.time() );
["Last-Modified"] = date.to_http( stat.mtime )
}
["Date"] = date.to_http( os.time() );
["Last-Modified"] = date.to_http( stat.mtime )
}
@@
-123,7
+123,7
@@
end
-- false, 412 to indicate a failed precondition.
-- @param req HTTP request message object
-- @param stat A file.stat object
-- false, 412 to indicate a failed precondition.
-- @param req HTTP request message object
-- @param stat A file.stat object
--- @return Boolean indicating whe
a
ther the precondition is ok
+-- @return Boolean indicating whether the precondition is ok
-- @return Alternative status code if the precondition failed
function if_range( req, stat )
-- Sorry, no subranges (yet)
-- @return Alternative status code if the precondition failed
function if_range( req, stat )
-- Sorry, no subranges (yet)
@@
-135,7
+135,7
@@
end
-- header and compare it against the given stat object.
-- @param req HTTP request message object
-- @param stat A file.stat object
-- header and compare it against the given stat object.
-- @param req HTTP request message object
-- @param stat A file.stat object
--- @return Boolean indicating whe
a
ther the precondition is ok
+-- @return Boolean indicating whether the precondition is ok
-- @return Alternative status code if the precondition failed
function if_unmodified_since( req, stat )
local h = req.headers
-- @return Alternative status code if the precondition failed
function if_unmodified_since( req, stat )
local h = req.headers