[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] when printing x-forwarded-by headers, don"t print the \r



Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	directory.c 
Log Message:
when printing x-forwarded-by headers, don't print the \r


Index: directory.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.268
retrieving revision 1.269
diff -u -d -r1.268 -r1.269
--- directory.c	8 Sep 2005 22:00:29 -0000	1.268
+++ directory.c	9 Sep 2005 02:02:20 -0000	1.269
@@ -563,7 +563,7 @@
 /** 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 @@
     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 @@
       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;