diff options
| -rw-r--r-- | ot_http.c | 9 |
1 files changed, 8 insertions, 1 deletions
| @@ -4,6 +4,7 @@ | |||
| 4 | /* System */ | 4 | /* System */ |
| 5 | #include <sys/types.h> | 5 | #include <sys/types.h> |
| 6 | #include <sys/uio.h> | 6 | #include <sys/uio.h> |
| 7 | #include <arpa/inet.h> | ||
| 7 | #include <stdlib.h> | 8 | #include <stdlib.h> |
| 8 | #include <stdio.h> | 9 | #include <stdio.h> |
| 9 | #include <string.h> | 10 | #include <string.h> |
| @@ -267,6 +268,9 @@ static ssize_t http_handle_stats( const int64 client_socket, char *data, char *d | |||
| 267 | h->flag |= STRUCT_HTTP_FLAG_GZIP; | 268 | h->flag |= STRUCT_HTTP_FLAG_GZIP; |
| 268 | format |= TASK_FLAG_GZIP; | 269 | format |= TASK_FLAG_GZIP; |
| 269 | } | 270 | } |
| 271 | #else | ||
| 272 | /* Touch variable */ | ||
| 273 | d=d; | ||
| 270 | #endif | 274 | #endif |
| 271 | /* Pass this task to the worker thread */ | 275 | /* Pass this task to the worker thread */ |
| 272 | h->flag |= STRUCT_HTTP_FLAG_WAITINGFORTASK; | 276 | h->flag |= STRUCT_HTTP_FLAG_WAITINGFORTASK; |
| @@ -278,7 +282,7 @@ static ssize_t http_handle_stats( const int64 client_socket, char *data, char *d | |||
| 278 | return -2; | 282 | return -2; |
| 279 | } | 283 | } |
| 280 | 284 | ||
| 281 | // default format for now | 285 | /* default format for now */ |
| 282 | if( !( l = return_stats_for_tracker( static_outbuf + SUCCESS_HTTP_HEADER_LENGTH, mode, 0 ) ) ) HTTPERROR_500; | 286 | if( !( l = return_stats_for_tracker( static_outbuf + SUCCESS_HTTP_HEADER_LENGTH, mode, 0 ) ) ) HTTPERROR_500; |
| 283 | return l; | 287 | return l; |
| 284 | } | 288 | } |
| @@ -288,6 +292,9 @@ static ssize_t http_handle_fullscrape( const int64 client_socket, char *d, size_ | |||
| 288 | int format = 0; | 292 | int format = 0; |
| 289 | tai6464 t; | 293 | tai6464 t; |
| 290 | 294 | ||
| 295 | /* Touch variables */ | ||
| 296 | d=d;l=l; | ||
| 297 | |||
| 291 | #ifdef WANT_COMPRESSION_GZIP | 298 | #ifdef WANT_COMPRESSION_GZIP |
| 292 | d[l-1] = 0; | 299 | d[l-1] = 0; |
| 293 | if( strstr( d, "gzip" ) ) { | 300 | if( strstr( d, "gzip" ) ) { |
