From f69d399d15b3a6928e1fee278b45e36a0871f551 Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Tue, 19 Nov 2013 12:41:35 +0800 Subject: If there was no & in the bucket, the whole bucket might be continuation of the previous fragment. --- mod_intercept_form_submit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; -- cgit