View | Details | Raw Unified | Return to bug 49511
Collapse All | Expand All

(-)jk_isapi_plugin.c (-3 / +15 lines)
Lines 536-541 Link Here
536
struct isapi_log_data_t {
536
struct isapi_log_data_t {
537
    char uri[INTERNET_MAX_URL_LENGTH];
537
    char uri[INTERNET_MAX_URL_LENGTH];
538
    char query[INTERNET_MAX_URL_LENGTH];
538
    char query[INTERNET_MAX_URL_LENGTH];
539
    int request_matched;        /* Whether this request (within a multi-request connection)
540
                                   was handled and needs the log values adjusted */
539
};
541
};
540
542
541
typedef struct iis_info_t iis_info_t;
543
typedef struct iis_info_t iis_info_t;
Lines 1856-1861 Link Here
1856
        SetHeader(pfc, WORKER_HEADER_INDEX, NULL);
1858
        SetHeader(pfc, WORKER_HEADER_INDEX, NULL);
1857
        SetHeader(pfc, TOMCAT_TRANSLATE_HEADER_NAME, NULL);
1859
        SetHeader(pfc, TOMCAT_TRANSLATE_HEADER_NAME, NULL);
1858
1860
1861
        // Suppress logging of original uri/query when we don't map a URL
1862
        if (pfc->pFilterContext) {
1863
            isapi_log_data_t *ld = (isapi_log_data_t *)pfc->pFilterContext;
1864
            ld->request_matched = JK_FALSE;
1865
        }
1866
1859
        if (!GetHeader(pfc, "url", (LPVOID) uri, (LPDWORD) & sz)) {
1867
        if (!GetHeader(pfc, "url", (LPVOID) uri, (LPDWORD) & sz)) {
1860
            jk_log(logger, JK_LOG_ERROR,
1868
            jk_log(logger, JK_LOG_ERROR,
1861
                   "error while getting the url");
1869
                   "error while getting the url");
Lines 2055-2066 Link Here
2055
                    memset(ld, 0, sizeof(isapi_log_data_t));
2063
                    memset(ld, 0, sizeof(isapi_log_data_t));
2056
                    StringCbCopy(ld->uri, INTERNET_MAX_URL_LENGTH, forwardURI);
2064
                    StringCbCopy(ld->uri, INTERNET_MAX_URL_LENGTH, forwardURI);
2057
                    StringCbCopy(ld->query, INTERNET_MAX_URL_LENGTH, squery);
2065
                    StringCbCopy(ld->query, INTERNET_MAX_URL_LENGTH, squery);
2066
                    ld->request_matched = JK_TRUE;
2058
                    pfc->pFilterContext = ld;
2067
                    pfc->pFilterContext = ld;
2059
                } else {
2068
                } else {
2060
                    isapi_log_data_t *ld = (isapi_log_data_t *)pfc->pFilterContext;
2069
                    isapi_log_data_t *ld = (isapi_log_data_t *)pfc->pFilterContext;
2061
                    memset(ld, 0, sizeof(isapi_log_data_t));
2070
                    memset(ld, 0, sizeof(isapi_log_data_t));
2062
                    StringCbCopy(ld->uri, INTERNET_MAX_URL_LENGTH, forwardURI);
2071
                    StringCbCopy(ld->uri, INTERNET_MAX_URL_LENGTH, forwardURI);
2063
                    StringCbCopy(ld->query, INTERNET_MAX_URL_LENGTH, squery);
2072
                    StringCbCopy(ld->query, INTERNET_MAX_URL_LENGTH, squery);
2073
                    ld->request_matched = JK_TRUE;
2064
                }
2074
                }
2065
            }
2075
            }
2066
            else {
2076
            else {
Lines 2084-2092 Link Here
2084
    else if (dwNotificationType == SF_NOTIFY_LOG) {
2094
    else if (dwNotificationType == SF_NOTIFY_LOG) {
2085
        if (pfc->pFilterContext) {
2095
        if (pfc->pFilterContext) {
2086
            isapi_log_data_t *ld = (isapi_log_data_t *)pfc->pFilterContext;
2096
            isapi_log_data_t *ld = (isapi_log_data_t *)pfc->pFilterContext;
2087
            HTTP_FILTER_LOG  *pl = (HTTP_FILTER_LOG *)pvNotification;
2097
            if (ld->request_matched) {
2088
            pl->pszTarget = ld->uri;
2098
                HTTP_FILTER_LOG  *pl = (HTTP_FILTER_LOG *)pvNotification;
2089
            pl->pszParameters = ld->query;
2099
                pl->pszTarget = ld->uri;
2100
                pl->pszParameters = ld->query;
2101
            }
2090
        }
2102
        }
2091
    }
2103
    }
2092
    return SF_STATUS_REQ_NEXT_NOTIFICATION;
2104
    return SF_STATUS_REQ_NEXT_NOTIFICATION;

Return to bug 49511