keplerproject / wsapi

WSAPI is an API that abstracts the web server from Lua web applications.
http://keplerproject.github.io/wsapi
74 stars 33 forks source link

Cookie name with 'special symbols' #35

Open nordicdyno opened 10 years ago

nordicdyno commented 10 years ago

Cookie names not escaped in search pattern. Now this is user's side work. It would be much better and more natural to esape names like it done in this code (function escape_lua_pattern): https://github.com/lua-nucleo/lua-nucleo/blob/master/lua-nucleo/string.lua#L247

Otherwise it's easy make mistakes in code like that:

val = r.cookies["some-session-id"]

P.S. Also there is no method in API to fetch all cookies. I think it would be useful.