Branch: Tag:

2008-03-14

2008-03-14 13:25:26 by Martin Stjernholm <mast@lysator.liu.se>

Avoid showing the headers twice if CONNECTION_DEBUG matches the
content type.

Rev: server/protocols/http.pike:1.552

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2004, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.551 2008/02/28 15:27:34 jonasw Exp $"; + constant cvs_version = "$Id: http.pike,v 1.552 2008/03/14 13:25:26 mast Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
52:   #define MARK_FD(X) do {} while (0)   #endif    + #define TOSTR(X) #X + #define TOSTR2(X) TOSTR(X) +    #ifdef CONNECTION_DEBUG   // Currently only used by CONNECTION_DEBUG to label each message with   // the fd.
324:    if(!pipe) setup_pipe();    if(stringp(what)) {   #ifdef CONNECTION_DEBUG - #define TOSTR(X) #X - #define TOSTR2(X) TOSTR(X) +    #if TOSTR2(CONNECTION_DEBUG) != "1"    // CONNECTION_DEBUG may be defined to something like "text/" to    // see the response content for all content types with that
1914:    } else {    MY_TRACE_ENTER("Async write.", 0);   #ifdef CONNECTION_DEBUG -  werror("HTTP[%s]: Response headers =====================================\n" + #if TOSTR2 (CONNECTION_DEBUG) != "1" +  if (!has_prefix (this_program::file->type || "", TOSTR2 (CONNECTION_DEBUG))) +  // Avoid showing the headers twice if CONNECTION_DEBUG matches +  // the content type. + #endif +  werror("HTTP[%s]: " +  "Response headers =====================================\n"    "%s\n", DEBUG_GET_FD,    replace(sprintf("%O", headers),    ({"\\r\\n", "\\n", "\\t"}),