summaryrefslogtreecommitdiffstats
path: root/debian/perl-framework/c-modules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/perl-framework/c-modules')
-rw-r--r--debian/perl-framework/c-modules/echo_post/mod_echo_post.c2
-rw-r--r--debian/perl-framework/c-modules/test_pass_brigade/mod_test_pass_brigade.c46
-rw-r--r--debian/perl-framework/c-modules/test_rwrite/mod_test_rwrite.c19
-rw-r--r--debian/perl-framework/c-modules/test_session/mod_test_session.c2
-rw-r--r--debian/perl-framework/c-modules/test_ssl/mod_test_ssl.c2
5 files changed, 44 insertions, 27 deletions
diff --git a/debian/perl-framework/c-modules/echo_post/mod_echo_post.c b/debian/perl-framework/c-modules/echo_post/mod_echo_post.c
index 0461735..ebda4d5 100644
--- a/debian/perl-framework/c-modules/echo_post/mod_echo_post.c
+++ b/debian/perl-framework/c-modules/echo_post/mod_echo_post.c
@@ -66,7 +66,7 @@ static int echo_post_handler(request_rec *r)
"[mod_echo_post] read %ld bytes (wanted %d, remaining=%ld)",
nrd, sizeof(buff), r->remaining);
#else
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
"[mod_echo_post] read %ld bytes (wanted %" APR_SIZE_T_FMT
", remaining=%" APR_OFF_T_FMT ")",
nrd, sizeof(buff), r->remaining);
diff --git a/debian/perl-framework/c-modules/test_pass_brigade/mod_test_pass_brigade.c b/debian/perl-framework/c-modules/test_pass_brigade/mod_test_pass_brigade.c
index 07a9fce..99bc95a 100644
--- a/debian/perl-framework/c-modules/test_pass_brigade/mod_test_pass_brigade.c
+++ b/debian/perl-framework/c-modules/test_pass_brigade/mod_test_pass_brigade.c
@@ -38,10 +38,10 @@ static int test_pass_brigade_handler(request_rec *r)
httpd_test_split_qs_numbers(r, &buff_size, &remaining, NULL);
- fprintf(stderr, "[mod_test_pass_brigade] "
- "going to echo %" APR_SIZE_T_FMT " bytes with "
- "buffer size=%" APR_SIZE_T_FMT "\n",
- remaining, buff_size);
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ "going to echo %" APR_SIZE_T_FMT " bytes with "
+ "buffer size=%" APR_SIZE_T_FMT "",
+ remaining, buff_size);
buff = malloc(buff_size);
memset(buff, 'a', buff_size);
@@ -50,35 +50,51 @@ static int test_pass_brigade_handler(request_rec *r)
while (total < remaining) {
int left = (remaining - total);
int len = left <= buff_size ? left : buff_size;
- apr_bucket *bucket = apr_bucket_heap_create(buff, len, NULL,
- c->bucket_alloc);
+ apr_bucket *bucket = apr_bucket_transient_create(buff, len,
+ c->bucket_alloc);
apr_status_t status;
apr_brigade_cleanup(bb);
APR_BRIGADE_INSERT_TAIL(bb, bucket);
+ if (len + total == remaining) {
+ bucket = apr_bucket_eos_create(c->bucket_alloc);
+ APR_BRIGADE_INSERT_TAIL(bb, bucket);
+
+#if 0
+ /* ###### A FLUSH should not be strictly necessary here
+ * but inserting one apears to work around intermittent
+ * failures when running t/apache/pass_brigade.t under
+ * worker. */
+ bucket = apr_bucket_flush_create(c->bucket_alloc);
+ APR_BRIGADE_INSERT_TAIL(bb, bucket);
+#endif
+
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ "[mod_test_pass_brigade] sending EOS");
+ }
status = ap_pass_brigade(r->output_filters->next, bb);
if (status != APR_SUCCESS) {
apr_brigade_destroy(bb);
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO,
- status, r->server,
- "[mod_test_pass_brigade] ap_pass_brigade failed");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ "[mod_test_pass_brigade] ap_pass_brigade failed");
free(buff);
return HTTP_INTERNAL_SERVER_ERROR;
}
total += len;
- fprintf(stderr, "[mod_test_pass_brigade] wrote %d of %d bytes\n",
- len, len);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
+ "[mod_test_pass_brigade] wrote %d of %d bytes",
+ len, len);
}
apr_brigade_destroy(bb);
- fprintf(stderr,
- "[mod_test_pass_brigade] done writing %" APR_SIZE_T_FMT
- " of %" APR_SIZE_T_FMT " bytes\n",
- total, remaining);
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ "[mod_test_pass_brigade] done writing %" APR_SIZE_T_FMT
+ " of %" APR_SIZE_T_FMT " bytes",
+ total, remaining);
free(buff);
return OK;
diff --git a/debian/perl-framework/c-modules/test_rwrite/mod_test_rwrite.c b/debian/perl-framework/c-modules/test_rwrite/mod_test_rwrite.c
index 5675edd..64f1542 100644
--- a/debian/perl-framework/c-modules/test_rwrite/mod_test_rwrite.c
+++ b/debian/perl-framework/c-modules/test_rwrite/mod_test_rwrite.c
@@ -36,8 +36,9 @@ static int test_rwrite_handler(request_rec *r)
httpd_test_split_qs_numbers(r, &buff_size, &remaining, NULL);
- fprintf(stderr, "[mod_test_rwrite] going to echo %" APR_SIZE_T_FMT " bytes\n",
- remaining);
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ "[mod_test_rwrite] going to echo %" APR_SIZE_T_FMT " bytes",
+ remaining);
buff = malloc(buff_size);
memset(buff, 'a', buff_size);
@@ -48,14 +49,14 @@ static int test_rwrite_handler(request_rec *r)
long nrd = ap_rwrite(buff, len, r);
total += nrd;
- fprintf(stderr, "[mod_test_rwrite] wrote %ld of %d bytes\n",
- nrd, len);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
+ "[mod_test_rwrite] wrote %ld of %d bytes", nrd, len);
}
-
- fprintf(stderr,
- "[mod_test_rwrite] done writing %" APR_SIZE_T_FMT
- " of %" APR_SIZE_T_FMT " bytes\n",
- total, remaining);
+
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ "[mod_test_rwrite] done writing %" APR_SIZE_T_FMT
+ " of %" APR_SIZE_T_FMT " bytes",
+ total, remaining);
free(buff);
return OK;
diff --git a/debian/perl-framework/c-modules/test_session/mod_test_session.c b/debian/perl-framework/c-modules/test_session/mod_test_session.c
index c9e0ea2..4099cbe 100644
--- a/debian/perl-framework/c-modules/test_session/mod_test_session.c
+++ b/debian/perl-framework/c-modules/test_session/mod_test_session.c
@@ -34,7 +34,7 @@
SessionMaxAge 100
</Location>
<IfModule mod_version.c>
- <IfVersion >= 2.5.0>
+ <IfVersion >= 2.4.41>
<Location /sessiontest/on/expire/cache>
SessionExpiryUpdateInterval 50
</Location>
diff --git a/debian/perl-framework/c-modules/test_ssl/mod_test_ssl.c b/debian/perl-framework/c-modules/test_ssl/mod_test_ssl.c
index a7177a1..c9bc762 100644
--- a/debian/perl-framework/c-modules/test_ssl/mod_test_ssl.c
+++ b/debian/perl-framework/c-modules/test_ssl/mod_test_ssl.c
@@ -114,7 +114,7 @@ static int test_ssl_ext_lookup(request_rec *r)
static int test_ssl_var_lookup(request_rec *r)
{
- char *value;
+ const char *value;
if (strcmp(r->handler, "test-ssl-var-lookup")) {
return DECLINED;