Conan Wang created TS-1827:
------------------------------
Summary: minor improvement of combo_handler plugin
Key: TS-1827
URL: https://issues.apache.org/jira/browse/TS-1827
Project: Traffic Server
Issue Type: Improvement
Components: Plugins
Reporter: Conan Wang
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):
# 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.
# 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
# request hangs when combo url has no querystring http://pastebin.com/d34ZJDzQ
# 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: {code}
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
{code}
# limit sub-file max count and querystring length for potential problems
http://pastebin.com/cmBCuCNB
# log failed url http://pastebin.com/bNezeaz0
They were tested on 3.0.x.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira