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

(-)server/mpm/winnt/service.c (-1 / +1 lines)
Lines 436-442 Link Here
436
436
437
    /* Time to fix up the description, upon each successful restart
437
    /* Time to fix up the description, upon each successful restart
438
     */
438
     */
439
    full_description = ap_get_server_version();
439
    full_description = ap_get_server_description();
440
440
441
    if ((osver.dwPlatformId == VER_PLATFORM_WIN32_NT)
441
    if ((osver.dwPlatformId == VER_PLATFORM_WIN32_NT)
442
          && (osver.dwMajorVersion > 4)
442
          && (osver.dwMajorVersion > 4)
(-)server/mpm/winnt/mpm_winnt.c (-1 / +1 lines)
Lines 1705-1711 Link Here
1705
        /* A real-honest to goodness parent */
1705
        /* A real-honest to goodness parent */
1706
        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
1706
        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
1707
                     "%s configured -- resuming normal operations",
1707
                     "%s configured -- resuming normal operations",
1708
                     ap_get_server_version());
1708
                     ap_get_server_description());
1709
        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
1709
        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
1710
                     "Server built: %s", ap_get_server_built());
1710
                     "Server built: %s", ap_get_server_built());
1711
1711
(-)server/mpm/mpmt_os2/mpmt_os2.c (-2 / +2 lines)
Lines 207-213 Link Here
207
    int listener_num, num_listeners, slot;
207
    int listener_num, num_listeners, slot;
208
    ULONG rc;
208
    ULONG rc;
209
209
210
    printf("%s \n", ap_get_server_version());
210
    printf("%s \n", ap_get_server_description());
211
    set_signals();
211
    set_signals();
212
212
213
    if (ap_setup_listeners(ap_server_conf) < 1) {
213
    if (ap_setup_listeners(ap_server_conf) < 1) {
Lines 270-276 Link Here
270
    ap_scoreboard_image->global->restart_time = apr_time_now();
270
    ap_scoreboard_image->global->restart_time = apr_time_now();
271
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
271
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
272
                "%s configured -- resuming normal operations",
272
                "%s configured -- resuming normal operations",
273
                ap_get_server_version());
273
                ap_get_server_description());
274
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
274
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
275
                "Server built: %s", ap_get_server_built());
275
                "Server built: %s", ap_get_server_built());
276
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
276
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
(-)server/mpm/netware/mpm_netware.c (-4 / +4 lines)
Lines 723-729 Link Here
723
    request_count = 0;
723
    request_count = 0;
724
724
725
    ClearScreen (getscreenhandle());
725
    ClearScreen (getscreenhandle());
726
    printf("%s \n", ap_get_server_version());
726
    printf("%s \n", ap_get_server_description());
727
727
728
    for (i=0;i<SERVER_NUM_STATUS;i++) {
728
    for (i=0;i<SERVER_NUM_STATUS;i++) {
729
        status_array[i] = 0;
729
        status_array[i] = 0;
Lines 793-799 Link Here
793
    ap_listen_rec *lr;
793
    ap_listen_rec *lr;
794
    module **m;
794
    module **m;
795
795
796
    printf("%s\n", ap_get_server_version());
796
    printf("%s\n", ap_get_server_description());
797
    if (ap_my_addrspace && (ap_my_addrspace[0] != 'O') && (ap_my_addrspace[1] != 'S'))
797
    if (ap_my_addrspace && (ap_my_addrspace[0] != 'O') && (ap_my_addrspace[1] != 'S'))
798
        printf("   Running in address space %s\n", ap_my_addrspace);
798
        printf("   Running in address space %s\n", ap_my_addrspace);
799
799
Lines 899-905 Link Here
899
899
900
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
900
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
901
            "%s configured -- resuming normal operations",
901
            "%s configured -- resuming normal operations",
902
            ap_get_server_version());
902
            ap_get_server_description());
903
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
903
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
904
            "Server built: %s", ap_get_server_built());
904
            "Server built: %s", ap_get_server_built());
905
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
905
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
Lines 1204-1210 Link Here
1204
            restart();
1204
            restart();
