Up to now the root of the webserver filesystem was always the current directory. Now an optional file 'wwwroot.cfg' is read. If present its content is used as prefix in the conversion of http paths to local paths. This prefix may be a relative path as well as an absolute path.

This is especially useful for the cc65-based targets as it ain't possible there to "just change into the wwwroot directory and start the webserver using its pathname".
This commit is contained in:
oliverschmidt 2010-08-30 19:44:38 +00:00
parent f02cdc7c8f
commit a5dff5e08a
4 changed files with 29 additions and 7 deletions

View file

@ -30,7 +30,7 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: httpd-cfs.c,v 1.22 2010/04/11 20:54:39 oliverschmidt Exp $
* $Id: httpd-cfs.c,v 1.23 2010/08/30 19:44:38 oliverschmidt Exp $
*/
#include <stdio.h>
@ -273,5 +273,8 @@ httpd_init(void)
{
tcp_listen(HTONS(80));
memb_init(&conns);
#if URLCONV
urlconv_init();
#endif /* URLCONV */
}
/*---------------------------------------------------------------------------*/