]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add a new error page token for unquoted external ACL messages.
authorNathan Hoad <nathan@getoffmalawn.com>
Sun, 10 Apr 2016 04:31:51 +0000 (16:31 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 10 Apr 2016 04:31:51 +0000 (16:31 +1200)
This is useful for external ACLs that send back messages that contain
actual HTML.

This work is submitted on behalf of Bloomberg L.P.

src/cf.data.pre
src/errorpage.cc

index 4550c28217e55c11fef9c2c2b1f13b8fc7eb4f03..17327978865958202beb3e2209619efeb8792c31 100644 (file)
@@ -7967,6 +7967,7 @@ DOC_START
                %H      - Request domain name
                %i      - Client IP Address
                %M      - Request Method
+               %O      - Unescaped message result from external ACL helper
                %o      - Message result from external ACL helper
                %p      - Request Port number
                %P      - Request Protocol name
index 446b92b63581eab4b1c285821095131dfa6eac52..bf09a013005f4d928a843fbc02d074217cf71014 100644 (file)
@@ -927,6 +927,8 @@ ErrorState::Convert(char token, bool building_deny_info_url, bool allowRecursion
             p = "[unknown method]";
         break;
 
+    case 'O':
+        do_quote = 0;
     case 'o':
         p = request ? request->extacl_message.termedBuf() : external_acl_message;
         if (!p && !building_deny_info_url)