apr_pool_t *pool;
r = f->r;
- DBG(f->r, "REQ[%X] start of chxj_output_filter()", (unsigned int)(apr_size_t)r);
+ DBG(f->r, "REQ[%X] start of %s()", TO_ADDR(r), __func__);
rv = APR_SUCCESS;
apr_pool_create(&pool, r->pool);
s_add_no_cache_headers(r, entryp);
/* must not send body. */
rv = pass_data_to_filter(f, "", 0);
- DBG(f->r, "REQ[%X] end of chxj_output_filter()", TO_ADDR(r));
+ chxj_specified_cleanup(r);
+ DBG(f->r, "REQ[%X] end of %s()", TO_ADDR(r),__func__);
return rv;
}
|| STRCASEEQ('x','X',"x-png", &r->content_type[6]) /* PNG */
|| STRCASEEQ('g','G',"gif", &r->content_type[6])))) { /* GIF */
- DBG(r, "REQ[%X] not convert content-type:[%s] dconf->image:[%d]", (unsigned int)(apr_size_t)r, r->content_type, dconf->image);
+ DBG(r, "REQ[%X] not convert content-type:[%s] dconf->image:[%d]", TO_ADDR(r), r->content_type, dconf->image);
if (entryp->action & CONVRULE_COOKIE_ON_BIT) {
cookie_lock_t *lock = NULL;
- DBG(r, "REQ[%X] entryp->action == COOKIE_ON_BIT", (unsigned int)(apr_size_t)r);
+ DBG(r, "REQ[%X] entryp->action == COOKIE_ON_BIT", TO_ADDR(r));
switch(spec->html_spec_type) {
case CHXJ_SPEC_Chtml_1_0:
case CHXJ_SPEC_Chtml_2_0:
}
s_add_no_cache_headers(r, entryp);
ap_pass_brigade(f->next, bb);
- DBG(f->r, "REQ[%X] end of chxj_output_filter()", (unsigned int)(apr_size_t)r);
+ chxj_specified_cleanup(r);
+ DBG(f->r, "REQ[%X] end %s()", TO_ADDR(r),__func__);
return APR_SUCCESS;
}
}
else {
- DBG(r, "REQ[%X] not convert content-type:[(null)]", (unsigned int)(apr_size_t)r);
+ DBG(r, "REQ[%X] not convert content-type:[(null)]", TO_ADDR(r));
ap_pass_brigade(f->next, bb);
- DBG(f->r, "REQ[%X] end of chxj_output_filter()", (unsigned int)(apr_size_t)r);
+ chxj_specified_cleanup(r);
+ DBG(f->r, "REQ[%X] end %s()", TO_ADDR(r),__func__);
return APR_SUCCESS;
}
b = APR_BUCKET_NEXT(b)) {
if (apr_bucket_read(b, &data, &len, APR_BLOCK_READ) == APR_SUCCESS) {
- DBG(r, "REQ[%X] read data[%.*s]",(unsigned int)(apr_size_t)r, (int)len, data);
+ DBG(r, "REQ[%X] read data[%.*s]",TO_ADDR(r), (int)len, data);
/*--------------------------------------------------------------------*/
/* append data */
/*--------------------------------------------------------------------*/
char *tmp;
- DBG(r, "append data start");
+ DBG(r, "REQ[%X] append data start", TO_ADDR(r));
ctx = (mod_chxj_ctx *)f->ctx;
if (len > 0) {
ctx->len += len;
}
- DBG(r, "REQ[%X] append data end", (unsigned int)(apr_size_t)r);
+ DBG(r, "REQ[%X] append data end", TO_ADDR(r));
}
if (APR_BUCKET_IS_EOS(b)) {
- DBG(r, "REQ[%X] eos", (unsigned int)(apr_size_t)r);
+ DBG(r, "REQ[%X] eos", TO_ADDR(r));
/*----------------------------------------------------------------------*/
/* End Of File */
/*----------------------------------------------------------------------*/
cookie_lock_t *lock = NULL;
ctx = (mod_chxj_ctx *)f->ctx;
- DBG(r, "REQ[%X] content_type=[%s]", (unsigned int)(apr_size_t)r, r->content_type);
+ DBG(r, "REQ[%X] content_type=[%s]", TO_ADDR(r), r->content_type);
lock = chxj_cookie_lock(r);
if (spec->html_spec_type != CHXJ_SPEC_UNKNOWN
&& r->content_type
&& (STRNCASEEQ('a','A',"application/xhtml+xml", r->content_type, sizeof("application/xhtml+xml")-1)
|| STRNCASEEQ('t','T',"text/html", r->content_type, sizeof("text/html")-1))) {
- DBG(r, "REQ[%X] detect convert target:[%s]", (unsigned int)(apr_size_t)r, r->content_type);
+ DBG(r, "REQ[%X] detect convert target:[%s]", TO_ADDR(r), r->content_type);
if (ctx->len) {
char *tmp;
if (r->content_type
&& *(char *)r->content_type == 't'
&& strncmp(r->content_type, "text/xml", 8) == 0) {
- DBG(r, "REQ[%X] text/XML", (unsigned int)(apr_size_t)r);
+ DBG(r, "REQ[%X] text/XML", TO_ADDR(r));
Doc doc;
Node *root;
chxj_qrcode_node_to_qrcode(&qrcode, root);
sts = chxj_qrcode_create_image_data(&qrcode, &ctx->buffer, &ctx->len);
if (sts != OK) {
- ERR(r, "REQ[%X] qrcode create failed.", (unsigned int)(apr_size_t)r);
+ ERR(r, "REQ[%X] qrcode create failed.", TO_ADDR(r));
chxj_cookie_unlock(r, lock);
- DBG(f->r, "REQ[%X] end of chxj_output_filter()", (unsigned int)(apr_size_t)r);
+ chxj_specified_cleanup(r);
+ DBG(f->r, "REQ[%X] end %s()", TO_ADDR(r),__func__);
return sts;
}
r->content_type = apr_psprintf(r->pool, "image/jpeg");
|| STRCASEEQ('x','X',"x-jpeg2000-image",&r->content_type[6]) /* JPEG2000 */
|| STRCASEEQ('p','P',"png", &r->content_type[6]) /* PNG */
|| STRCASEEQ('x','X',"x-png", &r->content_type[6]) /* PNG */
- || STRCASEEQ('x','X',"x-ms-bmp", &r->content_type[6]) /* BMP */
+ || STRCASEEQ('x','X',"x-ms-bmp", &r->content_type[6]) /* BMP */
|| STRCASEEQ('g','G',"gif", &r->content_type[6]))) { /* GIF */
- DBG(r, "REQ[%X] detect convert target:[%s]", (unsigned int)(apr_size_t)r, r->content_type);
+ DBG(r, "REQ[%X] detect convert target:[%s]", TO_ADDR(r), r->content_type);
if (ctx->len) {
char *tmp;
- DBG(r, "REQ[%X] ctx->len[%ld]", (unsigned int)(apr_size_t)r, ctx->len);
+ DBG(r, "REQ[%X] ctx->len[%ld]", TO_ADDR(r), ctx->len);
tmp = apr_palloc(pool, ctx->len + 1);
memset(tmp, 0, ctx->len + 1);
if (ctx->len > 0) {
- DBG(r, "REQ[%X] call pass_data_to_filter()", (unsigned int)(apr_size_t)r);
s_add_cookie_id_if_has_location_header(r, cookie);
if (apr_table_get(r->headers_out, "Location") || apr_table_get(r->err_headers_out, "Location")) {
if (! ap_is_HTTP_REDIRECT(r->status)) {
(const char *)ctx->buffer,
(apr_size_t)ctx->len);
}
- DBG(f->r, "REQ[%X] end of chxj_output_filter()", (unsigned int)(apr_size_t)r);
+ chxj_specified_cleanup(r);
+ DBG(f->r, "REQ[%X] end %s()", TO_ADDR(r),__func__);
return rv;
}
else {
- DBG(r, "REQ[%X] SAVE COOKIE[%x]", (unsigned int)(apr_size_t)r, entryp->action);
+ DBG(r, "REQ[%X] SAVE COOKIE[%x]", TO_ADDR(r), entryp->action);
/*
* save cookie.
*/
if (entryp->action & CONVRULE_COOKIE_ON_BIT) {
cookie_lock_t *lock = NULL;
- DBG(r, "REQ[%X] entryp->action == COOKIE_ON_BIT", (unsigned int)(apr_size_t)r);
+ DBG(r, "REQ[%X] entryp->action == COOKIE_ON_BIT", TO_ADDR(r));
switch(spec->html_spec_type) {
case CHXJ_SPEC_Chtml_1_0:
case CHXJ_SPEC_Chtml_2_0:
}
}
apr_table_setn(r->headers_out, "Content-Length", "0");
- DBG(r, "REQ[%X] call pass_data_to_filter()", (unsigned int)(apr_size_t)r);
s_add_no_cache_headers(r, entryp);
rv = pass_data_to_filter(f, (const char *)"", (apr_size_t)0);
- DBG(f->r, "REQ[%X] end of chxj_output_filter()", (unsigned int)(apr_size_t)r);
+ chxj_specified_cleanup(r);
+ DBG(f->r, "REQ[%X] end %s()", TO_ADDR(r), __func__);
return rv;
}
}
}
apr_brigade_destroy(bb);
- DBG(f->r, "REQ[%X] end of chxj_output_filter()", (unsigned int)(apr_size_t)r);
+ chxj_specified_cleanup(r);
+ DBG(f->r, "REQ[%X] end %s()", TO_ADDR(r), __func__);
return APR_SUCCESS;
}