1205
        }
1205
        }
1206
        else if (!strnicmp("VERSION",&szcommandLine[iCommandLen],3)) {
1206
        else if (!strnicmp("VERSION",&szcommandLine[iCommandLen],3)) {
1207
            printf("Server version: %s\n", ap_get_server_version());
1207
            printf("Server version: %s\n", ap_get_server_description());
1208
            printf("Server built:   %s\n", ap_get_server_built());
1208
            printf("Server built:   %s\n", ap_get_server_built());
1209
        }
1209
        }
1210
        else if (!strnicmp("MODULES",&szcommandLine[iCommandLen],3)) {
1210
        else if (!strnicmp("MODULES",&szcommandLine[iCommandLen],3)) {
(-)server/mpm/beos/beos.c (-1 / +1 lines)
Lines 935-941 Link Here
935
     */
935
     */
936
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
936
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
937
                "%s configured -- resuming normal operations",
937
                "%s configured -- resuming normal operations",
938
                ap_get_server_version());
938
                ap_get_server_description());
939
939
940
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
940
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
941
                "Server built: %s", ap_get_server_built());
941
                "Server built: %s", ap_get_server_built());
(-)server/mpm/prefork/prefork.c (-1 / +1 lines)
Lines 976-982 Link Here
976
976
977
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
977
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
978
                "%s configured -- resuming normal operations",
978
                "%s configured -- resuming normal operations",
979
                ap_get_server_version());
979
                ap_get_server_description());
980
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
980
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
981
                "Server built: %s", ap_get_server_built());
981
                "Server built: %s", ap_get_server_built());
982
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
982
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
(-)server/mpm/worker/worker.c (-1 / +1 lines)
Lines 1737-1743 Link Here
1737
1737
1738
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
1738
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
1739
                "%s configured -- resuming normal operations",
1739
                "%s configured -- resuming normal operations",
1740
                ap_get_server_version());
1740
                ap_get_server_description());
1741
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
1741
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
1742
                "Server built: %s", ap_get_server_built());
1742
                "Server built: %s", ap_get_server_built());
1743
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
1743
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
(-)server/mpm/experimental/event/event.c (-1 / +1 lines)
Lines 1988-1994 Link Here
1988
1988
1989
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
1989
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
1990
                 "%s configured -- resuming normal operations",
1990
                 "%s configured -- resuming normal operations",
1991
                 ap_get_server_version());
1991
                 ap_get_server_description());
1992
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
1992
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
1993
                 "Server built: %s", ap_get_server_built());
1993
                 "Server built: %s", ap_get_server_built());
1994
1994
(-)server/mpm/experimental/threadpool/threadpool.c (-1 / +1 lines)
Lines 1778-1784 Link Here
1778
1778
1779
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
1779
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
1780
                "%s configured -- resuming normal operations",
1780
                "%s configured -- resuming normal operations",
1781
                ap_get_server_version());
1781
                ap_get_server_description());
1782
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
1782
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
1783
                "Server built: %s", ap_get_server_built());
1783
                "Server built: %s", ap_get_server_built());
1784
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
1784
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
(-)server/mpm/experimental/perchild/perchild.c (-1 / +1 lines)
Lines 1314-1320 Link Here
1314
1314
1315
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
1315
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
1316
                 "%s configured -- resuming normal operations",
1316
                 "%s configured -- resuming normal operations",
1317
                 ap_get_server_version());
1317
                 ap_get_server_description());
1318
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
1318
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
1319
                 "Server built: %s", ap_get_server_built());
1319
                 "Server built: %s", ap_get_server_built());
1320
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
1320
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
(-)server/mpm/experimental/leader/leader.c (-1 / +1 lines)
Lines 1529-1535 Link Here
1529
1529
1530
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
1530
    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
1531
                "%s configured -- resuming normal operations",
1531
                "%s configured -- resuming normal operations",
1532
                ap_get_server_version());
1532
                ap_get_server_description());
1533
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
1533
    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
1534
                "Server built: %s", ap_get_server_built());
1534
                "Server built: %s", ap_get_server_built());
