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

(-)ab.c.org (-9 / +16 lines)
Lines 95-101 Link Here
95
 * ab - or to due to a change in the distribution it is compiled with
95
 * ab - or to due to a change in the distribution it is compiled with
96
 * (such as an APR change in for example blocking).
96
 * (such as an APR change in for example blocking).
97
 */
97
 */
98
#define AP_AB_BASEREVISION "2.3"
98
#define AP_AB_BASEREVISION "2.4"
99
99
100
/*
100
/*
101
 * BUGS:
101
 * BUGS:
Lines 1186-1195 Link Here
1186
    apr_err("socket", rv);
1186
    apr_err("socket", rv);
1187
    }
1187
    }
1188
1188
1189
    if ((rv = apr_socket_bind(c->aprsock, mysa)) != APR_SUCCESS) {
1190
        apr_err("bind", rv);
1191
    }
1192
1193
    c->pollfd.desc_type = APR_POLL_SOCKET;
1189
    c->pollfd.desc_type = APR_POLL_SOCKET;
1194
    c->pollfd.desc.s = c->aprsock;
1190
    c->pollfd.desc.s = c->aprsock;
1195
    c->pollfd.reqevents = 0;
1191
    c->pollfd.reqevents = 0;
Lines 1338-1344 Link Here
1338
    if (c->ssl) {
1334
    if (c->ssl) {
1339
        status = SSL_read(c->ssl, buffer, r);
1335
        status = SSL_read(c->ssl, buffer, r);
1340
        if (status <= 0) {
1336
        if (status <= 0) {
1341
            int scode = SSL_get_error(c->ssl, status);
1337
            int scode = (status == 0 ? SSL_ERROR_ZERO_RETURN : SSL_get_error(c->ssl, status));
1342
1338
1343
            if (scode == SSL_ERROR_ZERO_RETURN) {
1339
            if (scode == SSL_ERROR_ZERO_RETURN) {
1344
                /* connection closed cleanly: */
1340
                /* connection closed cleanly: */
Lines 1611-1617 Link Here
1611
1607
1612
    if (!opt_useragent) {
1608
    if (!opt_useragent) {
1613
        /* User-Agent: header not overridden, add default value to hdrs */
1609
        /* User-Agent: header not overridden, add default value to hdrs */
1614
        hdrs = apr_pstrcat(cntxt, hdrs, "User-Agent: ApacheBench/", AP_AB_BASEREVISION, "\r\n", NULL);
1610
        hdrs = apr_pstrcat(cntxt, hdrs, "User-Agent: ApacheBench/", AP_AB_BASEREVISION,
1611
#ifdef USE_SSL
1612
            " (", SSLeay_version(SSLEAY_VERSION), ")",
1613
#endif
1614
            "\r\n", NULL);
1615
    }
1615
    }
1616
    else {
1616
    else {
1617
        /* Header overridden, no need to add, as it is already in hdrs */
1617
        /* Header overridden, no need to add, as it is already in hdrs */
Lines 1824-1838 Link Here
1824
/* display copyright information */
1824
/* display copyright information */
1825
static void copyright(void)
1825
static void copyright(void)
1826
{
1826
{
1827
#ifdef USE_SSL
1828
    char verstr[256];
1829
    sprintf(verstr, "%s (%s)",
1830
        AP_AB_BASEREVISION, SSLeay_version(SSLEAY_VERSION));
1831
#else
1832
    char *verstr = AP_AB_BASEREVISION;
1833
#endif
1827
    if (!use_html) {
1834
    if (!use_html) {
1828
        printf("This is ApacheBench, Version %s\n", AP_AB_BASEREVISION " <$Revision: 1178079 $>");
1835
        printf("This is ApacheBench, Version %s\n", verstr);
1829
        printf("Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
1836
        printf("Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
1830
        printf("Licensed to The Apache Software Foundation, http://www.apache.org/\n");
1837
        printf("Licensed to The Apache Software Foundation, http://www.apache.org/\n");
1831
        printf("\n");
1838
        printf("\n");
1832
    }
1839
    }
1833
    else {
1840
    else {
1834
        printf("<p>\n");
1841
        printf("<p>\n");
1835
        printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i><br>\n", AP_AB_BASEREVISION, "$Revision: 1178079 $");
1842
        printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i><br>\n", verstr);
1836
        printf(" Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
1843
        printf(" Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
1837
        printf(" Licensed to The Apache Software Foundation, http://www.apache.org/<br>\n");
1844
        printf(" Licensed to The Apache Software Foundation, http://www.apache.org/<br>\n");
1838
        printf("</p>\n<p>\n");
1845
        printf("</p>\n<p>\n");

Return to bug 49382