From 2065c5f7aaa457acc392c5dfce39e690c5cb5d5b Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Fri, 9 Sep 2005 02:02:20 +0000 Subject: when printing x-forwarded-by headers, don't print the \r svn:r4959 --- src/or/directory.c | 6 +++--- 1 file 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 headers whose key is * which. 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; -- cgit v1.2.3-54-g00ecf