local_handler: Return early when not static
This commit is contained in:
@ -155,7 +155,10 @@ static int local_handler(client_ctx_t *ctx) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (uri->is_static) {
|
||||
if (!uri->is_static) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
res->status = http_get_status(200);
|
||||
cache_init_uri(ctx->conf->cache, uri);
|
||||
|
||||
@ -243,9 +246,6 @@ static int local_handler(client_ctx_t *ctx) {
|
||||
|
||||
if (ctx->file == NULL) ctx->file = fopen(uri->filename, "rb");
|
||||
ctx->content_length = fsize(ctx->file);
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user