[ 
https://issues.apache.org/jira/browse/TS-1053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13630988#comment-13630988
 ] 

Conan Wang commented on TS-1053:
--------------------------------

Sorry, I miss your comments.  +1 for combination.

I've made some changes after those old attachments. Some of them may be not 
general for our users. So I have no ideas how to update this ticket.

Changes I made (separately pasted on pastebin for convenience and most are 
minor changes):
# 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 he 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. Suppose you've made it compiled in lastest master. 
You can select to review.
Just took a glance, my code compiled failed with lastest esi(but I'm sure it 
compiles last winter). So I have no appropriate patchset and sorry that I'm too 
busy to look into it these days.
                
> get combo_handler compiled
> --------------------------
>
>                 Key: TS-1053
>                 URL: https://issues.apache.org/jira/browse/TS-1053
>             Project: Traffic Server
>          Issue Type: Task
>          Components: Plugins
>            Reporter: Conan Wang
>            Assignee: Leif Hedstrom
>             Fix For: 3.3.2
>
>         Attachments: combo_handler.diff, fetcher.diff, Makefile
>
>
> combo_handler require ESI's code. Before make ESI work as a lib, you can try 
> it this way:
> make "esi/lib" and "esi/fetcher" the subdir of combo_handler and use the 
> makefile.
> {noformat} 
> combo_handler
> |____combo_handler.cc
> |____fetcher
> |____lib
> |____LICENSE
> |____Makefile
> |____README
> {noformat}

--
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

Reply via email to