[jira] [Assigned] (TS-2116) buffer_upload plugin is in the source tree but does not build
[ https://issues.apache.org/jira/browse/TS-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leif Hedstrom reassigned TS-2116: - Assignee: Kit Chan (was: Bryan Call) Assigning to Kit, since he's working on this. buffer_upload plugin is in the source tree but does not build - Key: TS-2116 URL: https://issues.apache.org/jira/browse/TS-2116 Project: Traffic Server Issue Type: Bug Components: Plugins Reporter: Igor Galić Assignee: Kit Chan Fix For: sometime The buffer_upload plugin is currently in our experimental plugin tree, but doesn't build even with {{--enable-experimental}}. This should be fixed. -- 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
[jira] [Updated] (TS-2045) move gzip plugin out of experimental
[ https://issues.apache.org/jira/browse/TS-2045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leif Hedstrom updated TS-2045: -- Issue Type: New Feature (was: Task) move gzip plugin out of experimental Key: TS-2045 URL: https://issues.apache.org/jira/browse/TS-2045 Project: Traffic Server Issue Type: New Feature Components: Plugins Reporter: Igor Galić Assignee: Igor Galić Fix For: 3.3.5 The gzip plugin has been recognized by the community as stable. There was a vote on d...@trafficserver.apache.org to promote it. The result was positive. -- 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
[jira] [Updated] (TS-745) Support ssd as a tiered cache component
[ https://issues.apache.org/jira/browse/TS-745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leif Hedstrom updated TS-745: - Summary: Support ssd as a tiered cache component (was: Support ssd) Support ssd as a tiered cache component --- Key: TS-745 URL: https://issues.apache.org/jira/browse/TS-745 Project: Traffic Server Issue Type: New Feature Components: Cache Reporter: mohan_zl Assignee: weijin Fix For: 3.3.5 Attachments: 0001-TS-745-support-interim-caching-in-storage.patch, 0001-TS-745-support-interim-caching-in-storage_rebased.patch, ts-745.diff, TS-ssd-2.patch, TS-ssd.patch A patch for supporting, not work well for a long time with --enable-debug -- 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
[jira] [Updated] (TS-1670) regression test failed on cache compontent
[ https://issues.apache.org/jira/browse/TS-1670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leif Hedstrom updated TS-1670: -- Issue Type: Bug (was: Test) regression test failed on cache compontent -- Key: TS-1670 URL: https://issues.apache.org/jira/browse/TS-1670 Project: Traffic Server Issue Type: Bug Components: Cache Reporter: Yunkai Zhang Assignee: James Peach Fix For: 3.3.5 The code is the master branch of upstream, and configure it with user and group options: $ ./configure --enable-debug --prefix=/opt/ats --with-user=ats --with-group=ats {code} # ./traffic_server -R 1 ... REGRESSION TEST cache started Regression test(cache) still in progress Regression test(cache) still in progress Regression test(cache) still in progress REGRESSION_RESULT cache:FAILED REGRESSION_TEST DONE: FAILED {code} -- 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
[jira] [Created] (TS-2140) Stats module is showing proxy.process.cache.direntries.used greater then proxy.process.cache.direntries.total
Adam Twardowski created TS-2140: --- Summary: Stats module is showing proxy.process.cache.direntries.used greater then proxy.process.cache.direntries.total Key: TS-2140 URL: https://issues.apache.org/jira/browse/TS-2140 Project: Traffic Server Issue Type: Bug Components: Stats Reporter: Adam Twardowski using the stats_over_http.so module, reported proxy.process.cache.direntries.used is greater then proxy.process.cache.direntries.total { global: { proxy.process.version.server.short: 3.3.4-dev, proxy.process.version.server.long: Apache Traffic Server - traffic_server - 3.3.4-dev - (build # 63013 on Jul 30 2013 at 13:23:55), proxy.process.version.server.build_number: 63013, proxy.process.version.server.build_time: 13:23:55, proxy.process.version.server.build_date: Jul 30 2013, proxy.process.version.server.build_machine: X, proxy.process.version.server.build_person: root, proxy.process.http.completed_requests: 1771631878, proxy.process.http.total_incoming_connections: 1771779452, proxy.process.http.total_client_connections: 1771779452, proxy.process.http.total_client_connections_ipv4: 1771779452, proxy.process.http.total_client_connections_ipv6: 0, proxy.process.http.total_server_connections: 486478731, proxy.process.http.total_parent_proxy_connections: 0, proxy.process.http.avg_transactions_per_client_connection: 1.15, proxy.process.http.avg_transactions_per_server_connection: 1.00, proxy.process.http.avg_transactions_per_parent_connection: 0.00, proxy.process.http.client_connection_time: 0, proxy.process.http.parent_proxy_connection_time: 0, proxy.process.http.server_connection_time: 0, proxy.process.http.cache_connection_time: 0, proxy.process.http.transaction_counts.errors.pre_accept_hangups: 0, proxy.process.http.transaction_totaltime.errors.pre_accept_hangups: 0.00, proxy.process.http.transaction_counts.errors.empty_hangups: 0, proxy.process.http.transaction_totaltime.errors.empty_hangups: 0.00, proxy.process.http.transaction_counts.errors.early_hangups: 0, proxy.process.http.transaction_totaltime.errors.early_hangups: 0.00, proxy.process.http.incoming_requests: 1766073976, proxy.process.http.outgoing_requests: 484585207, proxy.process.http.incoming_responses: 486478535, proxy.process.http.invalid_client_requests: 240, proxy.process.http.missing_host_hdr: 0, proxy.process.http.get_requests: 1765677046, proxy.process.http.head_requests: 392884, proxy.process.http.trace_requests: 8, proxy.process.http.options_requests: 1562, proxy.process.http.post_requests: 662, proxy.process.http.put_requests: 7, proxy.process.http.push_requests: 0, proxy.process.http.delete_requests: 0, proxy.process.http.purge_requests: 0, proxy.process.http.connect_requests: 0, proxy.process.http.extension_method_requests: 1807, proxy.process.http.client_no_cache_requests: 0, proxy.process.http.broken_server_connections: 63475, proxy.process.http.cache_lookups: 1765896837, proxy.process.http.cache_writes: 119147534, proxy.process.http.cache_updates: 7812961, proxy.process.http.cache_deletes: 60058, proxy.process.http.tunnels: 5017, proxy.process.http.throttled_proxy_only: 0, proxy.process.http.request_taxonomy.i0_n0_m0: 0, proxy.process.http.request_taxonomy.i1_n0_m0: 0, proxy.process.http.request_taxonomy.i0_n1_m0: 0, proxy.process.http.request_taxonomy.i1_n1_m0: 0, proxy.process.http.request_taxonomy.i0_n0_m1: 0, proxy.process.http.request_taxonomy.i1_n0_m1: 0, proxy.process.http.request_taxonomy.i0_n1_m1: 0, proxy.process.http.request_taxonomy.i1_n1_m1: 0, proxy.process.http.icp_suggested_lookups: 0, proxy.process.http.client_transaction_time: 0, proxy.process.http.client_write_time: 0, proxy.process.http.server_read_time: 0, proxy.process.http.icp_transaction_time: 0, proxy.process.http.icp_raw_transaction_time: 0, proxy.process.http.parent_proxy_transaction_time: 0, proxy.process.http.parent_proxy_raw_transaction_time: 0, proxy.process.http.server_transaction_time: 0, proxy.process.http.server_raw_transaction_time: 0, proxy.process.http.user_agent_request_header_total_size: 797103745655, proxy.process.http.user_agent_response_header_total_size: 697699513781, proxy.process.http.user_agent_request_document_total_size: 419549, proxy.process.http.user_agent_response_document_total_size: 190278962740080, proxy.process.http.origin_server_request_header_total_size: 265407277593, proxy.process.http.origin_server_response_header_total_size: 127176507932, proxy.process.http.origin_server_request_document_total_size: 419549, proxy.process.http.origin_server_response_document_total_size: 23039301010838, proxy.process.http.parent_proxy_request_total_bytes: 0, proxy.process.http.parent_proxy_response_total_bytes: 0, proxy.process.http.pushed_response_header_total_size: 0, proxy.process.http.pushed_document_total_size: 0, proxy.process.http.response_document_size_100:
[jira] [Updated] (TS-2140) Stats module is showing proxy.process.cache.direntries.used greater then proxy.process.cache.direntries.total
[ https://issues.apache.org/jira/browse/TS-2140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adam Twardowski updated TS-2140: Priority: Minor (was: Major) Stats module is showing proxy.process.cache.direntries.used greater then proxy.process.cache.direntries.total - Key: TS-2140 URL: https://issues.apache.org/jira/browse/TS-2140 Project: Traffic Server Issue Type: Bug Components: Stats Reporter: Adam Twardowski Priority: Minor using the stats_over_http.so module, reported proxy.process.cache.direntries.used is greater then proxy.process.cache.direntries.total { global: { proxy.process.version.server.short: 3.3.4-dev, proxy.process.version.server.long: Apache Traffic Server - traffic_server - 3.3.4-dev - (build # 63013 on Jul 30 2013 at 13:23:55), proxy.process.version.server.build_number: 63013, proxy.process.version.server.build_time: 13:23:55, proxy.process.version.server.build_date: Jul 30 2013, proxy.process.version.server.build_machine: X, proxy.process.version.server.build_person: root, proxy.process.http.completed_requests: 1771631878, proxy.process.http.total_incoming_connections: 1771779452, proxy.process.http.total_client_connections: 1771779452, proxy.process.http.total_client_connections_ipv4: 1771779452, proxy.process.http.total_client_connections_ipv6: 0, proxy.process.http.total_server_connections: 486478731, proxy.process.http.total_parent_proxy_connections: 0, proxy.process.http.avg_transactions_per_client_connection: 1.15, proxy.process.http.avg_transactions_per_server_connection: 1.00, proxy.process.http.avg_transactions_per_parent_connection: 0.00, proxy.process.http.client_connection_time: 0, proxy.process.http.parent_proxy_connection_time: 0, proxy.process.http.server_connection_time: 0, proxy.process.http.cache_connection_time: 0, proxy.process.http.transaction_counts.errors.pre_accept_hangups: 0, proxy.process.http.transaction_totaltime.errors.pre_accept_hangups: 0.00, proxy.process.http.transaction_counts.errors.empty_hangups: 0, proxy.process.http.transaction_totaltime.errors.empty_hangups: 0.00, proxy.process.http.transaction_counts.errors.early_hangups: 0, proxy.process.http.transaction_totaltime.errors.early_hangups: 0.00, proxy.process.http.incoming_requests: 1766073976, proxy.process.http.outgoing_requests: 484585207, proxy.process.http.incoming_responses: 486478535, proxy.process.http.invalid_client_requests: 240, proxy.process.http.missing_host_hdr: 0, proxy.process.http.get_requests: 1765677046, proxy.process.http.head_requests: 392884, proxy.process.http.trace_requests: 8, proxy.process.http.options_requests: 1562, proxy.process.http.post_requests: 662, proxy.process.http.put_requests: 7, proxy.process.http.push_requests: 0, proxy.process.http.delete_requests: 0, proxy.process.http.purge_requests: 0, proxy.process.http.connect_requests: 0, proxy.process.http.extension_method_requests: 1807, proxy.process.http.client_no_cache_requests: 0, proxy.process.http.broken_server_connections: 63475, proxy.process.http.cache_lookups: 1765896837, proxy.process.http.cache_writes: 119147534, proxy.process.http.cache_updates: 7812961, proxy.process.http.cache_deletes: 60058, proxy.process.http.tunnels: 5017, proxy.process.http.throttled_proxy_only: 0, proxy.process.http.request_taxonomy.i0_n0_m0: 0, proxy.process.http.request_taxonomy.i1_n0_m0: 0, proxy.process.http.request_taxonomy.i0_n1_m0: 0, proxy.process.http.request_taxonomy.i1_n1_m0: 0, proxy.process.http.request_taxonomy.i0_n0_m1: 0, proxy.process.http.request_taxonomy.i1_n0_m1: 0, proxy.process.http.request_taxonomy.i0_n1_m1: 0, proxy.process.http.request_taxonomy.i1_n1_m1: 0, proxy.process.http.icp_suggested_lookups: 0, proxy.process.http.client_transaction_time: 0, proxy.process.http.client_write_time: 0, proxy.process.http.server_read_time: 0, proxy.process.http.icp_transaction_time: 0, proxy.process.http.icp_raw_transaction_time: 0, proxy.process.http.parent_proxy_transaction_time: 0, proxy.process.http.parent_proxy_raw_transaction_time: 0, proxy.process.http.server_transaction_time: 0, proxy.process.http.server_raw_transaction_time: 0, proxy.process.http.user_agent_request_header_total_size: 797103745655, proxy.process.http.user_agent_response_header_total_size: 697699513781, proxy.process.http.user_agent_request_document_total_size: 419549, proxy.process.http.user_agent_response_document_total_size: 190278962740080, proxy.process.http.origin_server_request_header_total_size: 265407277593, proxy.process.http.origin_server_response_header_total_size: 127176507932, proxy.process.http.origin_server_request_document_total_size:
[jira] [Commented] (TS-2008) Cache control with multiple suffixes
[ https://issues.apache.org/jira/browse/TS-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13744480#comment-13744480 ] James Peach commented on TS-2008: - This is looking pretty good. MultiTextMod::set() needs to copy the value before calling strtok on it, because strtok will write NUL into the string. The signature of set() should be MultiTextMod::set(const char *). If you take a temporary copy here, you don't need the origin_text data member. Finally, you should use strtok_r rather than strtok. MultiTextMod::~MultiTextMod() needs to iterate over the values and call ats_free() on them. J Cache control with multiple suffixes Key: TS-2008 URL: https://issues.apache.org/jira/browse/TS-2008 Project: Traffic Server Issue Type: New Feature Components: Cache, HTTP Affects Versions: 3.3.4 Reporter: bettydramit Assignee: James Peach Fix For: 3.5.1 Attachments: ts-2008-v3.patch if you want to control on ver many suffix in cache.config: jpeg js ... you need to specify: dest_domain=www.test.com suffix=jpeg ttl-in-cache=1m dest_domain=www.test.com suffix=js ttl-in-cache=1m ... and we can change to : dest_domain=www.test.com suffix=jpeg,js,css,html ttl-in-cache=1m by this patch: {code} diff -Nur ts-3.3.1/proxy/ControlMatcher.cc ts-3.3.1-new/proxy/ControlMatcher.cc --- ts-3.3.1/proxy/ControlMatcher.cc2013-03-10 03:44:28.0 +0800 +++ ts-3.3.1-new/proxy/ControlMatcher.cc2013-07-08 22:42:31.568980245 +0800 @@ -44,7 +44,7 @@ #include P_Cache.h #include P_SplitDNS.h #include congest/Congestion.h - +#include string / * Place all template instantiations at the bottom of the file / @@ -815,6 +815,63 @@ if (file_buf == NULL) { return 1; } + /* add by reggie */ + if(strcmp([CacheControl],matcher_name) == 0){ + Debug(reggie-suffix,file_string is begin ); + char *strbuffern = NULL; + char *strfile_buf = file_buf, *tmpvalue = NULL; + char *cp_line[64]; + int in = 0; + char buffer1[128] = {0}; + char *outer_ptr=NULL; + std::string file_string; + while((strbuffern = strtok_r(strfile_buf,\n,outer_ptr)) != NULL){ + Debug(reggie-suffix,strbuffern is %s,strbuffern); + if(*strbuffern == '#'){ + Debug(reggie-suffix,# is %s ,strbuffern); + strfile_buf = NULL; + continue; + } + if((strchr(strbuffern,',')) != NULL){ + in = 0; + while((cp_line[in]=strtok(strbuffern, ))!=NULL) { + strbuffern = NULL; + in++; + } + if((strchr(cp_line[1],'=') != NULL) (strstr(cp_line[1],suffix))){ + if((cp_line[in] = strtok(cp_line[1],=)) != NULL) + tmpvalue = strtok(NULL,=); + while((cp_line[in] = strtok(tmpvalue,,)) != NULL){ + in++; + tmpvalue = NULL; + } + } + for(int nk = 3; nk in ;nk++){ + //nbuf_len = strlen(cp_line[0]) + strlen(cp_line[2]) +strlen(cp_line[nk]) + 9; + //snprintf(buffer1,nbuf_len,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + sprintf(buffer1,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + file_string.append(buffer1); + } + } + else{ + file_string.append(strbuffern); + file_string += \n; + } + strfile_buf = NULL; + } + //file_string.erase(file_string.end()-1); + Debug(reggie_suffix,file_string is %s ,file_string.c_str()); + ats_free(file_buf); + file_buf = (char*) ats_malloc(file_string.size()+1); + if(strcpy(file_buf,file_string.c_str()) == NULL){ + ats_free(file_buf); + return 2; + } + ret = BuildTableFromString(file_buf); + ats_free(file_buf); + return ret; + } + /*end by reggie */ ret = BuildTableFromString(file_buf); ats_free(file_buf); {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For
[jira] [Commented] (TS-2008) Cache control with multiple suffixes
[ https://issues.apache.org/jira/browse/TS-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13744637#comment-13744637 ] bettydramit commented on TS-2008: - [~jamespeach] Thank you for your help. I once wanted to copy the value before calling strtok on it once.Then I think if the value is no longer in use.I'll save some memory when I calling strtok on the origin value. TextMod::~TextMod() call free() on text.data().So, I used free() instead of ats_free(). I forgot strtok_r is safer.Thanks for your reminding. Cache control with multiple suffixes Key: TS-2008 URL: https://issues.apache.org/jira/browse/TS-2008 Project: Traffic Server Issue Type: New Feature Components: Cache, HTTP Affects Versions: 3.3.4 Reporter: bettydramit Assignee: James Peach Fix For: 3.5.1 Attachments: ts-2008-v3.patch if you want to control on ver many suffix in cache.config: jpeg js ... you need to specify: dest_domain=www.test.com suffix=jpeg ttl-in-cache=1m dest_domain=www.test.com suffix=js ttl-in-cache=1m ... and we can change to : dest_domain=www.test.com suffix=jpeg,js,css,html ttl-in-cache=1m by this patch: {code} diff -Nur ts-3.3.1/proxy/ControlMatcher.cc ts-3.3.1-new/proxy/ControlMatcher.cc --- ts-3.3.1/proxy/ControlMatcher.cc2013-03-10 03:44:28.0 +0800 +++ ts-3.3.1-new/proxy/ControlMatcher.cc2013-07-08 22:42:31.568980245 +0800 @@ -44,7 +44,7 @@ #include P_Cache.h #include P_SplitDNS.h #include congest/Congestion.h - +#include string / * Place all template instantiations at the bottom of the file / @@ -815,6 +815,63 @@ if (file_buf == NULL) { return 1; } + /* add by reggie */ + if(strcmp([CacheControl],matcher_name) == 0){ + Debug(reggie-suffix,file_string is begin ); + char *strbuffern = NULL; + char *strfile_buf = file_buf, *tmpvalue = NULL; + char *cp_line[64]; + int in = 0; + char buffer1[128] = {0}; + char *outer_ptr=NULL; + std::string file_string; + while((strbuffern = strtok_r(strfile_buf,\n,outer_ptr)) != NULL){ + Debug(reggie-suffix,strbuffern is %s,strbuffern); + if(*strbuffern == '#'){ + Debug(reggie-suffix,# is %s ,strbuffern); + strfile_buf = NULL; + continue; + } + if((strchr(strbuffern,',')) != NULL){ + in = 0; + while((cp_line[in]=strtok(strbuffern, ))!=NULL) { + strbuffern = NULL; + in++; + } + if((strchr(cp_line[1],'=') != NULL) (strstr(cp_line[1],suffix))){ + if((cp_line[in] = strtok(cp_line[1],=)) != NULL) + tmpvalue = strtok(NULL,=); + while((cp_line[in] = strtok(tmpvalue,,)) != NULL){ + in++; + tmpvalue = NULL; + } + } + for(int nk = 3; nk in ;nk++){ + //nbuf_len = strlen(cp_line[0]) + strlen(cp_line[2]) +strlen(cp_line[nk]) + 9; + //snprintf(buffer1,nbuf_len,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + sprintf(buffer1,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + file_string.append(buffer1); + } + } + else{ + file_string.append(strbuffern); + file_string += \n; + } + strfile_buf = NULL; + } + //file_string.erase(file_string.end()-1); + Debug(reggie_suffix,file_string is %s ,file_string.c_str()); + ats_free(file_buf); + file_buf = (char*) ats_malloc(file_string.size()+1); + if(strcpy(file_buf,file_string.c_str()) == NULL){ + ats_free(file_buf); + return 2; + } + ret = BuildTableFromString(file_buf); + ats_free(file_buf); + return ret; + } + /*end by reggie */ ret = BuildTableFromString(file_buf); ats_free(file_buf); {code} -- 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
[jira] [Comment Edited] (TS-2008) Cache control with multiple suffixes
[ https://issues.apache.org/jira/browse/TS-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13744637#comment-13744637 ] bettydramit edited comment on TS-2008 at 8/20/13 3:04 AM: -- [~jamespeach] Thank you for your help. TextMod::~TextMod() call free() on text.data().So, I used free() instead of ats_free(). I forgot strtok_r is safer.Thanks for your reminding. was (Author: bettydreamit): [~jamespeach] Thank you for your help. I once wanted to copy the value before calling strtok on it once.Then I think if the value is no longer in use.I'll save some memory when I calling strtok on the origin value. TextMod::~TextMod() call free() on text.data().So, I used free() instead of ats_free(). I forgot strtok_r is safer.Thanks for your reminding. Cache control with multiple suffixes Key: TS-2008 URL: https://issues.apache.org/jira/browse/TS-2008 Project: Traffic Server Issue Type: New Feature Components: Cache, HTTP Affects Versions: 3.3.4 Reporter: bettydramit Assignee: James Peach Fix For: 3.5.1 Attachments: ts-2008-v3.patch if you want to control on ver many suffix in cache.config: jpeg js ... you need to specify: dest_domain=www.test.com suffix=jpeg ttl-in-cache=1m dest_domain=www.test.com suffix=js ttl-in-cache=1m ... and we can change to : dest_domain=www.test.com suffix=jpeg,js,css,html ttl-in-cache=1m by this patch: {code} diff -Nur ts-3.3.1/proxy/ControlMatcher.cc ts-3.3.1-new/proxy/ControlMatcher.cc --- ts-3.3.1/proxy/ControlMatcher.cc2013-03-10 03:44:28.0 +0800 +++ ts-3.3.1-new/proxy/ControlMatcher.cc2013-07-08 22:42:31.568980245 +0800 @@ -44,7 +44,7 @@ #include P_Cache.h #include P_SplitDNS.h #include congest/Congestion.h - +#include string / * Place all template instantiations at the bottom of the file / @@ -815,6 +815,63 @@ if (file_buf == NULL) { return 1; } + /* add by reggie */ + if(strcmp([CacheControl],matcher_name) == 0){ + Debug(reggie-suffix,file_string is begin ); + char *strbuffern = NULL; + char *strfile_buf = file_buf, *tmpvalue = NULL; + char *cp_line[64]; + int in = 0; + char buffer1[128] = {0}; + char *outer_ptr=NULL; + std::string file_string; + while((strbuffern = strtok_r(strfile_buf,\n,outer_ptr)) != NULL){ + Debug(reggie-suffix,strbuffern is %s,strbuffern); + if(*strbuffern == '#'){ + Debug(reggie-suffix,# is %s ,strbuffern); + strfile_buf = NULL; + continue; + } + if((strchr(strbuffern,',')) != NULL){ + in = 0; + while((cp_line[in]=strtok(strbuffern, ))!=NULL) { + strbuffern = NULL; + in++; + } + if((strchr(cp_line[1],'=') != NULL) (strstr(cp_line[1],suffix))){ + if((cp_line[in] = strtok(cp_line[1],=)) != NULL) + tmpvalue = strtok(NULL,=); + while((cp_line[in] = strtok(tmpvalue,,)) != NULL){ + in++; + tmpvalue = NULL; + } + } + for(int nk = 3; nk in ;nk++){ + //nbuf_len = strlen(cp_line[0]) + strlen(cp_line[2]) +strlen(cp_line[nk]) + 9; + //snprintf(buffer1,nbuf_len,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + sprintf(buffer1,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + file_string.append(buffer1); + } + } + else{ + file_string.append(strbuffern); + file_string += \n; + } + strfile_buf = NULL; + } + //file_string.erase(file_string.end()-1); + Debug(reggie_suffix,file_string is %s ,file_string.c_str()); + ats_free(file_buf); + file_buf = (char*) ats_malloc(file_string.size()+1); + if(strcpy(file_buf,file_string.c_str()) == NULL){ + ats_free(file_buf); + return 2; + } + ret = BuildTableFromString(file_buf); + ats_free(file_buf); + return ret; + } + /*end by reggie */ ret =
[jira] [Commented] (TS-2008) Cache control with multiple suffixes
[ https://issues.apache.org/jira/browse/TS-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13744664#comment-13744664 ] James Peach commented on TS-2008: - free() and ats_free() are the same, though this code should be using ats_free() consistently :) I can come by and clean that up after we commit your patch. Cache control with multiple suffixes Key: TS-2008 URL: https://issues.apache.org/jira/browse/TS-2008 Project: Traffic Server Issue Type: New Feature Components: Cache, HTTP Affects Versions: 3.3.4 Reporter: bettydramit Assignee: James Peach Fix For: 3.5.1 Attachments: ts-2008-v3.patch if you want to control on ver many suffix in cache.config: jpeg js ... you need to specify: dest_domain=www.test.com suffix=jpeg ttl-in-cache=1m dest_domain=www.test.com suffix=js ttl-in-cache=1m ... and we can change to : dest_domain=www.test.com suffix=jpeg,js,css,html ttl-in-cache=1m by this patch: {code} diff -Nur ts-3.3.1/proxy/ControlMatcher.cc ts-3.3.1-new/proxy/ControlMatcher.cc --- ts-3.3.1/proxy/ControlMatcher.cc2013-03-10 03:44:28.0 +0800 +++ ts-3.3.1-new/proxy/ControlMatcher.cc2013-07-08 22:42:31.568980245 +0800 @@ -44,7 +44,7 @@ #include P_Cache.h #include P_SplitDNS.h #include congest/Congestion.h - +#include string / * Place all template instantiations at the bottom of the file / @@ -815,6 +815,63 @@ if (file_buf == NULL) { return 1; } + /* add by reggie */ + if(strcmp([CacheControl],matcher_name) == 0){ + Debug(reggie-suffix,file_string is begin ); + char *strbuffern = NULL; + char *strfile_buf = file_buf, *tmpvalue = NULL; + char *cp_line[64]; + int in = 0; + char buffer1[128] = {0}; + char *outer_ptr=NULL; + std::string file_string; + while((strbuffern = strtok_r(strfile_buf,\n,outer_ptr)) != NULL){ + Debug(reggie-suffix,strbuffern is %s,strbuffern); + if(*strbuffern == '#'){ + Debug(reggie-suffix,# is %s ,strbuffern); + strfile_buf = NULL; + continue; + } + if((strchr(strbuffern,',')) != NULL){ + in = 0; + while((cp_line[in]=strtok(strbuffern, ))!=NULL) { + strbuffern = NULL; + in++; + } + if((strchr(cp_line[1],'=') != NULL) (strstr(cp_line[1],suffix))){ + if((cp_line[in] = strtok(cp_line[1],=)) != NULL) + tmpvalue = strtok(NULL,=); + while((cp_line[in] = strtok(tmpvalue,,)) != NULL){ + in++; + tmpvalue = NULL; + } + } + for(int nk = 3; nk in ;nk++){ + //nbuf_len = strlen(cp_line[0]) + strlen(cp_line[2]) +strlen(cp_line[nk]) + 9; + //snprintf(buffer1,nbuf_len,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + sprintf(buffer1,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + file_string.append(buffer1); + } + } + else{ + file_string.append(strbuffern); + file_string += \n; + } + strfile_buf = NULL; + } + //file_string.erase(file_string.end()-1); + Debug(reggie_suffix,file_string is %s ,file_string.c_str()); + ats_free(file_buf); + file_buf = (char*) ats_malloc(file_string.size()+1); + if(strcpy(file_buf,file_string.c_str()) == NULL){ + ats_free(file_buf); + return 2; + } + ret = BuildTableFromString(file_buf); + ats_free(file_buf); + return ret; + } + /*end by reggie */ ret = BuildTableFromString(file_buf); ats_free(file_buf); {code} -- 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
[jira] [Commented] (TS-2008) Cache control with multiple suffixes
[ https://issues.apache.org/jira/browse/TS-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13744670#comment-13744670 ] Leif Hedstrom commented on TS-2008: --- I'd like to suggest to not pulling in std::string into the core. Do we really need it ? Cache control with multiple suffixes Key: TS-2008 URL: https://issues.apache.org/jira/browse/TS-2008 Project: Traffic Server Issue Type: New Feature Components: Cache, HTTP Affects Versions: 3.3.4 Reporter: bettydramit Assignee: James Peach Fix For: 3.5.1 Attachments: ts-2008-v3.patch if you want to control on ver many suffix in cache.config: jpeg js ... you need to specify: dest_domain=www.test.com suffix=jpeg ttl-in-cache=1m dest_domain=www.test.com suffix=js ttl-in-cache=1m ... and we can change to : dest_domain=www.test.com suffix=jpeg,js,css,html ttl-in-cache=1m by this patch: {code} diff -Nur ts-3.3.1/proxy/ControlMatcher.cc ts-3.3.1-new/proxy/ControlMatcher.cc --- ts-3.3.1/proxy/ControlMatcher.cc2013-03-10 03:44:28.0 +0800 +++ ts-3.3.1-new/proxy/ControlMatcher.cc2013-07-08 22:42:31.568980245 +0800 @@ -44,7 +44,7 @@ #include P_Cache.h #include P_SplitDNS.h #include congest/Congestion.h - +#include string / * Place all template instantiations at the bottom of the file / @@ -815,6 +815,63 @@ if (file_buf == NULL) { return 1; } + /* add by reggie */ + if(strcmp([CacheControl],matcher_name) == 0){ + Debug(reggie-suffix,file_string is begin ); + char *strbuffern = NULL; + char *strfile_buf = file_buf, *tmpvalue = NULL; + char *cp_line[64]; + int in = 0; + char buffer1[128] = {0}; + char *outer_ptr=NULL; + std::string file_string; + while((strbuffern = strtok_r(strfile_buf,\n,outer_ptr)) != NULL){ + Debug(reggie-suffix,strbuffern is %s,strbuffern); + if(*strbuffern == '#'){ + Debug(reggie-suffix,# is %s ,strbuffern); + strfile_buf = NULL; + continue; + } + if((strchr(strbuffern,',')) != NULL){ + in = 0; + while((cp_line[in]=strtok(strbuffern, ))!=NULL) { + strbuffern = NULL; + in++; + } + if((strchr(cp_line[1],'=') != NULL) (strstr(cp_line[1],suffix))){ + if((cp_line[in] = strtok(cp_line[1],=)) != NULL) + tmpvalue = strtok(NULL,=); + while((cp_line[in] = strtok(tmpvalue,,)) != NULL){ + in++; + tmpvalue = NULL; + } + } + for(int nk = 3; nk in ;nk++){ + //nbuf_len = strlen(cp_line[0]) + strlen(cp_line[2]) +strlen(cp_line[nk]) + 9; + //snprintf(buffer1,nbuf_len,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + sprintf(buffer1,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + file_string.append(buffer1); + } + } + else{ + file_string.append(strbuffern); + file_string += \n; + } + strfile_buf = NULL; + } + //file_string.erase(file_string.end()-1); + Debug(reggie_suffix,file_string is %s ,file_string.c_str()); + ats_free(file_buf); + file_buf = (char*) ats_malloc(file_string.size()+1); + if(strcpy(file_buf,file_string.c_str()) == NULL){ + ats_free(file_buf); + return 2; + } + ret = BuildTableFromString(file_buf); + ats_free(file_buf); + return ret; + } + /*end by reggie */ ret = BuildTableFromString(file_buf); ats_free(file_buf); {code} -- 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
[jira] [Commented] (TS-2008) Cache control with multiple suffixes
[ https://issues.apache.org/jira/browse/TS-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13744673#comment-13744673 ] James Peach commented on TS-2008: - There's no std::string in the current patch iteration. Cache control with multiple suffixes Key: TS-2008 URL: https://issues.apache.org/jira/browse/TS-2008 Project: Traffic Server Issue Type: New Feature Components: Cache, HTTP Affects Versions: 3.3.4 Reporter: bettydramit Assignee: James Peach Fix For: 3.5.1 Attachments: ts-2008-v3.patch if you want to control on ver many suffix in cache.config: jpeg js ... you need to specify: dest_domain=www.test.com suffix=jpeg ttl-in-cache=1m dest_domain=www.test.com suffix=js ttl-in-cache=1m ... and we can change to : dest_domain=www.test.com suffix=jpeg,js,css,html ttl-in-cache=1m by this patch: {code} diff -Nur ts-3.3.1/proxy/ControlMatcher.cc ts-3.3.1-new/proxy/ControlMatcher.cc --- ts-3.3.1/proxy/ControlMatcher.cc2013-03-10 03:44:28.0 +0800 +++ ts-3.3.1-new/proxy/ControlMatcher.cc2013-07-08 22:42:31.568980245 +0800 @@ -44,7 +44,7 @@ #include P_Cache.h #include P_SplitDNS.h #include congest/Congestion.h - +#include string / * Place all template instantiations at the bottom of the file / @@ -815,6 +815,63 @@ if (file_buf == NULL) { return 1; } + /* add by reggie */ + if(strcmp([CacheControl],matcher_name) == 0){ + Debug(reggie-suffix,file_string is begin ); + char *strbuffern = NULL; + char *strfile_buf = file_buf, *tmpvalue = NULL; + char *cp_line[64]; + int in = 0; + char buffer1[128] = {0}; + char *outer_ptr=NULL; + std::string file_string; + while((strbuffern = strtok_r(strfile_buf,\n,outer_ptr)) != NULL){ + Debug(reggie-suffix,strbuffern is %s,strbuffern); + if(*strbuffern == '#'){ + Debug(reggie-suffix,# is %s ,strbuffern); + strfile_buf = NULL; + continue; + } + if((strchr(strbuffern,',')) != NULL){ + in = 0; + while((cp_line[in]=strtok(strbuffern, ))!=NULL) { + strbuffern = NULL; + in++; + } + if((strchr(cp_line[1],'=') != NULL) (strstr(cp_line[1],suffix))){ + if((cp_line[in] = strtok(cp_line[1],=)) != NULL) + tmpvalue = strtok(NULL,=); + while((cp_line[in] = strtok(tmpvalue,,)) != NULL){ + in++; + tmpvalue = NULL; + } + } + for(int nk = 3; nk in ;nk++){ + //nbuf_len = strlen(cp_line[0]) + strlen(cp_line[2]) +strlen(cp_line[nk]) + 9; + //snprintf(buffer1,nbuf_len,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + sprintf(buffer1,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + file_string.append(buffer1); + } + } + else{ + file_string.append(strbuffern); + file_string += \n; + } + strfile_buf = NULL; + } + //file_string.erase(file_string.end()-1); + Debug(reggie_suffix,file_string is %s ,file_string.c_str()); + ats_free(file_buf); + file_buf = (char*) ats_malloc(file_string.size()+1); + if(strcpy(file_buf,file_string.c_str()) == NULL){ + ats_free(file_buf); + return 2; + } + ret = BuildTableFromString(file_buf); + ats_free(file_buf); + return ret; + } + /*end by reggie */ ret = BuildTableFromString(file_buf); ats_free(file_buf); {code} -- 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
[jira] [Commented] (TS-2008) Cache control with multiple suffixes
[ https://issues.apache.org/jira/browse/TS-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13744675#comment-13744675 ] Leif Hedstrom commented on TS-2008: --- Ah, ok. We should remove the big hunk of code in the description :). Cache control with multiple suffixes Key: TS-2008 URL: https://issues.apache.org/jira/browse/TS-2008 Project: Traffic Server Issue Type: New Feature Components: Cache, HTTP Affects Versions: 3.3.4 Reporter: bettydramit Assignee: James Peach Fix For: 3.5.1 Attachments: ts-2008-v3.patch if you want to control on ver many suffix in cache.config: jpeg js ... you need to specify: dest_domain=www.test.com suffix=jpeg ttl-in-cache=1m dest_domain=www.test.com suffix=js ttl-in-cache=1m ... and we can change to : dest_domain=www.test.com suffix=jpeg,js,css,html ttl-in-cache=1m by this patch: {code} diff -Nur ts-3.3.1/proxy/ControlMatcher.cc ts-3.3.1-new/proxy/ControlMatcher.cc --- ts-3.3.1/proxy/ControlMatcher.cc2013-03-10 03:44:28.0 +0800 +++ ts-3.3.1-new/proxy/ControlMatcher.cc2013-07-08 22:42:31.568980245 +0800 @@ -44,7 +44,7 @@ #include P_Cache.h #include P_SplitDNS.h #include congest/Congestion.h - +#include string / * Place all template instantiations at the bottom of the file / @@ -815,6 +815,63 @@ if (file_buf == NULL) { return 1; } + /* add by reggie */ + if(strcmp([CacheControl],matcher_name) == 0){ + Debug(reggie-suffix,file_string is begin ); + char *strbuffern = NULL; + char *strfile_buf = file_buf, *tmpvalue = NULL; + char *cp_line[64]; + int in = 0; + char buffer1[128] = {0}; + char *outer_ptr=NULL; + std::string file_string; + while((strbuffern = strtok_r(strfile_buf,\n,outer_ptr)) != NULL){ + Debug(reggie-suffix,strbuffern is %s,strbuffern); + if(*strbuffern == '#'){ + Debug(reggie-suffix,# is %s ,strbuffern); + strfile_buf = NULL; + continue; + } + if((strchr(strbuffern,',')) != NULL){ + in = 0; + while((cp_line[in]=strtok(strbuffern, ))!=NULL) { + strbuffern = NULL; + in++; + } + if((strchr(cp_line[1],'=') != NULL) (strstr(cp_line[1],suffix))){ + if((cp_line[in] = strtok(cp_line[1],=)) != NULL) + tmpvalue = strtok(NULL,=); + while((cp_line[in] = strtok(tmpvalue,,)) != NULL){ + in++; + tmpvalue = NULL; + } + } + for(int nk = 3; nk in ;nk++){ + //nbuf_len = strlen(cp_line[0]) + strlen(cp_line[2]) +strlen(cp_line[nk]) + 9; + //snprintf(buffer1,nbuf_len,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + sprintf(buffer1,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + file_string.append(buffer1); + } + } + else{ + file_string.append(strbuffern); + file_string += \n; + } + strfile_buf = NULL; + } + //file_string.erase(file_string.end()-1); + Debug(reggie_suffix,file_string is %s ,file_string.c_str()); + ats_free(file_buf); + file_buf = (char*) ats_malloc(file_string.size()+1); + if(strcpy(file_buf,file_string.c_str()) == NULL){ + ats_free(file_buf); + return 2; + } + ret = BuildTableFromString(file_buf); + ats_free(file_buf); + return ret; + } + /*end by reggie */ ret = BuildTableFromString(file_buf); ats_free(file_buf); {code} -- 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
[jira] [Updated] (TS-2008) Cache control with multiple suffixes
[ https://issues.apache.org/jira/browse/TS-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leif Hedstrom updated TS-2008: -- Description: if you want to control on ver many suffix in cache.config: jpeg js ... you need to specify: dest_domain=www.test.com suffix=jpeg ttl-in-cache=1m dest_domain=www.test.com suffix=js ttl-in-cache=1m ... and we can change to : dest_domain=www.test.com suffix=jpeg,js,css,html ttl-in-cache=1m was: if you want to control on ver many suffix in cache.config: jpeg js ... you need to specify: dest_domain=www.test.com suffix=jpeg ttl-in-cache=1m dest_domain=www.test.com suffix=js ttl-in-cache=1m ... and we can change to : dest_domain=www.test.com suffix=jpeg,js,css,html ttl-in-cache=1m by this patch: {code} diff -Nur ts-3.3.1/proxy/ControlMatcher.cc ts-3.3.1-new/proxy/ControlMatcher.cc --- ts-3.3.1/proxy/ControlMatcher.cc2013-03-10 03:44:28.0 +0800 +++ ts-3.3.1-new/proxy/ControlMatcher.cc2013-07-08 22:42:31.568980245 +0800 @@ -44,7 +44,7 @@ #include P_Cache.h #include P_SplitDNS.h #include congest/Congestion.h - +#include string / * Place all template instantiations at the bottom of the file / @@ -815,6 +815,63 @@ if (file_buf == NULL) { return 1; } + /* add by reggie */ + if(strcmp([CacheControl],matcher_name) == 0){ + Debug(reggie-suffix,file_string is begin ); + char *strbuffern = NULL; + char *strfile_buf = file_buf, *tmpvalue = NULL; + char *cp_line[64]; + int in = 0; + char buffer1[128] = {0}; + char *outer_ptr=NULL; + std::string file_string; + while((strbuffern = strtok_r(strfile_buf,\n,outer_ptr)) != NULL){ + Debug(reggie-suffix,strbuffern is %s,strbuffern); + if(*strbuffern == '#'){ + Debug(reggie-suffix,# is %s ,strbuffern); + strfile_buf = NULL; + continue; + } + if((strchr(strbuffern,',')) != NULL){ + in = 0; + while((cp_line[in]=strtok(strbuffern, ))!=NULL) { + strbuffern = NULL; + in++; + } + if((strchr(cp_line[1],'=') != NULL) (strstr(cp_line[1],suffix))){ + if((cp_line[in] = strtok(cp_line[1],=)) != NULL) + tmpvalue = strtok(NULL,=); + while((cp_line[in] = strtok(tmpvalue,,)) != NULL){ + in++; + tmpvalue = NULL; + } + } + for(int nk = 3; nk in ;nk++){ + //nbuf_len = strlen(cp_line[0]) + strlen(cp_line[2]) +strlen(cp_line[nk]) + 9; + //snprintf(buffer1,nbuf_len,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + sprintf(buffer1,%s suffix=%s %s\n,cp_line[0],cp_line[nk],cp_line[2]); + file_string.append(buffer1); + } + } + else{ + file_string.append(strbuffern); + file_string += \n; + } + strfile_buf = NULL; + } + //file_string.erase(file_string.end()-1); + Debug(reggie_suffix,file_string is %s ,file_string.c_str()); + ats_free(file_buf); + file_buf = (char*) ats_malloc(file_string.size()+1); + if(strcpy(file_buf,file_string.c_str()) == NULL){ + ats_free(file_buf); + return 2; + } + ret = BuildTableFromString(file_buf); + ats_free(file_buf); + return ret; + } + /*end by reggie */ ret = BuildTableFromString(file_buf); ats_free(file_buf); {code} I removed the code from the description, sorry for the confusion re: std::string. Cache control with multiple suffixes Key: TS-2008 URL: https://issues.apache.org/jira/browse/TS-2008 Project: Traffic Server Issue Type: New Feature Components: Cache, HTTP Affects Versions: 3.3.4 Reporter: bettydramit Assignee: James Peach Fix For: 3.5.1 Attachments: ts-2008-v3.patch if you want to control on ver many suffix in cache.config: jpeg js ... you need to specify: dest_domain=www.test.com suffix=jpeg ttl-in-cache=1m dest_domain=www.test.com suffix=js ttl-in-cache=1m ... and we can change to : dest_domain=www.test.com suffix=jpeg,js,css,html ttl-in-cache=1m -- This message is automatically
[jira] [Commented] (TS-2116) buffer_upload plugin is in the source tree but does not build
[ https://issues.apache.org/jira/browse/TS-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13744691#comment-13744691 ] Bryan Call commented on TS-2116: Kit, Add a patch to the bug and I will check it out. buffer_upload plugin is in the source tree but does not build - Key: TS-2116 URL: https://issues.apache.org/jira/browse/TS-2116 Project: Traffic Server Issue Type: Bug Components: Plugins Reporter: Igor Galić Assignee: Kit Chan Fix For: sometime The buffer_upload plugin is currently in our experimental plugin tree, but doesn't build even with {{--enable-experimental}}. This should be fixed. -- 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