diff options
-rw-r--r-- | mod_intercept_form_submit.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mod_intercept_form_submit.c b/mod_intercept_form_submit.c index b95d1ec..542cc35 100644 --- a/mod_intercept_form_submit.c +++ b/mod_intercept_form_submit.c @@ -301,7 +301,12 @@ void intercept_form_submit_filter_prefetch(request_rec * r, ifs_config * config, if (! fetch_more) break; if (nbytes > 0) { - if (APR_BUCKET_NEXT(b) && APR_BUCKET_IS_EOS(APR_BUCKET_NEXT(b))) { + if (fragment) { + int new_length = fragment_length + nbytes; + fragment = realloc(fragment, new_length); + memcpy(fragment + fragment_length, p, nbytes); + fragment_length = new_length; + } else if (APR_BUCKET_NEXT(b) && APR_BUCKET_IS_EOS(APR_BUCKET_NEXT(b))) { /* shortcut if this is the last bucket, slurp the rest */ intercept_form_submit_process_buffer(r, config, &login_value, &password_value, p, nbytes); fetch_more = 0; |