projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e63ff03
)
Reduce code duplication by setting http->ocmd in parse_http_request()
author
Fabian Keil
<fk@fabiankeil.de>
Tue, 3 Jun 2014 10:25:57 +0000
(10:25 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Tue, 3 Jun 2014 10:25:57 +0000
(10:25 +0000)
jcc.c
patch
|
blob
|
history
urlmatch.c
patch
|
blob
|
history
diff --git
a/jcc.c
b/jcc.c
index
83d1ece
..
d9960f7
100644
(file)
--- a/
jcc.c
+++ b/
jcc.c
@@
-1,4
+1,4
@@
-const char jcc_rcs[] = "$Id: jcc.c,v 1.42
6 2014/06/02 06:19:06
fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.42
7 2014/06/02 06:22:21
fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
@@
-924,11
+924,6
@@
static jb_err change_request_destination(struct client_state *csp)
log_error(LOG_LEVEL_ERROR, "Couldn't parse rewritten request: %s.",
jb_err_to_string(err));
}
log_error(LOG_LEVEL_ERROR, "Couldn't parse rewritten request: %s.",
jb_err_to_string(err));
}
- else
- {
- /* XXX: ocmd is a misleading name */
- http->ocmd = strdup_or_die(http->cmd);
- }
return err;
}
return err;
}
@@
-1607,10
+1602,6
@@
static jb_err receive_client_request(struct client_state *csp)
get_url_actions(csp, http);
}
get_url_actions(csp, http);
}
- /*
- * Save a copy of the original request for logging
- */
- http->ocmd = strdup_or_die(http->cmd);
enlist(csp->headers, http->cmd);
/* Append the previously read headers */
enlist(csp->headers, http->cmd);
/* Append the previously read headers */
diff --git
a/urlmatch.c
b/urlmatch.c
index
57c538e
..
c1fc5cb
100644
(file)
--- a/
urlmatch.c
+++ b/
urlmatch.c
@@
-1,4
+1,4
@@
-const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.8
0 2013/11/24 14:47:45
fabiankeil Exp $";
+const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.8
1 2014/05/26 10:48:07
fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
@@
-543,6
+543,7
@@
jb_err parse_http_request(const char *req, struct http_request *http)
http->cmd = strdup_or_die(req);
http->gpc = strdup_or_die(v[0]);
http->ver = strdup_or_die(v[2]);
http->cmd = strdup_or_die(req);
http->gpc = strdup_or_die(v[0]);
http->ver = strdup_or_die(v[2]);
+ http->ocmd = strdup_or_die(http->cmd);
freez(buf);
freez(buf);