Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-1827

minor improvement of combo_handler plugin

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.3.4
    • Plugins
    • None

    Description

      Based on TS-1053, I've made some minor improvements. Community can select the general ones to review.

      Changes: (separately pasted on pastebin temporally; may provide with commits later after TS-1053 is solved on git master):

      1. use HOST header as default bucket http://pastebin.com/pGHfLaHR
        Original code use the first segment of Host as the default bucket and it's not that expandable (two different combo domain may have same leading segment). Moreover, the initial default bucket("l") will not be used, because all requests should have a HOST.
      2. sub-file's path need to contain querystring, i.e. question mark("?") is part of the file path, not the delimiter http://pastebin.com/HvMJBQw0
        We use querystring to version each single sub-file in the combined url. If we want to update/purge one of them, it can be simply accomplished by changing the version of sub-file. (If not, you have to purge both the combined url and sub-file url which is relatively hard to know the latter one when you are not very familiar with ATS. Of course you can alter the filename if possible in your site.)
        Then the combo url could be like http://example.com/combo?file1?v=2012&file2?v=2013
      3. request hangs when combo url has no querystring http://pastebin.com/d34ZJDzQ
      4. make plugin per-remap enabled/disabled http://pastebin.com/YTaDYvh2
        It's implemented by adding some remap code and make global part "intercepted" in TS_EVENT_HTTP_OS_DNS instead of TS_EVENT_HTTP_READ_REQUEST_HDR in order to read the flag set in TSRemapDoRemap.
        So remap.config will be:
        map    http://example.com   http://os.example.com @plugin=combo_handler.so
        map    http://localhost/example.com   http://os.example.com
        map    http://other.com  http://os.other.com  # combo for this channel is disabled
        
      5. limit sub-file max count and querystring length for potential problems http://pastebin.com/cmBCuCNB
      6. log failed url http://pastebin.com/bNezeaz0

      They were tested on 3.0.x.

      Attachments

        1. TS-1827.diff
          8 kB
          Leif Hedstrom

        Issue Links

          Activity

            People

              zwoop Leif Hedstrom
              conanmind Conan Wang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: