Lines 380-398
Link Here
|
380 |
apr_bucket *bucket_request; |
380 |
apr_bucket *bucket_request; |
381 |
apr_status_t rv; |
381 |
apr_status_t rv; |
382 |
DWORD transferred; |
382 |
DWORD transferred; |
|
|
383 |
apr_bucket_brigade* tmpbb = apr_brigade_create(birgade_send->p, |
384 |
birgade_send->bucket_alloc); |
383 |
|
385 |
|
384 |
handle_info = (fcgid_namedpipe_handle *) ipc_handle->ipc_handle_info; |
386 |
handle_info = (fcgid_namedpipe_handle *) ipc_handle->ipc_handle_info; |
385 |
|
387 |
|
386 |
for (bucket_request = APR_BRIGADE_FIRST(birgade_send); |
388 |
while (!APR_BRIGADE_EMPTY(birgade_send)) { |
387 |
bucket_request != APR_BRIGADE_SENTINEL(birgade_send); |
|
|
388 |
bucket_request = APR_BUCKET_NEXT(bucket_request)) |
389 |
{ |
390 |
const char *write_buf; |
389 |
const char *write_buf; |
391 |
apr_size_t write_buf_len; |
390 |
apr_size_t write_buf_len; |
392 |
apr_size_t has_write; |
391 |
apr_size_t has_write; |
393 |
|
392 |
|
394 |
if (APR_BUCKET_IS_METADATA(bucket_request)) |
393 |
bucket_request = APR_BRIGADE_FIRST(birgade_send); |
|
|
394 |
|
395 |
if (APR_BUCKET_IS_METADATA(bucket_request)) { |
396 |
apr_bucket_delete(bucket_request); |
395 |
continue; |
397 |
continue; |
|
|
398 |
} |
396 |
|
399 |
|
397 |
if ((rv = apr_bucket_read(bucket_request, &write_buf, &write_buf_len, |
400 |
if ((rv = apr_bucket_read(bucket_request, &write_buf, &write_buf_len, |
398 |
APR_BLOCK_READ)) != APR_SUCCESS) { |
401 |
APR_BLOCK_READ)) != APR_SUCCESS) { |
Lines 401-406
Link Here
|
401 |
return rv; |
404 |
return rv; |
402 |
} |
405 |
} |
403 |
|
406 |
|
|
|
407 |
APR_BUCKET_REMOVE(bucket_request); |
408 |
APR_BRIGADE_INSERT_TAIL(tmpbb, bucket_request); |
409 |
|
404 |
/* Write the buffer to fastcgi server */ |
410 |
/* Write the buffer to fastcgi server */ |
405 |
has_write = 0; |
411 |
has_write = 0; |
406 |
while (has_write < write_buf_len) { |
412 |
while (has_write < write_buf_len) { |
Lines 411-416
Link Here
|
411 |
write_buf_len - has_write, |
417 |
write_buf_len - has_write, |
412 |
&byteswrite, &handle_info->overlap_write)) { |
418 |
&byteswrite, &handle_info->overlap_write)) { |
413 |
has_write += byteswrite; |
419 |
has_write += byteswrite; |
|
|
420 |
apr_brigade_cleanup(tmpbb); |
414 |
continue; |
421 |
continue; |
415 |
} else if ((rv = GetLastError()) != ERROR_IO_PENDING) { |
422 |
} else if ((rv = GetLastError()) != ERROR_IO_PENDING) { |
416 |
ap_log_rerror(APLOG_MARK, APLOG_WARNING, |
423 |
ap_log_rerror(APLOG_MARK, APLOG_WARNING, |
Lines 437-442
Link Here
|
437 |
return APR_ESPIPE; |
444 |
return APR_ESPIPE; |
438 |
} |
445 |
} |
439 |
has_write += transferred; |
446 |
has_write += transferred; |
|
|
447 |
apr_brigade_cleanup(tmpbb); |
440 |
continue; |
448 |
continue; |
441 |
} else { |
449 |
} else { |
442 |
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, |
450 |
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, |
Lines 448-453
Link Here
|
448 |
} |
456 |
} |
449 |
} |
457 |
} |
450 |
|
458 |
|
|
|
459 |
apr_brigade_destroy(tmpbb); |
451 |
return APR_SUCCESS; |
460 |
return APR_SUCCESS; |
452 |
} |
461 |
} |
453 |
|
462 |
|