From 2d0215d79307deeaecff5494da115adafde5bccc Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Wed, 24 Jan 2007 12:56:15 +0000 Subject: Debugging for failed requests. --- opentracker.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'opentracker.c') diff --git a/opentracker.c b/opentracker.c index e57cc84..2299844 100644 --- a/opentracker.c +++ b/opentracker.c @@ -134,6 +134,9 @@ void senddata(int64 s, struct http_data* h, char *buffer, size_t size ) { void httperror(int64 s,struct http_data* h,const char* title,const char* message) { size_t reply_size = sprintf( static_scratch, "HTTP/1.0 %s\r\nContent-Type: text/html\r\nConnection: close\r\nContent-Length: %zd\r\n\r\n%s\n", title, strlen(message)+strlen(title)+16-4,title+4); +#ifdef _DEBUG_HTTPERROR + fprintf( stderr, "DEBUG: invalid request was: %s\n", (char*)array_start( &h->r ) ); +#endif senddata(s,h,static_scratch,reply_size); } -- cgit v1.2.3