Mod Cplusplus CVS committal
Author : gr84b8
Project : mod_cplusplus
Module : example
Dir : mod_cplusplus/example/input_filter
Modified Files:
test_input.cpp
Log Message:
add in environ decoding, request streaming, and updated the test suite and exmaples (Submitted by: Nathan Stitt <na...@st...>)
===================================================================
RCS file: /cvsroot/modcplusplus/mod_cplusplus/example/input_filter/test_input.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- test_input.cpp 29 Mar 2002 23:12:58 -0000 1.10
+++ test_input.cpp 26 Apr 2002 18:57:00 -0000 1.11
@@ -21,7 +21,7 @@
apr_bucket *input_bucket;
apr_bucket *output_bucket;
-
+
apr_bucket_brigade *input_brigade =
apr_brigade_create(f->c->pool,
f->c->bucket_alloc);
@@ -32,21 +32,21 @@
}
while(!APR_BRIGADE_EMPTY(input_brigade)) {
input_bucket = APR_BRIGADE_FIRST(input_brigade);
- const char *data;
- apr_size_t len;
-
- if(APR_BUCKET_IS_EOS(input_bucket)) {
- APR_BUCKET_REMOVE(input_bucket);
- APR_BRIGADE_INSERT_TAIL(bb, input_bucket);
- break;
- }
-
+ const char *data;
+ apr_size_t len;
+
+ if(APR_BUCKET_IS_EOS(input_bucket)) {
+ APR_BUCKET_REMOVE(input_bucket);
+ APR_BRIGADE_INSERT_TAIL(bb, input_bucket);
+ break;
+ }
+
ret = apr_bucket_read(input_bucket, &data, &len, APR_BLOCK_READ);
char *new_buf = apr_pstrndup(f->c->pool, data, len);
if(ret != APR_SUCCESS) {
return ret;
}
- for(unsigned int n=0 ; n < len ; ++n) {
+ for(unsigned int n=0 ; n < len ; ++n) {
if(!strncmp(&data[n], "localhost", 9))
new_buf[n]=toupper(data[n]);
else
@@ -75,4 +75,3 @@
NULL,
NULL,
};
-
|