]> granicus.if.org Git - apache/commitdiff
follow up r1599012:
authorTakashi Sato <takashi@apache.org>
Tue, 10 Jun 2014 07:07:36 +0000 (07:07 +0000)
committerTakashi Sato <takashi@apache.org>
Tue, 10 Jun 2014 07:07:36 +0000 (07:07 +0000)
C99 fix

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601559 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_proxy_html.c

index dcd4b1a5b29eac7dd32f124b68cf0628b1ecedb8..f760829287cb597b5c37b42108751fd8b83ebd3e 100644 (file)
@@ -918,6 +918,8 @@ static apr_status_t proxy_html_filter(ap_filter_t *f, apr_bucket_brigade *bb)
         else if (apr_bucket_read(b, &buf, &bytes, APR_BLOCK_READ)
                  == APR_SUCCESS) {
             if (ctxt->parser == NULL) {
+                const char *cenc;
+
                 /* For documents smaller than four bytes, there is no reason to do
                  * HTML rewriting. The URL schema (i.e. 'http') needs four bytes alone.
                  * And the HTML parser needs at least four bytes to initialise correctly.
@@ -927,7 +929,6 @@ static apr_status_t proxy_html_filter(ap_filter_t *f, apr_bucket_brigade *bb)
                     return ap_pass_brigade(f->next, bb) ;
                 }
 
-                const char *cenc;
                 if (!xml2enc_charset ||
                     (xml2enc_charset(f->r, &enc, &cenc) != APR_SUCCESS)) {
                     if (!xml2enc_charset)