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

[or-cvs] r18297: {tor} Actually send the extra_headers content in write_http_respon (in tor/trunk: . src/or)



Author: nickm
Date: 2009-01-28 11:06:46 -0500 (Wed, 28 Jan 2009)
New Revision: 18297

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/directory.c
Log:
Actually send the extra_headers content in write_http_response_header_impl.  This make X-Descriptor-Now-New get sent.  Bugfix on 0.2.0.10-alpha.  Spotted by "multiplication".

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2009-01-28 15:37:52 UTC (rev 18296)
+++ tor/trunk/ChangeLog	2009-01-28 16:06:46 UTC (rev 18297)
@@ -11,6 +11,8 @@
       0.0.9pre6.
     - Remove a bash-ism from configure.in to build properly on non-Linux
       platforms.  Bugfix on 0.2.1.1-alpha.
+    - Fix code so authorities _actually_ send back X-Descriptor-Not-New
+      headers.  Bugfix on 0.2.0.10-alpha.
 
   o Minor features:
     - Support platforms where time_t is 64 bits long. (Congratulations,

Modified: tor/trunk/src/or/directory.c
===================================================================
--- tor/trunk/src/or/directory.c	2009-01-28 15:37:52 UTC (rev 18296)
+++ tor/trunk/src/or/directory.c	2009-01-28 16:06:46 UTC (rev 18297)
@@ -2165,8 +2165,10 @@
     strlcpy(cp, "Pragma: no-cache\r\n", sizeof(tmp)-(cp-tmp));
     cp += strlen(cp);
   }
-  if (extra_headers)
+  if (extra_headers) {
     strlcpy(cp, extra_headers, sizeof(tmp)-(cp-tmp));
+    cp += strlen(cp);
+  }
   if (sizeof(tmp)-(cp-tmp) > 3)
     memcpy(cp, "\r\n", 3);
   else