summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-05-30 04:53:27 +0000
committerNick Mathewson <nickm@torproject.org>2007-05-30 04:53:27 +0000
commit7bd9c2de24c86cc4c9bee6da556abf42475853c0 (patch)
tree328223a0101eb130b7c1c6be27d0850066392cb9
parent2bb833b43d6be563b06f2ae42102f85d8b105484 (diff)
downloadtor-7bd9c2de24c86cc4c9bee6da556abf42475853c0.tar.gz
tor-7bd9c2de24c86cc4c9bee6da556abf42475853c0.zip
r13082@catbus: nickm | 2007-05-30 00:53:20 -0400
Just in case we have one of the bugs that turned up in the alpha series, backport the patch to tolerate a null reason_phrase in our status line. svn:r10406
-rw-r--r--src/or/directory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 66381bab9a..974e92583d 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -1361,7 +1361,7 @@ write_http_status_line(dir_connection_t *conn, int status,
{
char buf[256];
if (tor_snprintf(buf, sizeof(buf), "HTTP/1.0 %d %s\r\n\r\n",
- status, reason_phrase) < 0) {
+ status, reason_phrase ? reason_phrase : "OK") < 0) {
log_warn(LD_BUG,"Bug: status line too long.");
return;
}