]> git.ipfire.org Git - thirdparty/opentracker.git/commitdiff
Debugging for failed requests.
authorerdgeist <>
Wed, 24 Jan 2007 12:56:15 +0000 (12:56 +0000)
committererdgeist <>
Wed, 24 Jan 2007 12:56:15 +0000 (12:56 +0000)
Makefile
opentracker.c

index 74c5db56b19badb24b2b8b267c4e04fd8f102d6c..f12ebc5eea627118d855234b1189e5b5bd37bfd4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 CC?=gcc
-FEATURES=#-D_DEBUG_FDS -DWANT_IP_FROM_QUERY_STRING -DWANT_BLACKLIST -DWANT_CLOSED_TRACKER
+FEATURES=#-DWANT_IP_FROM_QUERY_STRING -DWANT_BLACKLIST -DWANT_CLOSED_TRACKER -D_DEBUG_HTTPERROR
 #DEBUG_OPTS=-g -ggdb -pg # -fprofile-arcs -ftest-coverage
 DEBUG_OPTS=-s -Os
 CFLAGS+=-I../libowfat -Wall -pipe # -pedantic -ansi
index e57cc84295dc9c8b70c613f40cc3b306f2d02c9e..2299844faa4c1308943211f71d66a66d11b35b56 100644 (file)
@@ -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<title>%s</title>\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);
 }