3 Replies Latest reply: Feb 6, 2013 6:46 PM by eelsasser RSS

    Template file format - HTML vs TXT


      Hi folks,


      In the template editor (MWG 7.2) I see that many of the default block pages have both HTML and TXT versions of the blockpage.  Under what circumstances does the TXT version get sent to the user?  Is there an option or method to force which is selected in the rule that triggers the block?


      I looked in the docs, the online help, and here on the community but couldn't find anything on it.


      MANY thanks!



        • 1. Re: Template file format - HTML vs TXT

          the only time I've seen a txt template used is on command-line FTP proxy.

          all other templates I've even seen used are HTML in the browser.

          • 2. Re: Template file format - HTML vs TXT

            How about if I want the response to be text only?  Will leaving out the HTML version force the TXT version to be displayed?


            I ask because I'm looking to modify your CheckUrl "blockpage" so I can hit it via a bash script.  I'd like to run a bunch of known-malicious domain names through the script and (I think) getting a TXT response will be easier/more efficient to parse than HTML.  Maybe not, but I figured I'd run the TXT issue to ground before starting the HTML.


            The goal is to augment the MWG list of blocked domains with a paid list of known-malicious domains/IPs.  So they'll get pulled down, checked against the modified CheckURL, and only items that MWG doesn't know about will get included in a rule as a subscribed list (thus reducing duplication - if MWG already knows something is bad then don't spend CPU cycles rechecking it.)


            If/when I get this working I'll post my code (so long as that's kosher with everyone.)

            • 3. Re: Template file format - HTML vs TXT

              if the request going in is thru http, then the output will be an HTML template.

              But there's nothing that says the .htm file itself actually has to have any HTML code in it.

              You can always create a new schema or use an unused language code and just put text into them.