From 7bd9c2de24c86cc4c9bee6da556abf42475853c0 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 30 May 2007 04:53:27 +0000 Subject: [PATCH] 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 --- src/or/directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }