static char static_inbuf[8192];
static char static_outbuf[8192];
-static char static_tmpbuf[8192];
#define OT_MAXMULTISCRAPE_COUNT 64
static ot_hash multiscrape_buf[OT_MAXMULTISCRAPE_COUNT];
size_t reply_size = 0, reply_off;
#ifdef _DEBUG_HTTPERROR
- memcpy( debug_request, data, sizeof( debug_request ) );
+ memcpy( debug_request, data, l );
+ data[l] = 0;
#endif
/* This one implicitely tests strlen < 5, too -- remember, it is \n terminated */
case 6: /* scrape ? */
if( byte_diff( data, 6, "scrape") ) HTTPERROR_404;
- /* We want the pure plain un-unescaped text */
- memmove( static_tmpbuf, static_inbuf, 8192 );
-
/* Full scrape... you might want to limit that */
if( !byte_diff( data, 12, "scrape HTTP/" ) ) {
LOG_TO_STDERR( "[%08d] scrp: %d.%d.%d.%d - FULL SCRAPE\n", (unsigned int)(g_now - ot_start_time), h->ip[0], h->ip[1], h->ip[2], h->ip[3] );
-write( 2, static_tmpbuf, l );
-
+#ifdef _DEBUG_HTTPERROR
+write( 2, debug_request, l );
+#endif
if( !( reply_size = return_fullscrape_for_tracker( &reply ) ) ) HTTPERROR_500;
ot_overall_tcp_successfulannounces++;
return sendmmapdata( s, reply, reply_size );