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

(-)support/ab.c (-8 / +6 lines)
Lines 282-303 Link Here
282
char *hostname;         /* host name from URL */
282
char *hostname;         /* host name from URL */
283
const char *host_field;       /* value of "Host:" header field */
283
const char *host_field;       /* value of "Host:" header field */
284
const char *path;             /* path name */
284
const char *path;             /* path name */
285
char postfile[1024];    /* name of file containing post data */
286
char *postdata;         /* *buffer containing data from postfile */
285
char *postdata;         /* *buffer containing data from postfile */
287
apr_size_t postlen = 0; /* length of data to be POSTed */
286
apr_size_t postlen = 0; /* length of data to be POSTed */
288
char content_type[1024];/* content type to put in POST header */
287
char *content_type = NULL;     /* content type to put in POST header */
289
const char *cookie,           /* optional cookie line */
288
const char *cookie,           /* optional cookie line */
290
           *auth,             /* optional (basic/uuencoded) auhentication */
289
           *auth,             /* optional (basic/uuencoded) auhentication */
291
           *hdrs;             /* optional arbitrary headers */
290
           *hdrs;             /* optional arbitrary headers */
292
apr_port_t port;        /* port number */
291
apr_port_t port;        /* port number */
293
char proxyhost[1024];   /* proxy host name */
292
char *proxyhost = NULL; /* proxy host name */
294
int proxyport = 0;      /* proxy port */
293
int proxyport = 0;      /* proxy port */
295
const char *connecthost;
294
const char *connecthost;
296
const char *myhost;
295
const char *myhost;
297
apr_port_t connectport;
296
apr_port_t connectport;
298
const char *gnuplot;          /* GNUplot file */
297
const char *gnuplot;          /* GNUplot file */
299
const char *csvperc;          /* CSV Percentile file */
298
const char *csvperc;          /* CSV Percentile file */
300
char url[1024];
301
const char *fullurl;
299
const char *fullurl;
302
const char *colonhost;
300
const char *colonhost;
303
int isproxy = 0;
301
int isproxy = 0;
Lines 1679-1685 Link Here
1679
            keepalive ? "Connection: Keep-Alive\r\n" : "",
1677
            keepalive ? "Connection: Keep-Alive\r\n" : "",
1680
            cookie, auth,
1678
            cookie, auth,
1681
            postlen,
1679
            postlen,
1682
            (content_type[0]) ? content_type : "text/plain", hdrs);
1680
            (content_type != NULL) ? content_type : "text/plain", hdrs);
1683
    }
1681
    }
1684
    if (snprintf_res >= sizeof(_request)) {
1682
    if (snprintf_res >= sizeof(_request)) {
1685
        err("Request too long\n");
1683
        err("Request too long\n");
Lines 2073-2079 Link Here
2073
    tdstring = "bgcolor=white";
2071
    tdstring = "bgcolor=white";
2074
    cookie = "";
2072
    cookie = "";
2075
    auth = "";
2073
    auth = "";
2076
    proxyhost[0] = '\0';
2074
    proxyhost = "";
2077
    hdrs = "";
2075
    hdrs = "";
2078
2076
2079
    apr_app_initialize(&argc, &argv, NULL);
2077
    apr_app_initialize(&argc, &argv, NULL);
Lines 2178-2184 Link Here
2178
                                             * something */
2176
                                             * something */
2179
                break;
2177
                break;
2180
            case 'T':
2178
            case 'T':
2181
                strcpy(content_type, opt_arg);
2179
                content_type = apr_pstrdup(cntxt, opt_arg);
2182
                break;
2180
                break;
2183
            case 'C':
2181
            case 'C':
2184
                cookie = apr_pstrcat(cntxt, "Cookie: ", opt_arg, "\r\n", NULL);
2182
                cookie = apr_pstrcat(cntxt, "Cookie: ", opt_arg, "\r\n", NULL);
Lines 2249-2255 Link Here
2249
                        p++;
2247
                        p++;
2250
                        proxyport = atoi(p);
2248
                        proxyport = atoi(p);
2251
                    }
2249
                    }
2252
                    strcpy(proxyhost, opt_arg);
2250
                    proxyhost = apr_pstrdup(cntxt, opt_arg);
2253
                    isproxy = 1;
2251
                    isproxy = 1;
2254
                }
2252
                }
2255
                break;
2253
                break;

Return to bug 55360