Skip to content

Commit

Permalink
add option to turn off timegate link for some dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyudmila Balakireva committed Oct 10, 2012
1 parent 8544558 commit 4856fbf
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions sitestory-apache/mod_sitestory.c
Expand Up @@ -502,8 +502,12 @@ static apr_status_t ta_out_filter3(ap_filter_t *f,apr_bucket_brigade *bb){
token = apr_strtok(req_line," ", &a);
token = apr_strtok(NULL, " ", &a);
line = apr_pstrcat(r->pool,"<",conf->tgurl,sprotocol,r->hostname,token,">;rel=timegate",NULL);
if (conf->tgurl!=NULL) {
apr_table_set(r->headers_out, "Link", line);
int ex = 0;
ex = check_excluded_dirs(conf,r);
if (conf->tgurl!=NULL) {
if (ex==0) {
apr_table_set(r->headers_out, "Link", line);
}
}
//apr_table_add(r->headers_out, "Link", r->the_request);
if (conf->enable_ta) {
Expand All @@ -515,9 +519,8 @@ static apr_status_t ta_out_filter3(ap_filter_t *f,apr_bucket_brigade *bb){
// if (conf->enable_ta) {
// We only process GET requests.
if(r->method_number == M_GET){
int ex=0;

ex= check_excluded_dirs(conf,r);
// int ex=0;
// ex= check_excluded_dirs(conf,r);
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,"mod_sitestory: excluded flag %d",ex) ;
if (ex==0) {
char *uri = r->unparsed_uri;
Expand Down

0 comments on commit 4856fbf

Please sign in to comment.