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

(-)native/common/jk_ajp_common.c (-8 / +8 lines)
Lines 1017-1030 Link Here
1017
    if (rc < 0) {
1017
    if (rc < 0) {
1018
        ae->last_errno = errno;
1018
        ae->last_errno = errno;
1019
        if (rc == JK_SOCKET_EOF) {
1019
        if (rc == JK_SOCKET_EOF) {
1020
            jk_log(l, JK_LOG_ERROR,
1020
        jk_log(l, JK_LOG_ERROR,
1021
                   "(%s) can't receive the response message from tomcat, "
1021
               "(%s) can't receive the response message from tomcat, "
1022
                   "tomcat (%s) has forced a connection close for socket %d",
1022
                   "tomcat (%s) has forced a connection close for socket %d",
1023
                   ae->worker->name, jk_dump_hinfo(&ae->worker->worker_inet_addr, buf),
1023
               ae->worker->name, jk_dump_hinfo(&ae->worker->worker_inet_addr, buf),
1024
                   ae->sd);
1024
                   ae->sd);
1025
            JK_TRACE_EXIT(l);
1025
        JK_TRACE_EXIT(l);
1026
            return JK_FALSE;
1026
        return JK_FALSE;
1027
        }
1027
    }
1028
        else {
1028
        else {
1029
            jk_log(l, JK_LOG_ERROR,
1029
            jk_log(l, JK_LOG_ERROR,
1030
                   "(%s) can't receive the response message from tomcat, "
1030
                   "(%s) can't receive the response message from tomcat, "
Lines 1285-1292 Link Here
1285
1285
1286
    if (JK_IS_DEBUG_LEVEL(l))
1286
    if (JK_IS_DEBUG_LEVEL(l))
1287
        jk_log(l, JK_LOG_DEBUG,
1287
        jk_log(l, JK_LOG_DEBUG,
1288
               "request body to send %d - request body to resend %d",
1288
               "(%s) request body to send %d - request body to resend %d",
1289
               ae->left_bytes_to_send, op->reply->len - AJP_HEADER_LEN);
1289
               ae->worker->name, ae->left_bytes_to_send, op->reply->len - AJP_HEADER_LEN);
1290
1290
1291
    /*
1291
    /*
1292
     * POST recovery job is done here and will work when data to
1292
     * POST recovery job is done here and will work when data to
(-)native/iis/jk_isapi_plugin.c (-26 / +44 lines)
Lines 603-614 Link Here
603
    if (s && s->ws_private && b && a) {
603
    if (s && s->ws_private && b && a) {
604
        isapi_private_data_t *p = s->ws_private;
604
        isapi_private_data_t *p = s->ws_private;
605
605
606
        if (JK_IS_DEBUG_LEVEL(logger)) {
607
            jk_log(logger, JK_LOG_DEBUG, "Preparing to read %d bytes. "
608
                   "ECB reports %d bytes total, with %d available.",
609
                    l, p->lpEcb->cbTotalBytes, p->lpEcb->cbAvailable);
610
        }
611
606
        *a = 0;
612
        *a = 0;
607
        if (l) {
613
        if (l) {
608
            char *buf = b;
614
            char *buf = b;
609
            DWORD already_read = p->lpEcb->cbAvailable - p->bytes_read_so_far;
615
            DWORD already_read = p->lpEcb->cbAvailable - p->bytes_read_so_far;
610
616
611
            if (already_read >= l) {
617
            if (already_read >= l) {
618
                if (JK_IS_DEBUG_LEVEL(logger))
619
                    jk_log(logger, JK_LOG_DEBUG, 
620
                    "Already read %d bytes - supplying %d bytes from buffer", already_read, l);
621
612
                memcpy(buf, p->lpEcb->lpbData + p->bytes_read_so_far, l);
622
                memcpy(buf, p->lpEcb->lpbData + p->bytes_read_so_far, l);
613
                p->bytes_read_so_far += l;
623
                p->bytes_read_so_far += l;
614
                *a = l;
624
                *a = l;
Lines 618-623 Link Here
618
                 * Try to copy what we already have
628
                 * Try to copy what we already have
619
                 */
629
                 */
620
                if (already_read > 0) {
630
                if (already_read > 0) {
631
                    if (JK_IS_DEBUG_LEVEL(logger))
632
                        jk_log(logger, JK_LOG_DEBUG, 
633
                        "Supplying %d bytes from buffer", already_read);
634
621
                    memcpy(buf, p->lpEcb->lpbData + p->bytes_read_so_far,
635
                    memcpy(buf, p->lpEcb->lpbData + p->bytes_read_so_far,
622
                           already_read);
636
                           already_read);
623
                    buf += already_read;
637
                    buf += already_read;
Lines 630-635 Link Here
630
                /*
644
                /*
631
                 * Now try to read from the client ...
645
                 * Now try to read from the client ...
632
                 */
646
                 */
647
                if (JK_IS_DEBUG_LEVEL(logger))
648
                    jk_log(logger, JK_LOG_DEBUG, 
649
                    "Attempting to read %d bytes from client", l);
650
633
                if (p->lpEcb->ReadClient(p->lpEcb->ConnID, buf, (LPDWORD)&l)) {
651
                if (p->lpEcb->ReadClient(p->lpEcb->ConnID, buf, (LPDWORD)&l)) {
634
                    *a += l;
652
                    *a += l;
635
                }
653
                }
Lines 702-713 Link Here
702
        rv = initialize_extension();
720
        rv = initialize_extension();
703
    }
721
    }
704
    if (auth_notification_flags == SF_NOTIFY_AUTH_COMPLETE) {
722
    if (auth_notification_flags == SF_NOTIFY_AUTH_COMPLETE) {
705
        pVer->dwFlags = SF_NOTIFY_ORDER_HIGH |
723
    pVer->dwFlags = SF_NOTIFY_ORDER_HIGH |
706
                        SF_NOTIFY_SECURE_PORT |
724
                    SF_NOTIFY_SECURE_PORT |
707
                        SF_NOTIFY_NONSECURE_PORT |
725
                    SF_NOTIFY_NONSECURE_PORT |
708
                        SF_NOTIFY_PREPROC_HEADERS |
726
                    SF_NOTIFY_PREPROC_HEADERS |
709
                        SF_NOTIFY_LOG |
727
                    SF_NOTIFY_LOG |
710
                        SF_NOTIFY_AUTH_COMPLETE;
728
                    SF_NOTIFY_AUTH_COMPLETE;
711
    }
729
    }
712
    else {
730
    else {
713
        pVer->dwFlags = SF_NOTIFY_ORDER_HIGH |
731
        pVer->dwFlags = SF_NOTIFY_ORDER_HIGH |
Lines 899-907 Link Here
899
917
900
                /* This is a servlet, should redirect ... */
918
                /* This is a servlet, should redirect ... */
901
                if (JK_IS_DEBUG_LEVEL(logger))
919
                if (JK_IS_DEBUG_LEVEL(logger))
902
                    jk_log(logger, JK_LOG_DEBUG,
920
                jk_log(logger, JK_LOG_DEBUG,
903
                        "[%s] is a servlet url - should redirect to %s",
921
                       "[%s] is a servlet url - should redirect to %s",
904
                        uri, worker);
922
                       uri, worker);
905
923
906
                /* get URI we should forward */
924
                /* get URI we should forward */
907
                if (uri_select_option == URI_SELECT_OPT_UNPARSED) {
925
                if (uri_select_option == URI_SELECT_OPT_UNPARSED) {
Lines 1101-1108 Link Here
1101
                        rc = HSE_STATUS_SUCCESS;
1119
                        rc = HSE_STATUS_SUCCESS;
1102
                        lpEcb->dwHttpStatusCode = HTTP_STATUS_OK;
1120
                        lpEcb->dwHttpStatusCode = HTTP_STATUS_OK;
1103
                        if (JK_IS_DEBUG_LEVEL(logger))
1121
                        if (JK_IS_DEBUG_LEVEL(logger))
1104
                            jk_log(logger, JK_LOG_DEBUG,
1122
                        jk_log(logger, JK_LOG_DEBUG,
1105
                                   "service() returned OK");
1123
                               "service() returned OK");
1106
                    }
1124
                    }
1107
                    else {
1125
                    else {
1108
                        lpEcb->dwHttpStatusCode = is_error;
1126
                        lpEcb->dwHttpStatusCode = is_error;
Lines 1359-1365 Link Here
1359
        else {
1377
        else {
1360
            jk_map_free(&map);
1378
            jk_map_free(&map);
1361
        }
1379
        }
1362
    }
1380
        }
1363
    if (!using_ini_file) {
1381
    if (!using_ini_file) {
1364
        long rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, REGISTRY_LOCATION,
1382
        long rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, REGISTRY_LOCATION,
1365
                               (DWORD)0, KEY_READ, &hkey);
1383
                               (DWORD)0, KEY_READ, &hkey);
Lines 1369-1392 Link Here
1369
        else {
1387
        else {
1370
            src = &hkey;
1388
            src = &hkey;
1371
        }
1389
        }
1372
    }
1390
        }
1373
    ok = ok && get_config_parameter(src, JK_LOG_FILE_TAG, log_file, sizeof(log_file));
1391
    ok = ok && get_config_parameter(src, JK_LOG_FILE_TAG, log_file, sizeof(log_file));
1374
    if (get_config_parameter(src, JK_LOG_LEVEL_TAG, tmpbuf, sizeof(tmpbuf))) {
1392
    if (get_config_parameter(src, JK_LOG_LEVEL_TAG, tmpbuf, sizeof(tmpbuf))) {
1375
        log_level = jk_parse_log_level(tmpbuf);
1393
        log_level = jk_parse_log_level(tmpbuf);
1376
    }
1394
        }
1377
    ok = ok && get_config_parameter(src, EXTENSION_URI_TAG, extension_uri, sizeof(extension_uri));
1395
    ok = ok && get_config_parameter(src, EXTENSION_URI_TAG, extension_uri, sizeof(extension_uri));
1378
    ok = ok && get_config_parameter(src, JK_WORKER_FILE_TAG, worker_file, sizeof(worker_file));
1396
    ok = ok && get_config_parameter(src, JK_WORKER_FILE_TAG, worker_file, sizeof(worker_file));
1379
    ok = ok && get_config_parameter(src, JK_MOUNT_FILE_TAG, worker_mount_file, sizeof(worker_mount_file));
1397
    ok = ok && get_config_parameter(src, JK_MOUNT_FILE_TAG, worker_mount_file, sizeof(worker_mount_file));
1380
    get_config_parameter(src, URI_REWRITE_TAG, rewrite_rule_file, sizeof(rewrite_rule_file));
1398
    get_config_parameter(src, URI_REWRITE_TAG, rewrite_rule_file, sizeof(rewrite_rule_file));
1381
    if (get_config_parameter(src, URI_SELECT_TAG, tmpbuf, sizeof(tmpbuf))) {
1399
    if (get_config_parameter(src, URI_SELECT_TAG, tmpbuf, sizeof(tmpbuf))) {
1382
        int opt = parse_uri_select(tmpbuf);
1400
        int opt = parse_uri_select(tmpbuf);
1383
        if (opt >= 0) {
1401
            if (opt >= 0) {
1384
            uri_select_option = opt;
1402
                uri_select_option = opt;
1403
            }
1404
            else {
1405
                ok = JK_FALSE;
1406
            }
1385
        }
1407
        }
1386
        else {
1387
            ok = JK_FALSE;
1388
        }
1389
    }
1390
    shm_config_size = get_config_int(src, SHM_SIZE_TAG, JK_SHM_DEF_SIZE);
1408
    shm_config_size = get_config_int(src, SHM_SIZE_TAG, JK_SHM_DEF_SIZE);
1391
    worker_mount_reload = get_config_int(src, WORKER_MOUNT_RELOAD_TAG, JK_URIMAP_DEF_RELOAD);
1409
    worker_mount_reload = get_config_int(src, WORKER_MOUNT_RELOAD_TAG, JK_URIMAP_DEF_RELOAD);
1392
    strip_session = get_config_bool(src, STRIP_SESSION_TAG, JK_FALSE);
1410
    strip_session = get_config_bool(src, STRIP_SESSION_TAG, JK_FALSE);
Lines 1396-1402 Link Here
1396
    }
1414
    }
1397
    else {
1415
    else {
1398
        RegCloseKey(hkey);
1416
        RegCloseKey(hkey);
1399
    }
1417
        }
1400
    return ok;
1418
    return ok;
1401
}
1419
}
1402
1420
Lines 1415-1421 Link Here
1415
        }
1433
        }
