Support OnHttpRequest Lua callback
If your redbean `/.init.lua` file defines a global callable named `OnHttpRequest` then redbean will delegate all serving control to your function. You may then restore the default serving paths, by calling the new `Route()`, `RouteHost()`, and `RoutePath()` APIs. Closes #150
This commit is contained in:
@ -53,10 +53,8 @@ static int __fmt_stoa_bing(out_f out, void *a, uint64_t w) {
|
||||
|
||||
static int __fmt_stoa_quoted(out_f out, void *a, uint64_t w) {
|
||||
char buf[8];
|
||||
if (w <= 0x7F) {
|
||||
if (w < 0x20 || w == 0x7F) {
|
||||
w = cescapec(w);
|
||||
}
|
||||
if (isascii(w)) {
|
||||
w = cescapec(w);
|
||||
} else {
|
||||
w = tpenc(w);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user