int i, j, len, rc;
int one = 1;
char *size = NULL;
- apr_size_t remain = -1;
+ apr_size_t readbytes = -1;
/* stuff for PASV mode */
int connect = 0, use_port = 0;
"proxy: FTP: start body send");
/* read the body, pass it to the output filters */
- while (ap_get_brigade(remote->input_filters, bb, AP_MODE_BLOCKING, &remain) == APR_SUCCESS) {
+ while (ap_get_brigade(remote->input_filters, bb, AP_MODE_BLOCKING, &readbytes) == APR_SUCCESS) {
if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
e = apr_bucket_flush_create();
APR_BRIGADE_INSERT_TAIL(bb, e);
/* send body */
if (!r->header_only) {
const char *buf;
- apr_size_t remain;
+ apr_size_t readbytes;
/* if chunked - insert DECHUNK filter */
if (ap_proxy_liststr((buf = apr_table_get(r->headers_out, "Transfer-Encoding")), "chunked")) {
apr_table_set(r->headers_out, "Transfer-Encoding", buf);
}
ap_add_input_filter("DECHUNK", NULL, rp, origin);
- remain = -1;
+ readbytes = -1;
}
/* if content length - set the length to read */
else if ((buf = apr_table_get(r->headers_out, "Content-Length"))) {
- remain = atol(buf);
+ readbytes = atol(buf);
}
/* no chunked / no length therefore read till EOF and cancel keepalive */
/* if keepalive cancelled, read to EOF */
if (close) {
- remain = -1;
+ readbytes = -1;
}
ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
"proxy: start body send");
/* read the body, pass it to the output filters */
- while (ap_get_brigade(rp->input_filters, bb, AP_MODE_BLOCKING, &remain) == APR_SUCCESS) {
+ while (ap_get_brigade(rp->input_filters, bb, AP_MODE_BLOCKING, &readbytes) == APR_SUCCESS) {
if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
e = apr_bucket_flush_create();
APR_BRIGADE_INSERT_TAIL(bb, e);
{
apr_bucket *e;
apr_status_t rv;
- apr_size_t zero = 0;
+ apr_size_t readbytes = 0; /* line-at-a-time */
char *pos = buff;
char *response;
int found = 0;
- size_t len;
+ apr_size_t len;
/* start with an empty string */
buff[0] = 0;
while (!found) {
/* get brigade from network one line at a time */
- if (APR_SUCCESS != (rv = ap_get_brigade(c->input_filters, bb, AP_MODE_BLOCKING, &zero))) {
+ if (APR_SUCCESS != (rv = ap_get_brigade(c->input_filters, bb, AP_MODE_BLOCKING, &readbytes))) {
return rv;
}