diff options
Diffstat (limited to '')
-rw-r--r-- | web/server/web_client.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/web/server/web_client.c b/web/server/web_client.c index 53a5944c..53715266 100644 --- a/web/server/web_client.c +++ b/web/server/web_client.c @@ -340,6 +340,8 @@ static inline int access_to_file_is_not_permitted(struct web_client *w, const ch return HTTP_RESP_FORBIDDEN; } +// Work around a bug in the CMocka library by removing this function during testing. +#ifndef REMOVE_MYSENDFILE int mysendfile(struct web_client *w, char *filename) { debug(D_WEB_CLIENT, "%llu: Looking for file '%s/%s'", w->id, netdata_configured_web_dir, filename); @@ -448,11 +450,13 @@ int mysendfile(struct web_client *w, char *filename) { w->response.data->date = statbuf.st_mtimespec.tv_sec; #else w->response.data->date = statbuf.st_mtim.tv_sec; -#endif /* __APPLE__ */ +#endif buffer_cacheable(w->response.data); return HTTP_RESP_OK; } +#endif + #ifdef NETDATA_WITH_ZLIB @@ -1266,7 +1270,7 @@ static inline void web_client_send_http_header(struct web_client *w) { while((bytes = SSL_write(w->ssl.conn, buffer_tostring(w->response.header_output), buffer_strlen(w->response.header_output))) < 0) { count++; if(count > 100 || (errno != EAGAIN && errno != EWOULDBLOCK)) { - error("Cannot send HTTP headers to web client."); + error("Cannot send HTTPS headers to web client."); break; } } |