diff options
author | Unbit <info@unbit.it> | 2013-02-28 12:14:59 +0100 |
---|---|---|
committer | Unbit <info@unbit.it> | 2013-02-28 12:14:59 +0100 |
commit | 38b1f52723a01de4f2120f898998c9e6805e11fc (patch) | |
tree | d8320de93434d8121106233aaf373452768908b7 /core/static.c | |
parent | 30e50df5d443cb382f34e83c4d994cbb4521dd8c (diff) | |
download | uwsgi-38b1f52723a01de4f2120f898998c9e6805e11fc.tar.gz |
fixed static-index and apply_fast routes
Diffstat (limited to 'core/static.c')
-rw-r--r-- | core/static.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/static.c b/core/static.c index dec5d7e0..5d318061 100644 --- a/core/static.c +++ b/core/static.c @@ -416,7 +416,7 @@ int uwsgi_static_stat(char *filename, size_t *filename_len, struct stat *st) { return 0; } // reset to original name - filename[ret] = 0; + filename[*filename_len] = 0; } usl = usl->next; } @@ -587,7 +587,7 @@ safe: if (real_filename_len >= sse->len) { if (!uwsgi_strncmp(real_filename + (real_filename_len - sse->len), sse->len, sse->value, sse->len)) { #ifdef UWSGI_ROUTING - if (uwsgi_apply_routes_fast(wsgi_req) == UWSGI_ROUTE_BREAK) + if (uwsgi_apply_routes_fast(wsgi_req, real_filename, real_filename_len) == UWSGI_ROUTE_BREAK) return 0; #endif return -1; |