lighttpd 1.4.15 $HTTP[“url”] condition is broken
This has been happening on my blog for a long time, but it didn’t draw my attention until someone bugged me about a download link on my server yesterday. It is an $HTTP[“url”] conditional dir-listing.activate statement , however it returned 404 instead of listing the directory content.
After a short investigation, I found that in configfile-glue.c
307: case COMP_HTTP_URL:
308: l = con->uri.path;
309: break;
con->uri.path is always an empty string, thus $HTTP[“url”] condition is always false.
I’m not familiar with lighttpd architecture, therefore I simply changed uri.path to uri.path_raw and everything seemed to be fine. According to lighttpd trac, the uri.path statement has been there since 1.3.x, so there must be a logic change in lighttpd core code, resulting an empty uri.path at that time. I’m curious why such a serious bug has not been reported since it was introduced. Are people all busy playing with lighttpd 1.5.0?
admire 英文 blog
maybe 1.5.0 pre-release works
lol
I have tried 1.5.0, but it seems to have dropped support to launch fastcgi server process. I have to use spawn-fcgi program to start it. I don’t like that, so I turned back to 1.4.x.
Wow! I was thinking about switching to lighty+fastcgi on my web server. After reading your post, I think I’d better stick to Apache since I don’t like something without support.