in reply to Re: A simple web server with HTTP::Daemon and threads
in thread A simple web server with HTTP::Daemon and threads
Leading slash might be a problem, might not. Three things could affect this (actually two and three ould be considered as one point):
In general, a path with a leading slash, when you use it directely without any mapping, the system understands it as absolute path starting from the root directory, which might not be what you want.
A good design practice is to have a mapping function, to map URL/URI to the actual storage location. This could largely ease your maintenance effort. In the future, if you move your stuffs around, this could be the single point that requires change. Or at least have a constant to specify the base path.
|
|---|