summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Linehan <patientulysses@gmail.com>2012-06-18 14:03:05 -0400
committerJason Linehan <patientulysses@gmail.com>2012-06-18 14:03:05 -0400
commita5bfd2416b76a73a0596551787765e1cbbc6cca9 (patch)
tree4fce7a042b4a671de45e999c273620af6c1da8f3
parentcc775383eda32741875d9d37e7cceb95da58e285 (diff)
downloadcloth-a5bfd2416b76a73a0596551787765e1cbbc6cca9.tar.gz
cloth-a5bfd2416b76a73a0596551787765e1cbbc6cca9.tar.bz2
cloth-a5bfd2416b76a73a0596551787765e1cbbc6cca9.zip
Tweaks
-rw-r--r--log.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/log.c b/log.c
index 44d613a..5d0eb82 100644
--- a/log.c
+++ b/log.c
@@ -54,6 +54,7 @@ void sesinfo_http(struct ses_t *session, char *request)
char *copy; // copy of HTTP request
char *token; // tokenized substring of copy
char *clean; // cleaned-up version of token
+ int i=0;
copy = bdup(request);
@@ -65,8 +66,11 @@ void sesinfo_http(struct ses_t *session, char *request)
token != NULL;
token = strtok(NULL, "**"))
{
- if (clean = field(token, "GET "), clean != NULL)
+ if (clean = field(token, "GET "), clean != NULL) {
pumpf(&session->resource, "%s", clean);
+ while (clean[i++] != ' ')
+ clean[i] = '\0';
+ }
if (clean = field(token, "Host: "), clean != NULL)
pumpf(&session->host, "%s", clean);