diff options
author | Jan Pazdziora <jpazdziora@redhat.com> | 2013-11-19 12:41:35 +0800 |
---|---|---|
committer | Jan Pazdziora <jpazdziora@redhat.com> | 2013-11-19 13:06:43 +0800 |
commit | f69d399d15b3a6928e1fee278b45e36a0871f551 (patch) | |
tree | e4efa63cc06b6bac148dc53b80052a9816414b80 | |
parent | 4d27bb9e099dc0becbd7eeb20f950a5969db6272 (diff) | |
download | mod_intercept_form_submit-f69d399d15b3a6928e1fee278b45e36a0871f551.tar.gz mod_intercept_form_submit-f69d399d15b3a6928e1fee278b45e36a0871f551.tar.xz mod_intercept_form_submit-f69d399d15b3a6928e1fee278b45e36a0871f551.zip |
If there was no & in the bucket, the whole bucket might be continuation of the previous fragment.
-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; |