2004-04-27
2004-04-27 16:50:01 by Martin Stjernholm <mast@lysator.liu.se>
-
8119905686052a5cbfc98defe6acf6687e5f5b36
(28 lines)
(+18/-10)
[
Show
| Annotate
]
Branch: 5.2
Some tinkering with the CONNECTION_DEBUG stuff.
Rev: server/protocols/http.pike:1.436
2:
// Modified by Francesco Chemolli to add throttling capabilities.
// Copyright © 1996 - 2001, Roxen IS.
- constant cvs_version = "$Id: http.pike,v 1.435 2004/04/27 15:32:16 mast Exp $";
+ constant cvs_version = "$Id: http.pike,v 1.436 2004/04/27 16:50:01 mast Exp $";
// #define REQUEST_DEBUG
#define MAGIC_ERROR
285: Inside #if defined(CONNECTION_DEBUG)
#ifdef CONNECTION_DEBUG
werror ("HTTP: Send =====================================================\n"
"%s\n",
- replace (sprintf ("%O", what), "\\r\\n", "\n"));
+ replace (sprintf ("%O", what),
+ ({"\\r\\n", "\\n", "\\t"}),
+ ({"\n", "\n", "\t"})));
#else
REQUEST_WERR(sprintf("HTTP: Pipe string %O", what));
#endif
1817: Inside #if defined(CONNECTION_DEBUG)
data += file->file->read(file->len);
#ifdef CONNECTION_DEBUG
werror ("HTTP: Send =====================================================\n"
- "%s\n"
- "HTTP: Send done ================================================\n",
- replace (sprintf ("%O", data), "\\r\\n", "\n"));
+ "%s\n",
+ replace (sprintf ("%O", data),
+ ({"\\r\\n", "\\n", "\\t"}),
+ ({"\n", "\n", "\t"})));
#else
REQUEST_WERR (sprintf ("HTTP: Send blocking %O", data));
#endif
1839: Inside #if defined(CONNECTION_DEBUG)
#ifdef CONNECTION_DEBUG
werror ("HTTP: Send =====================================================\n"
"%s\n",
- replace (sprintf ("%O", data), "\\r\\n", "\n"));
+ replace (sprintf ("%O", data),
+ ({"\\r\\n", "\\n", "\\t"}),
+ ({"\n", "\n", "\t"})));
#else
REQUEST_WERR (sprintf ("HTTP: Send headers blocking %O", head_string));
#endif
1974:
void got_data(mixed fooid, string s)
{
#ifdef CONNECTION_DEBUG
- werror ("HTTP: Got ======================================================\n"
+ werror ("HTTP: Got ------------------------------------------------------\n"
"%s\n",
- replace (sprintf ("%O", s), "\\r\\n", "\n"));
+ replace (sprintf ("%O", s),
+ ({"\\r\\n", "\\n", "\\t"}),
+ ({"\n", "\n", "\t"})));
#else
REQUEST_WERR(sprintf("HTTP: Got %O", s));
#endif
2048:
}
#ifdef CONNECTION_DEBUG
- werror ("HTTP: Got request ==============================================\n");
+ werror ("HTTP: Got request ----------------------------------------------\n");
#endif
if( method == "GET" || method == "HEAD" ) {