------------------------------------------------------------ revno: 13309 revision-id: chtsanti@users.sourceforge.net-20140313105638-pk8rujn1b4gnklwd parent: chtsanti@users.sourceforge.net-20140312164627-cmi3u7rcpwwqe958 committer: Christos Tsantilas branch nick: trunk timestamp: Thu 2014-03-13 12:56:38 +0200 message: url_rewrite_extras and store_id_extras patch fixes Fixes to patch "Add url_rewrite_extras and store_id_extras for redirector and store_id helpers",r13308: - Fix cf_gen.cc:gen_conf(..) function to not escape quotes before write to conf file - The Format::Format name is used to inform the user about parsing problems. Fix the names of related objects for the new redirecor_extras and store_id_extras directives. - cf.data.pre: The NAME tag take as argument only the name of directive. Fix the new redirecor_extras and store_id_extras related tags. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: chtsanti@users.sourceforge.net-20140313105638-\ # pk8rujn1b4gnklwd # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: f10b52d8da4179f4aa1b1cba7d7f7f0bde82f91a # timestamp: 2014-03-13 11:01:49 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: chtsanti@users.sourceforge.net-20140312164627-\ # cmi3u7rcpwwqe958 # # Begin patch === modified file 'src/cf.data.pre' --- src/cf.data.pre 2014-03-12 16:46:27 +0000 +++ src/cf.data.pre 2014-03-13 10:56:38 +0000 @@ -4755,7 +4755,7 @@ be allowed to request. DOC_END -NAME: url_rewrite_extras format +NAME: url_rewrite_extras TYPE: TokenOrQuotedString LOC: Config.redirector_extras DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp" @@ -4820,7 +4820,7 @@ By default, a StoreID helper is not used. DOC_END -NAME: store_id_extras format +NAME: store_id_extras TYPE: TokenOrQuotedString LOC: Config.storeId_extras DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp" === modified file 'src/cf_gen.cc' --- src/cf_gen.cc 2014-03-12 16:46:27 +0000 +++ src/cf_gen.cc 2014-03-13 10:56:38 +0000 @@ -823,13 +823,13 @@ if (entry->defaults.preset.size() && entry->defaults.preset.front().compare("none") != 0) { // Display DEFAULT: line(s) for (LineList::const_iterator l = entry->defaults.preset.begin(); l != entry->defaults.preset.end(); ++l) { - snprintf(buf, sizeof(buf), "%s %s", entry->name.c_str(), gen_quote_escape(*l)); + snprintf(buf, sizeof(buf), "%s %s", entry->name.c_str(), l->c_str()); def.push_back(buf); } } else if (entry->defaults.if_none.size()) { // Display DEFAULT_IF_NONE: line(s) for (LineList::const_iterator l = entry->defaults.if_none.begin(); l != entry->defaults.if_none.end(); ++l) { - snprintf(buf, sizeof(buf), "%s %s", entry->name.c_str(), gen_quote_escape(*l)); + snprintf(buf, sizeof(buf), "%s %s", entry->name.c_str(), l->c_str()); def.push_back(buf); } } === modified file 'src/redirect.cc' --- src/redirect.cc 2014-03-12 16:46:27 +0000 +++ src/redirect.cc 2014-03-13 10:56:38 +0000 @@ -423,12 +423,12 @@ } if (Config.redirector_extras) { - redirectorExtrasFmt = new ::Format::Format("redirecor_extras"); + redirectorExtrasFmt = new ::Format::Format("url_rewrite_extras"); (void)redirectorExtrasFmt->parse(Config.redirector_extras); } if (Config.storeId_extras) { - storeIdExtrasFmt = new ::Format::Format("storeId_extras"); + storeIdExtrasFmt = new ::Format::Format("store_id_extras"); (void)storeIdExtrasFmt->parse(Config.storeId_extras); }