1416
    } else {
1434
    } else {
1417
        return get_registry_config_parameter(*((HKEY*)src), tag, val, sz);
1435
        return get_registry_config_parameter(*((HKEY*)src), tag, val, sz);
1418
    }
1436
        }
1419
}
1437
}
1420
1438
1421
static int get_config_int(LPVOID src, const char *tag, int def)
1439
static int get_config_int(LPVOID src, const char *tag, int def)
Lines 1430-1436 Link Here
1430
        else {
1448
        else {
1431
            return def;
1449
            return def;
1432
        }
1450
        }
1433
    }
1451
        }
1434
}
1452
}
1435
1453
1436
static int get_config_bool(LPVOID src, const char *tag, int def)
1454
static int get_config_bool(LPVOID src, const char *tag, int def)
Lines 1442-1452 Link Here
1442
        if (get_registry_config_parameter(*((HKEY*)src), tag,
1460
        if (get_registry_config_parameter(*((HKEY*)src), tag,
1443
                                          tmpbuf, sizeof(tmpbuf))) {
1461
                                          tmpbuf, sizeof(tmpbuf))) {
1444
            return jk_get_bool_code(tmpbuf, def);
1462
            return jk_get_bool_code(tmpbuf, def);
1445
        }
1463
            }
1446
        else {
1464
            else {
1447
            return def;
1465
            return def;
1466
            }
1448
        }
1467
        }
1449
    }
1450
}
1468
}
1451
1469
1452
static int get_registry_config_parameter(HKEY hkey,
1470
static int get_registry_config_parameter(HKEY hkey,

Return to bug 41562