ASF Bugzilla – Attachment 19541 Details for
Bug 41562
[PATCH] Debug logging for read from client in ISAPI Redirector
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Debug logging for ReadClient.patch
Debug logging for ReadClient.patch (text/plain), 7.78 KB, created by
Tim Whittington
on 2007-02-07 16:10:49 UTC
(
hide
)
Description:
Debug logging for ReadClient.patch
Filename:
MIME Type:
Creator:
Tim Whittington
Created:
2007-02-07 16:10:49 UTC
Size:
7.78 KB
patch
obsolete
>Index: native/common/jk_ajp_common.c >=================================================================== >--- native/common/jk_ajp_common.c (revision 504711) >+++ native/common/jk_ajp_common.c (working copy) >@@ -1017,14 +1017,14 @@ > if (rc < 0) { > ae->last_errno = errno; > if (rc == JK_SOCKET_EOF) { >- jk_log(l, JK_LOG_ERROR, >- "(%s) can't receive the response message from tomcat, " >+ jk_log(l, JK_LOG_ERROR, >+ "(%s) can't receive the response message from tomcat, " > "tomcat (%s) has forced a connection close for socket %d", >- ae->worker->name, jk_dump_hinfo(&ae->worker->worker_inet_addr, buf), >+ ae->worker->name, jk_dump_hinfo(&ae->worker->worker_inet_addr, buf), > ae->sd); >- JK_TRACE_EXIT(l); >- return JK_FALSE; >- } >+ JK_TRACE_EXIT(l); >+ return JK_FALSE; >+ } > else { > jk_log(l, JK_LOG_ERROR, > "(%s) can't receive the response message from tomcat, " >@@ -1285,8 +1285,8 @@ > > if (JK_IS_DEBUG_LEVEL(l)) > jk_log(l, JK_LOG_DEBUG, >- "request body to send %d - request body to resend %d", >- ae->left_bytes_to_send, op->reply->len - AJP_HEADER_LEN); >+ "(%s) request body to send %d - request body to resend %d", >+ ae->worker->name, ae->left_bytes_to_send, op->reply->len - AJP_HEADER_LEN); > > /* > * POST recovery job is done here and will work when data to >Index: native/iis/jk_isapi_plugin.c >=================================================================== >--- native/iis/jk_isapi_plugin.c (revision 504711) >+++ native/iis/jk_isapi_plugin.c (working copy) >@@ -603,12 +603,22 @@ > if (s && s->ws_private && b && a) { > isapi_private_data_t *p = s->ws_private; > >+ if (JK_IS_DEBUG_LEVEL(logger)) { >+ jk_log(logger, JK_LOG_DEBUG, "Preparing to read %d bytes. " >+ "ECB reports %d bytes total, with %d available.", >+ l, p->lpEcb->cbTotalBytes, p->lpEcb->cbAvailable); >+ } >+ > *a = 0; > if (l) { > char *buf = b; > DWORD already_read = p->lpEcb->cbAvailable - p->bytes_read_so_far; > > if (already_read >= l) { >+ if (JK_IS_DEBUG_LEVEL(logger)) >+ jk_log(logger, JK_LOG_DEBUG, >+ "Already read %d bytes - supplying %d bytes from buffer", already_read, l); >+ > memcpy(buf, p->lpEcb->lpbData + p->bytes_read_so_far, l); > p->bytes_read_so_far += l; > *a = l; >@@ -618,6 +628,10 @@ > * Try to copy what we already have > */ > if (already_read > 0) { >+ if (JK_IS_DEBUG_LEVEL(logger)) >+ jk_log(logger, JK_LOG_DEBUG, >+ "Supplying %d bytes from buffer", already_read); >+ > memcpy(buf, p->lpEcb->lpbData + p->bytes_read_so_far, > already_read); > buf += already_read; >@@ -630,6 +644,10 @@ > /* > * Now try to read from the client ... > */ >+ if (JK_IS_DEBUG_LEVEL(logger)) >+ jk_log(logger, JK_LOG_DEBUG, >+ "Attempting to read %d bytes from client", l); >+ > if (p->lpEcb->ReadClient(p->lpEcb->ConnID, buf, (LPDWORD)&l)) { > *a += l; > } >@@ -702,12 +720,12 @@ > rv = initialize_extension(); > } > if (auth_notification_flags == SF_NOTIFY_AUTH_COMPLETE) { >- pVer->dwFlags = SF_NOTIFY_ORDER_HIGH | >- SF_NOTIFY_SECURE_PORT | >- SF_NOTIFY_NONSECURE_PORT | >- SF_NOTIFY_PREPROC_HEADERS | >- SF_NOTIFY_LOG | >- SF_NOTIFY_AUTH_COMPLETE; >+ pVer->dwFlags = SF_NOTIFY_ORDER_HIGH | >+ SF_NOTIFY_SECURE_PORT | >+ SF_NOTIFY_NONSECURE_PORT | >+ SF_NOTIFY_PREPROC_HEADERS | >+ SF_NOTIFY_LOG | >+ SF_NOTIFY_AUTH_COMPLETE; > } > else { > pVer->dwFlags = SF_NOTIFY_ORDER_HIGH | >@@ -899,9 +917,9 @@ > > /* This is a servlet, should redirect ... */ > if (JK_IS_DEBUG_LEVEL(logger)) >- jk_log(logger, JK_LOG_DEBUG, >- "[%s] is a servlet url - should redirect to %s", >- uri, worker); >+ jk_log(logger, JK_LOG_DEBUG, >+ "[%s] is a servlet url - should redirect to %s", >+ uri, worker); > > /* get URI we should forward */ > if (uri_select_option == URI_SELECT_OPT_UNPARSED) { >@@ -1101,8 +1119,8 @@ > rc = HSE_STATUS_SUCCESS; > lpEcb->dwHttpStatusCode = HTTP_STATUS_OK; > if (JK_IS_DEBUG_LEVEL(logger)) >- jk_log(logger, JK_LOG_DEBUG, >- "service() returned OK"); >+ jk_log(logger, JK_LOG_DEBUG, >+ "service() returned OK"); > } > else { > lpEcb->dwHttpStatusCode = is_error; >@@ -1359,7 +1377,7 @@ > else { > jk_map_free(&map); > } >- } >+ } > if (!using_ini_file) { > long rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, REGISTRY_LOCATION, > (DWORD)0, KEY_READ, &hkey); >@@ -1369,24 +1387,24 @@ > else { > src = &hkey; > } >- } >+ } > ok = ok && get_config_parameter(src, JK_LOG_FILE_TAG, log_file, sizeof(log_file)); > if (get_config_parameter(src, JK_LOG_LEVEL_TAG, tmpbuf, sizeof(tmpbuf))) { > log_level = jk_parse_log_level(tmpbuf); >- } >+ } > ok = ok && get_config_parameter(src, EXTENSION_URI_TAG, extension_uri, sizeof(extension_uri)); > ok = ok && get_config_parameter(src, JK_WORKER_FILE_TAG, worker_file, sizeof(worker_file)); > ok = ok && get_config_parameter(src, JK_MOUNT_FILE_TAG, worker_mount_file, sizeof(worker_mount_file)); > get_config_parameter(src, URI_REWRITE_TAG, rewrite_rule_file, sizeof(rewrite_rule_file)); > if (get_config_parameter(src, URI_SELECT_TAG, tmpbuf, sizeof(tmpbuf))) { > int opt = parse_uri_select(tmpbuf); >- if (opt >= 0) { >- uri_select_option = opt; >+ if (opt >= 0) { >+ uri_select_option = opt; >+ } >+ else { >+ ok = JK_FALSE; >+ } > } >- else { >- ok = JK_FALSE; >- } >- } > shm_config_size = get_config_int(src, SHM_SIZE_TAG, JK_SHM_DEF_SIZE); > worker_mount_reload = get_config_int(src, WORKER_MOUNT_RELOAD_TAG, JK_URIMAP_DEF_RELOAD); > strip_session = get_config_bool(src, STRIP_SESSION_TAG, JK_FALSE); >@@ -1396,7 +1414,7 @@ > } > else { > RegCloseKey(hkey); >- } >+ } > return ok; > } > >@@ -1415,7 +1433,7 @@ > } > } else { > return get_registry_config_parameter(*((HKEY*)src), tag, val, sz); >- } >+ } > } > > static int get_config_int(LPVOID src, const char *tag, int def) >@@ -1430,7 +1448,7 @@ > else { > return def; > } >- } >+ } > } > > static int get_config_bool(LPVOID src, const char *tag, int def) >@@ -1442,11 +1460,11 @@ > if (get_registry_config_parameter(*((HKEY*)src), tag, > tmpbuf, sizeof(tmpbuf))) { > return jk_get_bool_code(tmpbuf, def); >- } >- else { >+ } >+ else { > return def; >+ } > } >- } > } > > static int get_registry_config_parameter(HKEY hkey,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 41562
: 19541