You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2012/06/17 02:17:04 UTC

git commit: Minor cleanup of the response header.

Updated Branches:
  refs/heads/master 3e7be7072 -> 9b5bb0ff6


Minor cleanup of the response header.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/9b5bb0ff
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/9b5bb0ff
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/9b5bb0ff

Branch: refs/heads/master
Commit: 9b5bb0ff64ef6f2ae6db607ee65c60f658e1d669
Parents: 3e7be70
Author: Leif Hedstrom <zw...@apache.org>
Authored: Sat Jun 16 18:16:27 2012 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Sat Jun 16 18:16:38 2012 -0600

----------------------------------------------------------------------
 plugins/stats_over_http/stats_over_http.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9b5bb0ff/plugins/stats_over_http/stats_over_http.c
----------------------------------------------------------------------
diff --git a/plugins/stats_over_http/stats_over_http.c b/plugins/stats_over_http/stats_over_http.c
index f93ce08..6fef6c8 100644
--- a/plugins/stats_over_http/stats_over_http.c
+++ b/plugins/stats_over_http/stats_over_http.c
@@ -84,12 +84,13 @@ stats_add_data_to_resp_buffer(const char *s, stats_state * my_state)
   return s_len;
 }
 
+static const char RESP_HEADER[] =
+  "HTTP/1.0 200 Ok\r\nContent-Type: text/javascript\r\nCache-Control: no-cache\r\n\r\n";
+
 static int
 stats_add_resp_header(stats_state * my_state)
 {
-  char resp[] = "HTTP/1.0 200 Ok\r\nContent-Type: text/javascript\r\nCache-Control: no-cache\r\n\r\n";
-
-  return stats_add_data_to_resp_buffer(resp, my_state);
+  return stats_add_data_to_resp_buffer(RESP_HEADER, my_state);
 }
 
 static void