From a4e4491b7a17556754321b1a8a3568660d75f571 Mon Sep 17 00:00:00 2001 From: liber_tas Date: Fri, 15 Feb 2019 10:08:37 -0500 Subject: [PATCH] Subtracted one from all file size calculations --- wifi_manager/main/http_server.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wifi_manager/main/http_server.c b/wifi_manager/main/http_server.c index 75ea436..458cfa8 100644 --- a/wifi_manager/main/http_server.c +++ b/wifi_manager/main/http_server.c @@ -163,15 +163,15 @@ void http_server_netconn_serve(struct netconn *conn) { // default page if(strstr(line, "GET / ")) { netconn_write(conn, http_html_hdr, sizeof(http_html_hdr) - 1, NETCONN_NOCOPY); - netconn_write(conn, index_html_start, index_html_end - index_html_start, NETCONN_NOCOPY); + netconn_write(conn, index_html_start, index_html_end - index_html_start - 1, NETCONN_NOCOPY); } else if(strstr(line, "GET /jquery.js ")) { netconn_write(conn, http_jquery_gz_hdr, sizeof(http_jquery_gz_hdr) - 1, NETCONN_NOCOPY); - netconn_write(conn, jquery_gz_start, jquery_gz_end - jquery_gz_start, NETCONN_NOCOPY); + netconn_write(conn, jquery_gz_start, jquery_gz_end - jquery_gz_start - 1, NETCONN_NOCOPY); } else if(strstr(line, "GET /code.js ")) { netconn_write(conn, http_js_hdr, sizeof(http_js_hdr) - 1, NETCONN_NOCOPY); - netconn_write(conn, code_js_start, code_js_end - code_js_start, NETCONN_NOCOPY); + netconn_write(conn, code_js_start, code_js_end - code_js_start - 1, NETCONN_NOCOPY); } else if(strstr(line, "GET /ap.json ")) { /* if we can get the mutex, write the last version of the AP list */ @@ -192,7 +192,7 @@ void http_server_netconn_serve(struct netconn *conn) { } else if(strstr(line, "GET /style.css ")) { netconn_write(conn, http_css_hdr, sizeof(http_css_hdr) - 1, NETCONN_NOCOPY); - netconn_write(conn, style_css_start, style_css_end - style_css_start, NETCONN_NOCOPY); + netconn_write(conn, style_css_start, style_css_end - style_css_start - 1, NETCONN_NOCOPY); } else if(strstr(line, "GET /status.json ")){ if(wifi_manager_lock_json_buffer(( TickType_t ) 10)){ -- 2.17.1