You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2011/11/01 17:07:10 UTC
svn commit: r1196077 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
Author: mturk
Date: Tue Nov 1 16:07:10 2011
New Revision: 1196077
URL: http://svn.apache.org/viewvc?rev=1196077&view=rev
Log:
Axe trailing spaces
Modified:
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1196077&r1=1196076&r2=1196077&view=diff
==============================================================================
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Tue Nov 1 16:07:10 2011
@@ -1814,7 +1814,7 @@ static char *rregex_rewrite(jk_pool_t *p
size_t orgsz = strlen(uri);
size_t subsz = strlen(subs);
size_t lefts = orgsz - regm[0].rm_eo;
-
+
ptr = buf = jk_pool_alloc(p, regm[0].rm_so + subsz + lefts + 1);
memcpy(buf, uri, regm[0].rm_so);
ptr += regm[0].rm_so;
@@ -1847,7 +1847,7 @@ static __inline LPSTR get_pheader(jk_poo
if (!pfp->GetHeader(pfc, lpszName, lpszBuf, &dwLen)) {
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
- return NULL;
+ return NULL;
if ((rv = jk_pool_alloc(pool, dwLen)) == NULL)
return NULL;
/* Try again with dynamic buffer */
@@ -1902,7 +1902,7 @@ static DWORD handle_notify_event(PHTTP_F
ld->request_matched = JK_FALSE;
}
uri = get_pheader(&pool, pfp, pfc, "url", szUB, sizeof(szUB));
- if (uri == NULL) {
+ if (uri == NULL) {
jk_log(logger, JK_LOG_ERROR,
"error while getting the url");
return SF_STATUS_REQ_ERROR;
@@ -1922,7 +1922,7 @@ static DWORD handle_notify_event(PHTTP_F
if (uri_select_option == URI_SELECT_OPT_UNPARSED) {
/* Duplicate unparsed uri */
uri_undec = jk_pool_strdup(&pool, uri);
- }
+ }
rc = unescape_url(uri);
if (rc == BAD_REQUEST) {
jk_log(logger, JK_LOG_ERROR,
@@ -1941,7 +1941,7 @@ static DWORD handle_notify_event(PHTTP_F
goto cleanup;
}
getparents(uri);
- len = ISIZEOF(szHB) - 1;
+ len = ISIZEOF(szHB) - 1;
if (pfc->GetServerVariable(pfc, "SERVER_NAME", &szHB[1], &len) && len > 1) {
len = ISIZEOF(szPB);
if (pfc->GetServerVariable(pfc, "SERVER_PORT", szPB, &len))
@@ -2023,7 +2023,7 @@ static DWORD handle_notify_event(PHTTP_F
uri);
write_error_response(pfc, 400);
rv = SF_STATUS_REQ_FINISHED;
- goto cleanup;
+ goto cleanup;
}
if (JK_IS_DEBUG_LEVEL(logger))
jk_log(logger, JK_LOG_DEBUG,
@@ -2052,13 +2052,13 @@ static DWORD handle_notify_event(PHTTP_F
forwardURI = rewriteURI;
}
itoa(worker_index, swindex, 10);
- rs = pfp->AddHeader(pfc, URI_HEADER_NAME, forwardURI);
+ rs = pfp->AddHeader(pfc, URI_HEADER_NAME, forwardURI);
if (rs && query)
- rs = pfp->AddHeader(pfc, QUERY_HEADER_NAME, query);
+ rs = pfp->AddHeader(pfc, QUERY_HEADER_NAME, query);
rs = rs && pfp->AddHeader(pfc, WORKER_HEADER_NAME, (LPSTR)worker);
rs = rs && pfp->AddHeader(pfc, WORKER_HEADER_INDEX, swindex);
rs = rs && pfp->SetHeader(pfc, "url", extension_uri);
-
+
if (!rs) {
jk_log(logger, JK_LOG_ERROR,
"error while adding request headers");
@@ -2112,13 +2112,13 @@ static DWORD handle_notify_event(PHTTP_F
"removing session identifier [%s] for non servlet url [%s]",
jsessionid, uri);
*jsessionid = '\0';
- pfp->SetHeader(pfc, "url", uri);
+ pfp->SetHeader(pfc, "url", uri);
}
}
}
cleanup:
jk_close_pool(&pool);
- return rv;
+ return rv;
}
DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc,
@@ -2432,7 +2432,6 @@ BOOL WINAPI DllMain(HINSTANCE hInst,
JK_INIT_CS(&init_cs, rc);
JK_INIT_CS(&log_cs, rc);
-
break;
case DLL_PROCESS_DETACH:
__try {
@@ -2817,6 +2816,8 @@ static BOOL initialize_extension(void)
if (read_registry_init_data()) {
if (get_iis_info(&iis_info) != JK_TRUE) {
jk_log(logger, JK_LOG_ERROR, "Could not retrieve IIS version from registry");
+ }
+ else {
if (use_auth_notification_flags)
iis_info.filter_notify_event = SF_NOTIFY_AUTH_COMPLETE;
else
@@ -2934,6 +2935,7 @@ static int read_registry_init_data(void)
else {
RegCloseKey(hkey);
}
+
return ok;
}
@@ -3233,7 +3235,7 @@ static int init_ws_service(isapi_private
&huge_buf_sz)) {
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
JK_TRACE_EXIT(logger);
- return JK_FALSE;
+ return JK_FALSE;
}
/* User has more then 64K of headers.
* Resize initial buffer
@@ -3247,7 +3249,7 @@ static int init_ws_service(isapi_private
huge_buf,
&huge_buf_sz)) {
JK_TRACE_EXIT(logger);
- return JK_FALSE;
+ return JK_FALSE;
}
}
for (tmp = huge_buf; *tmp; tmp++) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1196077 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
Posted by Mladen Truk <mt...@apache.org>.
On 11/01/2011 06:48 PM, Konstantin Kolinko wrote:
> 2011/11/1<mt...@apache.org>:
>
>> --- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
>> +++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Tue Nov 1 16:07:10 2011
>> @@ -2817,6 +2816,8 @@ static BOOL initialize_extension(void)
>> if (read_registry_init_data()) {
>> if (get_iis_info(&iis_info) != JK_TRUE) {
>> jk_log(logger, JK_LOG_ERROR, "Could not retrieve IIS version from registry");
>> + }
>> + else {
>> if (use_auth_notification_flags)
>> iis_info.filter_notify_event = SF_NOTIFY_AUTH_COMPLETE;
>> else
>
> You not only axed the whitespace, but also added the above "else" into
> initialize_extension(void) method.
>
Right. This should have been a separate commit message,
but the committed implementation is correct.
If the IIS version cannot be read from registry, load must fail.
Regards
--
^TM
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1196077 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/11/1 <mt...@apache.org>:
> Author: mturk
> Date: Tue Nov 1 16:07:10 2011
> New Revision: 1196077
>
> URL: http://svn.apache.org/viewvc?rev=1196077&view=rev
> Log:
> Axe trailing spaces
>
> Modified:
> tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
>
> Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
> URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1196077&r1=1196076&r2=1196077&view=diff
>
> --- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
> +++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Tue Nov 1 16:07:10 2011
> @@ -2817,6 +2816,8 @@ static BOOL initialize_extension(void)
> if (read_registry_init_data()) {
> if (get_iis_info(&iis_info) != JK_TRUE) {
> jk_log(logger, JK_LOG_ERROR, "Could not retrieve IIS version from registry");
> + }
> + else {
> if (use_auth_notification_flags)
> iis_info.filter_notify_event = SF_NOTIFY_AUTH_COMPLETE;
> else
You not only axed the whitespace, but also added the above "else" into
initialize_extension(void) method.
So filter_notify_event now defaults to 0 if registry cannot be read.
If that is expected maybe change the following log message in
init_jk(char *serverName)
to print "NONE" for the value of 0 instead of "UNKNOWN".
2669 jk_log(logger, JK_LOG_DEBUG, "Using notification event %s (0x%08x)",
2670 (iis_info.filter_notify_event == SF_NOTIFY_AUTH_COMPLETE) ?
2671 "SF_NOTIFY_AUTH_COMPLETE" :
2672 ((iis_info.filter_notify_event == SF_NOTIFY_PREPROC_HEADERS) ?
2673 "SF_NOTIFY_PREPROC_HEADERS" : "UNKNOWN"),
2674 iis_info.filter_notify_event);
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org