Mantis - Resin
Viewing Issue Advanced Details
5847 minor always 01-20-15 11:29 04-01-15 16:35
nam  
alex  
normal  
closed 3.1.12  
fixed  
none    
none 4.0.44  
0005847: resin 3.1/4.0 isapi_srun logs 200 when unable to connect to backend
(rep by N. Shinomiya)

 I'm using Resin3.1.12 via IIS.

 Both Resin and isapi_srun send 503 response when IIS can't connect Resin
 or Resin doesn't started, but 200 status is recorded in logs of IIS.


isapi_srun.cpp:
DWORD WINAPI HttpExtensionProc(EXTENSION_CONTROL_BLOCK *pECB)
{
    if (cse_handle_request(g_config, pECB))
        return HSE_STATUS_SUCCESS;
    else
        return HSE_STATUS_ERROR;
}


cse_handle_request() calls connection_error(), which in turn returns 1, signaling success. May need to call ServerSupportFunction (http://msdn.microsoft.com/en-us/library/ms526034(v=vs.90).aspx) [^] to set the proper response code.

Notes
(0006623)
alex   
04-01-15 16:35   
log after the fix:

#Software: Microsoft Internet Information Services 5.1
#Version: 1.0
#Date: 2015-04-01 23:25:40
#Fields: time c-ip cs-method cs-uri-stem sc-status
23:25:40 127.0.0.1 GET /scripts/isapi_srun.dll/test.jsp 503
23:26:08 127.0.0.1 GET /scripts/isapi_srun.dll/test.jsp 503
23:26:08 127.0.0.1 GET /scripts/isapi_srun.dll/test.jsp 503