summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-09-09 02:02:20 +0000
committerRoger Dingledine <arma@torproject.org>2005-09-09 02:02:20 +0000
commit2065c5f7aaa457acc392c5dfce39e690c5cb5d5b (patch)
treed68c07eb2b02439c538c92c7890b72320a3259cd
parentd0d3d77f48102c7b8b565ec941a6b980db7f2422 (diff)
downloadtor-2065c5f7aaa457acc392c5dfce39e690c5cb5d5b.tar.gz
tor-2065c5f7aaa457acc392c5dfce39e690c5cb5d5b.zip
when printing x-forwarded-by headers, don't print the \r
svn:r4959
-rw-r--r--src/or/directory.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 08a07bd33e..ed6eeb05d5 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -563,7 +563,7 @@ parse_http_url(char *headers, char **url)
/** Return a copy of the first HTTP header in <b>headers</b> whose key is
* <b>which</b>. The key should be given with a terminating colon and space;
* this function copies everything after, up to but not including the
- * following newline. */
+ * following \\r\\n. */
static char *
http_get_header(const char *headers, const char *which)
{
@@ -572,7 +572,7 @@ http_get_header(const char *headers, const char *which)
if (!strcmpstart(cp, which)) {
char *eos;
cp += strlen(which);
- if ((eos = strchr(cp,'\n')))
+ if ((eos = strchr(cp,'\r')))
return tor_strndup(cp, eos-cp);
else
return tor_strdup(cp);
@@ -1333,7 +1333,7 @@ directory_handle_command_post(connection_t *conn, char *headers,
case -2:
case -1:
case 1:
- log_fn(LOG_NOTICE,"Rejected descriptor published by %s.", origin);
+ log_fn(LOG_NOTICE,"Rejected descriptor from %s.", origin);
/* malformed descriptor, or something wrong */
write_http_status_line(conn, 400, msg);
break;