1535
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
1535
#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
(-)server/core.c (-5 / +22 lines)
Lines 2580-2586 Link Here
2580
2580
2581
    if (conf->server_signature == srv_sig_withmail) {
2581
    if (conf->server_signature == srv_sig_withmail) {
2582
        return apr_pstrcat(r->pool, prefix, "<address>",
2582
        return apr_pstrcat(r->pool, prefix, "<address>",
2583
                           ap_get_server_version(),
2583
                           ap_get_server_banner(),
2584
                           " Server at <a href=\"",
2584
                           " Server at <a href=\"",
2585
                           ap_is_url(r->server->server_admin) ? "" : "mailto:",
2585
                           ap_is_url(r->server->server_admin) ? "" : "mailto:",
2586
                           ap_escape_html(r->pool, r->server->server_admin),
2586
                           ap_escape_html(r->pool, r->server->server_admin),
Lines 2590-2596 Link Here
2590
                           "</address>\n", NULL);
2590
                           "</address>\n", NULL);
2591
    }
2591
    }
2592
2592
2593
    return apr_pstrcat(r->pool, prefix, "<address>", ap_get_server_version(),
2593
    return apr_pstrcat(r->pool, prefix, "<address>", ap_get_server_banner(),
2594
                       " Server at ",
2594
                       " Server at ",
2595
                       ap_escape_html(r->pool, ap_get_server_name(r)),
2595
                       ap_escape_html(r->pool, ap_get_server_name(r)),
2596
                       " Port ", sport,
2596
                       " Port ", sport,
Lines 2614-2620 Link Here
2614
    SrvTk_MINIMAL,      /* eg: Apache/2.0.41 */
2614
    SrvTk_MINIMAL,      /* eg: Apache/2.0.41 */
2615
    SrvTk_OS,           /* eg: Apache/2.0.41 (UNIX) */
2615
    SrvTk_OS,           /* eg: Apache/2.0.41 (UNIX) */
2616
    SrvTk_FULL,         /* eg: Apache/2.0.41 (UNIX) PHP/4.2.2 FooBar/1.2b */
2616
    SrvTk_FULL,         /* eg: Apache/2.0.41 (UNIX) PHP/4.2.2 FooBar/1.2b */
2617
    SrvTk_PRODUCT_ONLY  /* eg: Apache */
2617
    SrvTk_PRODUCT_ONLY, /* eg: Apache */
2618
    SrvTk_OFF           /* eg: Nothing at all */
2618
};
2619
};
2619
static enum server_token_type ap_server_tokens = SrvTk_FULL;
2620
static enum server_token_type ap_server_tokens = SrvTk_FULL;
2620
2621
Lines 2634-2644 Link Here
2634
    version->add_string = AP_SERVER_ADD_STRING;
2635
    version->add_string = AP_SERVER_ADD_STRING;
