[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[myserver-commit] [2877] Fixed problem with `PATH_INFO' and `PATH_TRANSL
From: |
Giuseppe Scrivano |
Subject: |
[myserver-commit] [2877] Fixed problem with `PATH_INFO' and `PATH_TRANSLATED' environment variables. |
Date: |
Fri, 10 Oct 2008 17:53:03 +0000 |
Revision: 2877
http://svn.sv.gnu.org/viewvc/?view=rev&root=myserver&revision=2877
Author: gscrivano
Date: 2008-10-10 17:53:02 +0000 (Fri, 10 Oct 2008)
Log Message:
-----------
Fixed problem with `PATH_INFO' and `PATH_TRANSLATED' environment variables.
Modified Paths:
--------------
trunk/myserver/src/protocol/http/http.cpp
Modified: trunk/myserver/src/protocol/http/http.cpp
===================================================================
--- trunk/myserver/src/protocol/http/http.cpp 2008-10-09 21:24:47 UTC (rev
2876)
+++ trunk/myserver/src/protocol/http/http.cpp 2008-10-10 17:53:02 UTC (rev
2877)
@@ -344,6 +344,8 @@
*\param filename Resource to access.
*\param yetmapped Is the resource mapped to the localfilesystem?
*\param permissions Permission mask for this resource.
+ *\return Return 200 on success.
+ *\return Any other value is the HTTP error code.
*/
int Http::getFilePermissions(string& filename, string& directory, string&
file,
string &filenamePath, int yetmapped, int*
permissions)
@@ -510,6 +512,8 @@
*\param filename Resource to access.
*\param yetmapped Is the resource mapped to the localfilesystem?
*\param permissions Permission mask for this resource.
+ *\return Return 200 on success.
+ *\return Any other value is the HTTP error code.
*/
int Http::preprocessHttpRequest(string& filename, int yetmapped, int*
permissions)
{
@@ -517,6 +521,7 @@
string file;
int filenamePathLen;
string dirscan;
+ int ret;
try
{
@@ -525,6 +530,13 @@
td->response.connection.assign( "keep-alive");
}
+
+ ret = getFilePermissions (filename, directory, file,
+ td->filenamePath, yetmapped, permissions);
+
+ if (ret != 200)
+ return ret;
+
/*!
*Get the PATH_INFO value.
*Use dirscan as a buffer for put temporary directory scan.
@@ -591,9 +603,6 @@
td->pathTranslated.assign("");
}
FilesUtility::completePath(td->filenamePath);
-
- return getFilePermissions(filename, directory, file,
- td->filenamePath, yetmapped, permissions);
}
catch(...)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [myserver-commit] [2877] Fixed problem with `PATH_INFO' and `PATH_TRANSLATED' environment variables.,
Giuseppe Scrivano <=