trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z..@apache.org
Subject svn commit: r1155285 - in /trafficserver/traffic/trunk: CHANGES proxy/MuxVC.cc proxy/http/HttpPages.cc proxy/http/HttpSM.cc
Date Tue, 09 Aug 2011 09:35:24 GMT
Author: zym
Date: Tue Aug  9 09:35:24 2011
New Revision: 1155285

URL: http://svn.apache.org/viewvc?rev=1155285&view=rev
Log:
TS-813 http_ui /stat/ should response with content type

the default content type is set to text/html

Modified:
    trafficserver/traffic/trunk/CHANGES
    trafficserver/traffic/trunk/proxy/MuxVC.cc
    trafficserver/traffic/trunk/proxy/http/HttpPages.cc
    trafficserver/traffic/trunk/proxy/http/HttpSM.cc

Modified: trafficserver/traffic/trunk/CHANGES
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/CHANGES?rev=1155285&r1=1155284&r2=1155285&view=diff
==============================================================================
--- trafficserver/traffic/trunk/CHANGES (original)
+++ trafficserver/traffic/trunk/CHANGES Tue Aug  9 09:35:24 2011
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 
 Changes with Apache Traffic Server 3.1.0
+  *) [TS-813] fix http_ui /stat/ to response with content type
+
   *) [TS-849] fix some variables for traffic_line -s setting
 
   *) [TS-874] make asf-dist work with git repo

Modified: trafficserver/traffic/trunk/proxy/MuxVC.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/MuxVC.cc?rev=1155285&r1=1155284&r2=1155285&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/MuxVC.cc (original)
+++ trafficserver/traffic/trunk/proxy/MuxVC.cc Tue Aug  9 09:35:24 2011
@@ -2843,7 +2843,8 @@ MuxPagesHandler::handle_callback(int eve
       StatPageData data;
 
       data.data = response;
-      data.type = NULL;
+      data.type = (char *) xmalloc(10);
+      snprintf(data.type, 10, "text/html");
       data.length = response_length;
       response = NULL;
 

Modified: trafficserver/traffic/trunk/proxy/http/HttpPages.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/HttpPages.cc?rev=1155285&r1=1155284&r2=1155285&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/HttpPages.cc (original)
+++ trafficserver/traffic/trunk/proxy/http/HttpPages.cc Tue Aug  9 09:35:24 2011
@@ -447,7 +447,8 @@ HttpPagesHandler::handle_callback(int ev
       StatPageData data;
 
       data.data = response;
-      data.type = NULL;
+      data.type = (char *) xmalloc(10);
+      snprintf(data.type, 10, "text/html");
       data.length = response_length;
       response = NULL;
 

Modified: trafficserver/traffic/trunk/proxy/http/HttpSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/HttpSM.cc?rev=1155285&r1=1155284&r2=1155285&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/HttpSM.cc (original)
+++ trafficserver/traffic/trunk/proxy/http/HttpSM.cc Tue Aug  9 09:35:24 2011
@@ -2149,7 +2149,13 @@ HttpSM::state_handle_stat_page(int event
     if (data) {
       StatPageData *spd = (StatPageData *) data;
       t_state.internal_msg_buffer = spd->data;
-      t_state.internal_msg_buffer_type = spd->type;
+      if (spd->type)
+        t_state.internal_msg_buffer_type = spd->type;
+      else {
+        Debug("http_zym", "spd->type is null");
+        t_state.internal_msg_buffer_type = (char *) xmalloc(10);
+        snprintf(t_state.internal_msg_buffer_type, 10, "text/html");
+      }
       t_state.internal_msg_buffer_size = spd->length;
       t_state.internal_msg_buffer_fast_allocator_size = -1;
     }



Mime
View raw message