[mapguide-commits] r5928 - in branches/2.2/MgDev/Web/src:
ApacheAgent IsapiAgent
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Jun 14 09:02:54 EDT 2011
Author: jng
Date: 2011-06-14 06:02:53 -0700 (Tue, 14 Jun 2011)
New Revision: 5928
Modified:
branches/2.2/MgDev/Web/src/ApacheAgent/ApacheAgent.cpp
branches/2.2/MgDev/Web/src/IsapiAgent/IsapiAgent.cpp
Log:
Backport r5071 to the 2.2 branch
Modified: branches/2.2/MgDev/Web/src/ApacheAgent/ApacheAgent.cpp
===================================================================
--- branches/2.2/MgDev/Web/src/ApacheAgent/ApacheAgent.cpp 2011-06-13 09:22:50 UTC (rev 5927)
+++ branches/2.2/MgDev/Web/src/ApacheAgent/ApacheAgent.cpp 2011-06-14 13:02:53 UTC (rev 5928)
@@ -112,7 +112,10 @@
}
Initialize(r);
+ ApacheResponseHandler responseHandler(r);
+ MG_TRY()
+
// Construct self Url. It is embedded into the output stream
// of some requests (like GetMap). Use a fully qualified URL.
string serverName = GetServerVariable(r, MapAgentStrings::ServerName);
@@ -202,8 +205,6 @@
Ptr<MgPropertyCollection> paramList = params->GetParameters()->GetPropertyCollection();
if (paramList != NULL)
{
- ApacheResponseHandler responseHandler(r);
-
// Check to be sure that we have some kind of credentials before continuing. Either
// username/password or sessionid.
bool bValid = paramList->Contains(MgHttpResourceStrings::reqSession);
@@ -233,6 +234,12 @@
responseHandler.SendResponse(response);
}
+ MG_CATCH(L"ApacheAgent.mgmapagent_handler");
+ if (mgException != NULL)
+ {
+ responseHandler.SendError(mgException);
+ }
+
return OK;
}
Modified: branches/2.2/MgDev/Web/src/IsapiAgent/IsapiAgent.cpp
===================================================================
--- branches/2.2/MgDev/Web/src/IsapiAgent/IsapiAgent.cpp 2011-06-13 09:22:50 UTC (rev 5927)
+++ branches/2.2/MgDev/Web/src/IsapiAgent/IsapiAgent.cpp 2011-06-14 13:02:53 UTC (rev 5928)
@@ -50,6 +50,10 @@
DWORD WINAPI HttpExtensionProc(EXTENSION_CONTROL_BLOCK *pECB)
{
+ IsapiResponseHandler responseHandler(pECB);
+
+ MG_TRY()
+
Initialize(pECB);
// Construct self Url. It is embedded into the output stream
@@ -169,8 +173,6 @@
Ptr<MgPropertyCollection> paramList = params->GetParameters()->GetPropertyCollection();
if (paramList != NULL)
{
- IsapiResponseHandler responseHandler(pECB);
-
// Check to be sure that we have some kind of credentials before continuing. Either
// username/password or sessionid.
bool bValid = paramList->Contains(MgHttpResourceStrings::reqSession);
@@ -206,6 +208,13 @@
responseHandler.SendResponse(response);
}
+ MG_CATCH(L"IsapiAgent.HttpExtensionProc");
+
+ if (mgException != NULL)
+ {
+ responseHandler.SendError(mgException);
+ }
+
return HSE_STATUS_SUCCESS;
}
More information about the mapguide-commits
mailing list