tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r701044 - in /tomcat/connectors/trunk/jk/native/iis: Makefile.x86 jk_isapi_plugin.c
Date Thu, 02 Oct 2008 09:01:33 GMT
Author: mturk
Date: Thu Oct  2 02:01:32 2008
New Revision: 701044

URL: http://svn.apache.org/viewvc?rev=701044&view=rev
Log:
Allow error_page redirect to include error code format. Eg. /foo/error%d.htm will be handled
as /foo/error404.html for returned 404 status from Tomcat

Modified:
    tomcat/connectors/trunk/jk/native/iis/Makefile.x86
    tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

Modified: tomcat/connectors/trunk/jk/native/iis/Makefile.x86
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/Makefile.x86?rev=701044&r1=701043&r2=701044&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/iis/Makefile.x86 (original)
+++ tomcat/connectors/trunk/jk/native/iis/Makefile.x86 Thu Oct  2 02:01:32 2008
@@ -111,7 +111,7 @@
   $(LINK32_FLAGS) $(LINK32_OBJS)
 <<
 
-CPP_PROJ=/nologo /MD /W3 /Zi /O2 /I "..\common" /I "pcre" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32"
/D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "JK_ISAPI" /D "ISAPI_EXPORTS" /D "HAS_PCRE" /D "PCRE_STATIC"
/Fo"$(INTDIR)\\" /Fd"$(INTDIR)\isapi_redirector_src" /FD /c 
+CPP_PROJ=/nologo /MD /W3 /Zi /O2 /I "..\common" /I "pcre" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32"
$(CFLAGS) /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "JK_ISAPI" /D "ISAPI_EXPORTS" /D "HAS_PCRE"
/D "PCRE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\isapi_redirector_src" /FD /c 
 
 .c{$(INTDIR)}.obj::
    $(CPP) @<<

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?rev=701044&r1=701043&r2=701044&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Thu Oct  2 02:01:32 2008
@@ -1878,16 +1878,21 @@
                         }
                         /** Try to redirect the client to a page explaining the ISAPI redirector
is down */
                         if (error_page) {
-                            int len_of_error_page = (int)strlen(error_page);
+                            char error_page_url[INTERNET_MAX_URL_LENGTH] = "";
+                            int len_of_error_page;
+                            StringCbPrintf(error_page_url, INTERNET_MAX_URL_LENGTH,
+                                           error_page, is_error);                       
    
+                            len_of_error_page = (int)strlen(error_page_url);
                             if (!lpEcb->ServerSupportFunction(lpEcb->ConnID,
                                                               HSE_REQ_SEND_URL_REDIRECT_RESP,
-                                                              error_page,
+                                                              error_page_url,
                                                               (LPDWORD)&len_of_error_page,
                                                               (LPDWORD)NULL)) {
                                 jk_log(logger, JK_LOG_ERROR,
-                                       "HttpExtensionProc error, Error page redirect failed
with %d (0x%08x)",
-                                       GetLastError(), GetLastError());
+                                       "HttpExtensionProc error, Error page '%s' redirect
failed with %d (0x%08x)",
+                                       error_page_url, GetLastError(), GetLastError());
                                 lpEcb->dwHttpStatusCode = is_error;
+                                write_error_message(lpEcb, is_error);
                             }
                         }
                         else {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message