}
else if(!strcmp("chunk_size", arg)) {
chunk_size = (int)apr_atoi64(val);
- if(chunk_size >= 0) {
- if(chunk_size > sizeof(buffer)) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
- "chunk_size %zu too large", chunk_size);
- ap_die(HTTP_BAD_REQUEST, r);
- return OK;
- }
- continue;
+ if(chunk_size > sizeof(buffer)) {
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "chunk_size %zu too large", chunk_size);
+ ap_die(HTTP_BAD_REQUEST, r);
+ return OK;
}
+ continue;
}
else if(!strcmp("id", arg)) {
/* an id for repeated requests with curl's URL globbing */
/* Discourage content-encodings */
apr_table_unset(r->headers_out, "Content-Encoding");
if(x_hd_len > 0) {
- int i, hd_len = (16 * 1024);
+ int hd_len = (16 * 1024);
int n = (x_hd_len / hd_len);
char *hd_val = apr_palloc(r->pool, hd_len);
memset(hd_val, 'X', hd_len);
r->connection->keepalive = AP_CONN_CLOSE;
}
ap_log_rerror(APLOG_MARK, APLOG_TRACE1, rv, r,
- "error_handler: request cleanup, r->status=%d, aborted=%d, "
+ "error_handler: request cleanup, r->status=%d, aborted=%u, "
"close=%d", r->status, c->aborted, close_conn);
if(rv == APR_SUCCESS) {
return OK;
};
static struct curltest_limit_rec limitrec = {
- 0, 5, 0, 2
+ 0, 5, 0, 2, NULL
};
static int curltest_limit_handler(request_rec *r)
apr_table_setn(r->subprocess_env, "no-gzip", "1");
if(denied) {
- char *v = apr_psprintf(r->pool, "%d", limitrec.duration_sec);
+ char *v = apr_psprintf(r->pool, "%ld", limitrec.duration_sec);
apr_table_set(r->headers_out, "Retry-After", v);
}
{
void *data = NULL;
const char *key = "mod_curltest_init_counter";
- apr_status_t rv;
(void)p;
(void)plog;