|
|
@ -4,6 +4,7 @@
|
|
|
|
/* System */
|
|
|
|
/* System */
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/uio.h>
|
|
|
|
#include <sys/uio.h>
|
|
|
|
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <string.h>
|
|
|
@ -267,6 +268,9 @@ static ssize_t http_handle_stats( const int64 client_socket, char *data, char *d
|
|
|
|
h->flag |= STRUCT_HTTP_FLAG_GZIP;
|
|
|
|
h->flag |= STRUCT_HTTP_FLAG_GZIP;
|
|
|
|
format |= TASK_FLAG_GZIP;
|
|
|
|
format |= TASK_FLAG_GZIP;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
/* Touch variable */
|
|
|
|
|
|
|
|
d=d;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/* Pass this task to the worker thread */
|
|
|
|
/* Pass this task to the worker thread */
|
|
|
|
h->flag |= STRUCT_HTTP_FLAG_WAITINGFORTASK;
|
|
|
|
h->flag |= STRUCT_HTTP_FLAG_WAITINGFORTASK;
|
|
|
@ -278,7 +282,7 @@ static ssize_t http_handle_stats( const int64 client_socket, char *data, char *d
|
|
|
|
return -2;
|
|
|
|
return -2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// default format for now
|
|
|
|
/* default format for now */
|
|
|
|
if( !( l = return_stats_for_tracker( static_outbuf + SUCCESS_HTTP_HEADER_LENGTH, mode, 0 ) ) ) HTTPERROR_500;
|
|
|
|
if( !( l = return_stats_for_tracker( static_outbuf + SUCCESS_HTTP_HEADER_LENGTH, mode, 0 ) ) ) HTTPERROR_500;
|
|
|
|
return l;
|
|
|
|
return l;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -288,6 +292,9 @@ static ssize_t http_handle_fullscrape( const int64 client_socket, char *d, size_
|
|
|
|
int format = 0;
|
|
|
|
int format = 0;
|
|
|
|
tai6464 t;
|
|
|
|
tai6464 t;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Touch variables */
|
|
|
|
|
|
|
|
d=d;l=l;
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WANT_COMPRESSION_GZIP
|
|
|
|
#ifdef WANT_COMPRESSION_GZIP
|
|
|
|
d[l-1] = 0;
|
|
|
|
d[l-1] = 0;
|
|
|
|
if( strstr( d, "gzip" ) ) {
|
|
|
|
if( strstr( d, "gzip" ) ) {
|
|
|
|