2635
}
2636
}
2636
2637
2637
AP_DECLARE(const char *) ap_get_server_version(void)
2638
static const char *get_server_version(void)
2638
{
2639
{
2639
    return (server_version ? server_version : AP_SERVER_BASEVERSION);
2640
    return (server_version ? server_version : AP_SERVER_BASEVERSION);
2640
}
2641
}
2641
2642
2643
AP_DECLARE(const char *) ap_get_server_description(void)
2644
{
2645
    return get_server_version();
2646
}
2647
2648
AP_DECLARE(const char *) ap_get_server_banner(void)
2649
{
2650
    return get_server_version();
2651
}
2652
2642
AP_DECLARE(void) ap_add_version_component(apr_pool_t *pconf, const char *component)
2653
AP_DECLARE(void) ap_add_version_component(apr_pool_t *pconf, const char *component)
2643
{
2654
{
2644
    if (! version_locked) {
2655
    if (! version_locked) {
Lines 2669-2675 Link Here
2669
 */
2680
 */
2670
static void ap_set_version(apr_pool_t *pconf)
2681
static void ap_set_version(apr_pool_t *pconf)
2671
{
2682
{
2672
    if (ap_server_tokens == SrvTk_PRODUCT_ONLY) {
2683
    if (ap_server_tokens == SrvTk_OFF) {
2684
        ap_add_version_component(pconf, "");
2685
    }
2686
    else if (ap_server_tokens == SrvTk_PRODUCT_ONLY) {
2673
        ap_add_version_component(pconf, AP_SERVER_BASEPRODUCT);
2687
        ap_add_version_component(pconf, AP_SERVER_BASEPRODUCT);
2674
    }
2688
    }
2675
    else if (ap_server_tokens == SrvTk_MINIMAL) {
2689
    else if (ap_server_tokens == SrvTk_MINIMAL) {
Lines 2718-2723 Link Here
2718
    else if (!strcasecmp(arg, "Prod") || !strcasecmp(arg, "ProductOnly")) {
2732
    else if (!strcasecmp(arg, "Prod") || !strcasecmp(arg, "ProductOnly")) {
2719
        ap_server_tokens = SrvTk_PRODUCT_ONLY;
2733
        ap_server_tokens = SrvTk_PRODUCT_ONLY;
2720
    }
2734
    }
2735
    else if (!strcasecmp(arg, "Off") ) {
2736
        ap_server_tokens = SrvTk_OFF;
2737
    }
2721
    else {
2738
    else {
2722
        ap_server_tokens = SrvTk_FULL;
2739
        ap_server_tokens = SrvTk_FULL;
2723
    }
2740
    }
(-)server/util_script.c (-1 / +1 lines)
Lines 223-229 Link Here
223
#endif
223
#endif
224
224
225
    apr_table_addn(e, "SERVER_SIGNATURE", ap_psignature("", r));
225
    apr_table_addn(e, "SERVER_SIGNATURE", ap_psignature("", r));
226
    apr_table_addn(e, "SERVER_SOFTWARE", ap_get_server_version());
226
    apr_table_addn(e, "SERVER_SOFTWARE", ap_get_server_banner());
227
    apr_table_addn(e, "SERVER_NAME",
227
    apr_table_addn(e, "SERVER_NAME",
228
                   ap_escape_html(r->pool, ap_get_server_name(r)));
228
                   ap_escape_html(r->pool, ap_get_server_name(r)));
229
    apr_table_addn(e, "SERVER_ADDR", r->connection->local_ip);  /* Apache */
229
    apr_table_addn(e, "SERVER_ADDR", r->connection->local_ip);  /* Apache */
(-)server/mpm_common.c (-1 / +1 lines)
Lines 635-641 Link Here
635
     * requests in their logs.
635
     * requests in their logs.
636
     */
636
     */
637
    srequest = apr_pstrcat(p, "GET / HTTP/1.0\r\nUser-Agent: ",
637
    srequest = apr_pstrcat(p, "GET / HTTP/1.0\r\nUser-Agent: ",
638
                           ap_get_server_version(),
638
                           ap_get_server_banner(),
639
                           " (internal dummy connection)\r\n\r\n", NULL);
639
                           " (internal dummy connection)\r\n\r\n", NULL);
640
640
641
    /* Since some operating systems support buffering of data or entire
641
    /* Since some operating systems support buffering of data or entire
(-)server/main.c (-2 / +2 lines)
Lines 92-98 Link Here
92
92
93
static void show_compile_settings(void)
93
static void show_compile_settings(void)
94
{
94
{
95
    printf("Server version: %s\n", ap_get_server_version());
95
    printf("Server version: %s\n", ap_get_server_description());
96
    printf("Server built:   %s\n", ap_get_server_built());
96
    printf("Server built:   %s\n", ap_get_server_built());
97
    printf("Server's Module Magic Number: %u:%u\n",
97
    printf("Server's Module Magic Number: %u:%u\n",
98
           MODULE_MAGIC_NUMBER_MAJOR, MODULE_MAGIC_NUMBER_MINOR);
98
           MODULE_MAGIC_NUMBER_MAJOR, MODULE_MAGIC_NUMBER_MINOR);
Lines 569-575 Link Here
569
            break;
569
            break;
570
570
571
        case 'v':
571
        case 'v':
572
            printf("Server version: %s\n", ap_get_server_version());
572
            printf("Server version: %s\n", ap_get_server_description());
573
            printf("Server built:   %s\n", ap_get_server_built());
573
            printf("Server built:   %s\n", ap_get_server_built());
574
            destroy_and_exit_process(process, 0);
574
            destroy_and_exit_process(process, 0);
575
575
(-)modules/http/http_filters.c (-2 / +5 lines)
Lines 735-745 Link Here
735
        if (server) {
735
        if (server) {
736
            form_header_field(&h, "Server", server);
736
            form_header_field(&h, "Server", server);
737
        } else {
737
        } else {
738
            form_header_field(&h, "Server", ap_get_server_version());
738
            form_header_field(&h, "Server", ap_get_server_banner());
739
        }
739
        }
740
    }
740
    }
741
    else {
741
    else {
742
        form_header_field(&h, "Server", ap_get_server_version());
742
        char *server_version = ap_get_server_banner();
743
        if (server_version[0] != '\0') {
744
            form_header_field(&h, "Server", ap_get_server_banner());
745
        }
743
    }
746
    }
744
747
745
    /* unset so we don't send them again */
748
    /* unset so we don't send them again */
(-)modules/proxy/mod_proxy_balancer.c (-1 / +1 lines)
Lines 669-675 Link Here
669
        ap_rputs("<body><h1>Load Balancer Manager for ", r);
669
        ap_rputs("<body><h1>Load Balancer Manager for ", r);
670
        ap_rvputs(r, ap_get_server_name(r), "</h1>\n\n", NULL);
670
        ap_rvputs(r, ap_get_server_name(r), "</h1>\n\n", NULL);
671
        ap_rvputs(r, "<dl><dt>Server Version: ",
671
        ap_rvputs(r, "<dl><dt>Server Version: ",
672
                  ap_get_server_version(), "</dt>\n", NULL);
672
                  ap_get_server_banner(), "</dt>\n", NULL);
673
        ap_rvputs(r, "<dt>Server Built: ",
673
        ap_rvputs(r, "<dt>Server Built: ",
674
                  ap_get_server_built(), "\n</dt></dl>\n", NULL);
674
                  ap_get_server_built(), "\n</dt></dl>\n", NULL);
675
        balancer = (proxy_balancer *)conf->balancers->elts;
675
        balancer = (proxy_balancer *)conf->balancers->elts;
(-)modules/proxy/mod_proxy_connect.c (-3 / +3 lines)
Lines 224-230 Link Here
224
                  "CONNECT %s HTTP/1.0" CRLF, r->uri);
224
                  "CONNECT %s HTTP/1.0" CRLF, r->uri);
225
        apr_socket_send(sock, buffer, &nbytes);
225
        apr_socket_send(sock, buffer, &nbytes);
226
        nbytes = apr_snprintf(buffer, sizeof(buffer),
226
        nbytes = apr_snprintf(buffer, sizeof(buffer),
227
                  "Proxy-agent: %s" CRLF CRLF, ap_get_server_version());
227
                  "Proxy-agent: %s" CRLF CRLF, ap_get_server_banner());
228
        apr_socket_send(sock, buffer, &nbytes);
228
        apr_socket_send(sock, buffer, &nbytes);
229
    }
229
    }
230
    else {
230
    else {
Lines 235-241 Link Here
235
        ap_xlate_proto_to_ascii(buffer, nbytes);
235
        ap_xlate_proto_to_ascii(buffer, nbytes);
236
        apr_socket_send(client_socket, buffer, &nbytes);
236
        apr_socket_send(client_socket, buffer, &nbytes);
237
        nbytes = apr_snprintf(buffer, sizeof(buffer),
237
        nbytes = apr_snprintf(buffer, sizeof(buffer),
238
                  "Proxy-agent: %s" CRLF CRLF, ap_get_server_version());
238
                  "Proxy-agent: %s" CRLF CRLF, ap_get_server_banner());
239
        ap_xlate_proto_to_ascii(buffer, nbytes);
239
        ap_xlate_proto_to_ascii(buffer, nbytes);
240
        apr_socket_send(client_socket, buffer, &nbytes);
240
        apr_socket_send(client_socket, buffer, &nbytes);
241
#if 0
241
#if 0
Lines 244-250 Link Here
244
         */
244
         */
245
        r->status = HTTP_OK;
245
        r->status = HTTP_OK;
246
        r->header_only = 1;
246
        r->header_only = 1;
247
        apr_table_set(r->headers_out, "Proxy-agent: %s", ap_get_server_version());
247
        apr_table_set(r->headers_out, "Proxy-agent: %s", ap_get_server_banner());
248
        ap_rflush(r);
248
        ap_rflush(r);
249
#endif
249
#endif
250
    }
250
    }
(-)modules/proxy/mod_proxy_ftp.c (-1 / +1 lines)
Lines 1662-1668 Link Here
1662
1662
1663
    apr_rfc822_date(dates, r->request_time);
1663
    apr_rfc822_date(dates, r->request_time);
1664
    apr_table_setn(r->headers_out, "Date", dates);
1664
    apr_table_setn(r->headers_out, "Date", dates);
1665
    apr_table_setn(r->headers_out, "Server", ap_get_server_version());
1665
    apr_table_setn(r->headers_out, "Server", ap_get_server_banner());
1666
1666
1667
    /* set content-type */
1667
    /* set content-type */
1668
    if (dirlisting) {
1668
    if (dirlisting) {
(-)modules/experimental/mod_example.c (-1 / +1 lines)
Lines 546-552 Link Here
546
    ap_rputs("  </H1>\n", r);
546
    ap_rputs("  </H1>\n", r);
547
    ap_rputs("  <P>\n", r);
547
    ap_rputs("  <P>\n", r);
548
    ap_rprintf(r, "  Apache HTTP Server version: \"%s\"\n",
548
    ap_rprintf(r, "  Apache HTTP Server version: \"%s\"\n",
549
            ap_get_server_version());
549
            ap_get_server_banner());
550
    ap_rputs("  <BR>\n", r);
550
    ap_rputs("  <BR>\n", r);
551
    ap_rprintf(r, "  Server built: \"%s\"\n", ap_get_server_built());
551
    ap_rprintf(r, "  Server built: \"%s\"\n", ap_get_server_built());
552
    ap_rputs("  </P>\n", r);;
552
    ap_rputs("  </P>\n", r);;
(-)modules/ssl/ssl_engine_vars.c (-1 / +1 lines)
Lines 192-198 Link Here
192
        if (strlen(var) > 12 && strcEQn(var, "SSL_VERSION_", 12))
192
        if (strlen(var) > 12 && strcEQn(var, "SSL_VERSION_", 12))
193
            result = ssl_var_lookup_ssl_version(p, var+12);
193
            result = ssl_var_lookup_ssl_version(p, var+12);
194
        else if (strcEQ(var, "SERVER_SOFTWARE"))
194
        else if (strcEQ(var, "SERVER_SOFTWARE"))
195
            result = ap_get_server_version();
195
            result = ap_get_server_banner();
196
        else if (strcEQ(var, "API_VERSION")) {
196
        else if (strcEQ(var, "API_VERSION")) {
197
            result = apr_itoa(p, MODULE_MAGIC_NUMBER);
197
            result = apr_itoa(p, MODULE_MAGIC_NUMBER);
198
            resdup = FALSE;
198
            resdup = FALSE;
(-)modules/mappers/mod_rewrite.c (-1 / +1 lines)
Lines 2006-2012 Link Here
2006
2006
2007
            case 'S':
2007
            case 'S':
2008
                if (!strcmp(var, "SERVER_SOFTWARE")) {
2008
                if (!strcmp(var, "SERVER_SOFTWARE")) {
2009
                    result = ap_get_server_version();
2009
                    result = ap_get_server_banner();
2010
                }
2010
                }
2011
                break;
2011
                break;
2012
            }
2012
            }
(-)modules/generators/mod_status.c (-1 / +1 lines)
Lines 397-403 Link Here
397
        ap_rputs("<h1>Apache Server Status for ", r);
397
        ap_rputs("<h1>Apache Server Status for ", r);
398
        ap_rvputs(r, ap_get_server_name(r), "</h1>\n\n", NULL);
398
        ap_rvputs(r, ap_get_server_name(r), "</h1>\n\n", NULL);
399
        ap_rvputs(r, "<dl><dt>Server Version: ",
399
        ap_rvputs(r, "<dl><dt>Server Version: ",
400
                  ap_get_server_version(), "</dt>\n", NULL);
400
                  ap_get_server_banner(), "</dt>\n", NULL);
401
        ap_rvputs(r, "<dt>Server Built: ",
401
        ap_rvputs(r, "<dt>Server Built: ",
402
                  ap_get_server_built(), "\n</dt></dl><hr /><dl>\n", NULL);
402
                  ap_get_server_built(), "\n</dt></dl><hr /><dl>\n", NULL);
403
        ap_rvputs(r, "<dt>Current Time: ",
403
        ap_rvputs(r, "<dt>Current Time: ",
(-)modules/generators/mod_info.c (-1 / +1 lines)
Lines 347-353 Link Here
347
    ap_rprintf(r,
347
    ap_rprintf(r,
348
               "<dl><dt><strong>Server Version:</strong> "
348
               "<dl><dt><strong>Server Version:</strong> "
349
               "<font size=\"+1\"><tt>%s</tt></font></dt>\n",
349
               "<font size=\"+1\"><tt>%s</tt></font></dt>\n",
350
               ap_get_server_version());
350
               ap_get_server_banner());
351
    ap_rprintf(r,
351
    ap_rprintf(r,
352
               "<dt><strong>Server Built:</strong> "
352
               "<dt><strong>Server Built:</strong> "
353
               "<font size=\"+1\"><tt>%s</tt></font></dt>\n",
353
               "<font size=\"+1\"><tt>%s</tt></font></dt>\n",
(-)modules/arch/netware/mod_nw_ssl.c (-1 / +1 lines)
Lines 1074-1080 Link Here
1074
            /* XXX-Can't get specific SSL info from NetWare */
1074
            /* XXX-Can't get specific SSL info from NetWare */
1075
            /*result = ssl_var_lookup_ssl_version(p, var+12);*/
1075
            /*result = ssl_var_lookup_ssl_version(p, var+12);*/
1076
        else if (strcEQ(var, "SERVER_SOFTWARE"))
1076
        else if (strcEQ(var, "SERVER_SOFTWARE"))
1077
            result = ap_get_server_version();
1077
            result = ap_get_server_banner();
1078
        else if (strcEQ(var, "API_VERSION")) {
1078
        else if (strcEQ(var, "API_VERSION")) {
1079
            result = apr_itoa(p, MODULE_MAGIC_NUMBER);
1079
            result = apr_itoa(p, MODULE_MAGIC_NUMBER);
1080
            resdup = FALSE;
1080
            resdup = FALSE;
(-)include/httpd.h (-4 / +13 lines)
Lines 420-432 Link Here
420
AP_DECLARE(void) ap_get_server_revision(ap_version_t *version);
420
AP_DECLARE(void) ap_get_server_revision(ap_version_t *version);
421
421
422
/**
422
/**
423
 * Get the server version string
423
 * Get the server banner in a form suitable for sending over the
424
 * @return The server version string
424
 * network (as controlled by the ServerTokens directive).
425
 * @return The server banner
425
 */
426
 */
426
AP_DECLARE(const char *) ap_get_server_version(void);
427
AP_DECLARE(const char *) ap_get_server_banner(void);
427
428
428
/**
429
/**
429
 * Add a component to the version string
430
 * Get the server description in a form suitable for local displays
431
 * or logging.  This includes the detailed server version and
432
 * information about some modules.
433
 * @return The server description
434
 */
435
AP_DECLARE(const char *) ap_get_server_description(void);
436
437
/**
438
 * Add a component to the server description and banner strings
430
 * @param pconf The pool to allocate the component from
439
 * @param pconf The pool to allocate the component from
431
 * @param component The string to add
440
 * @param component The string to add
432
 */
441
 */

Return to bug 40026