Feature #2141
closedMagnet enhancement
Description
lighttpd uses a very simple hash algorithm to create etags. I ported the function "hashme" to lua to be able to create etags also from lua.
Another feature is the lighty variable lighty.env["request.time"] to get the cached time without a syscall.
Files
Updated by gstrauss about 9 years ago
The hashme implementation is incorrect. To correct it, please use (unsigned char *)
const unsigned char *s = (unsigned char *)luaL_checkstring(L, 1);
Updated by gstrauss over 8 years ago
- Priority changed from Normal to Low
- Target version deleted (
1.5.0)
Updated by gstrauss over 8 years ago
- Status changed from New to Missing Feedback
The functionality of the patch could be done in lua code. Why is there a measurable benefit after taking into account the cost of marshalling across language boundaries?
Updated by gstrauss about 1 year ago
- Status changed from Missing Feedback to Fixed
- ASK QUESTIONS IN Forums set to No
lighty.c.time()
was added to mod_magnet in lighttpd 1.4.60
While lighttpd mod_magnet could expose dekhash or djbhash in lua, that could also be managed as a separate lua module and loaded into your lua script.
If there is a burning need for lighttpd to provide this for you, besides a small bit of convenience, please provide more details.
Also available in: Atom