Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Read the auth cookie in linear time
Splitting the header with patterns that backtrack over spaces cost a quarter of a second per request at the 8 KB line most web servers allow, and a second at 16 KB, without any login. auth-file's trim had the same shape and now reads the cookie as well.
-rw-r--r--custom/extensions/auth-file.lua30
-rw-r--r--custom/extensions/auth-inline.lua26
-rw-r--r--tests/extensions/test-auth.lua10
3 files changed, 52 insertions, 14 deletions