projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
074690a
)
uhttpd: do lua lookup first, otherwise fs resources might shadow the virtual url
author
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 20 Mar 2010 14:34:50 +0000
(14:34 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 20 Mar 2010 14:34:50 +0000
(14:34 +0000)
contrib/package/uhttpd/src/uhttpd.c
patch
|
blob
|
history
diff --git
a/contrib/package/uhttpd/src/uhttpd.c
b/contrib/package/uhttpd/src/uhttpd.c
index
f2972a0
..
ccbc9ef
100644
(file)
--- a/
contrib/package/uhttpd/src/uhttpd.c
+++ b/
contrib/package/uhttpd/src/uhttpd.c
@@
-668,6
+668,14
@@
int main (int argc, char **argv)
/* parse message header */
if( (req = uh_http_header_recv(cl)) != NULL )
{
/* parse message header */
if( (req = uh_http_header_recv(cl)) != NULL )
{
+#ifdef HAVE_LUA
+ /* Lua request? */
+ if( strstr(req->url, conf.lua_prefix) == req->url )
+ {
+ uh_lua_request(cl, req, L);
+ }
+ else
+#endif
/* dispatch request */
if( (pin = uh_path_lookup(cl, req->url)) != NULL )
{
/* dispatch request */
if( (pin = uh_path_lookup(cl, req->url)) != NULL )
{
@@
-682,13
+690,7
@@
int main (int argc, char **argv)
uh_file_request(cl, req, pin);
}
}
uh_file_request(cl, req, pin);
}
}
-#ifdef HAVE_LUA
- /* Lua request? */
- else if( strstr(req->url, conf.lua_prefix) == req->url )
- {
- uh_lua_request(cl, req, L);
- }
-#endif
+
/* 404 */
else
{
/* 404 */
else
{