Changeset d5e874f044bab0a29349b5d8c5b05094f65e2848

Show
Ignore:
Timestamp:
05/07/10 14:05:44 (5 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1273241144 +0000
git-parent:

[76fe6db0c89a251ee20c5204141ceb0c9c1c9cd3]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1273241144 +0000
Message:

always process the querystring after finalizing the request, fixes #274

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_http.c

    r73860f6 rd5e874f  
    216216  time_ms = diff.tv_sec * 1000 + diff.tv_usec / 1000; 
    217217  noit_convert_sockaddr_to_buff(ip, sizeof(ip), &ctx->ac->remote.remote_addr); 
    218   noitL(http_access, "%s - - [%s] \"%s %s %s\" %d %llu %.3f\n", 
     218  noitL(http_access, "%s - - [%s] \"%s %s%s%s %s\" %d %llu %.3f\n", 
    219219        ip, timestr, 
    220         ctx->req.method_str, ctx->req.uri_str, ctx->req.protocol_str, 
     220        ctx->req.method_str, ctx->req.uri_str, 
     221        ctx->req.orig_qs ? "?" : "", ctx->req.orig_qs ? ctx->req.orig_qs : "", 
     222        ctx->req.protocol_str, 
    221223        ctx->res.status_code, 
    222224        (long long unsigned)ctx->res.bytes_written, 
     
    453455  if(!cp) return; 
    454456  *cp++ = '\0'; 
     457  req->orig_qs = strdup(cp); 
    455458  for (interest = strtok_r(cp, "&", &brk); 
    456459       interest; 
     
    572575  } 
    573576  RELEASE_BCHAIN(ctx->req.current_request_chain); 
     577  if(ctx->req.orig_qs) free(ctx->req.orig_qs); 
    574578  memset(&ctx->req, 0, sizeof(ctx->req)); 
    575579} 
     
    706710    } 
    707711    noitL(http_debug, "HTTP start request (%s)\n", ctx->req.uri_str); 
     712    noit_http_process_querystring(&ctx->req); 
    708713  } 
    709714 
  • src/noit_http.h

    r37f5a09 rd5e874f  
    9898  noit_boolean complete; 
    9999  struct timeval start_time; 
     100  char *orig_qs; 
    100101} noit_http_request; 
    101102