diff --git a/apps/webbrowser/http-strings b/apps/webbrowser/http-strings index ea5ebc1e0..2bba32dc8 100644 --- a/apps/webbrowser/http-strings +++ b/apps/webbrowser/http-strings @@ -6,9 +6,8 @@ http_get "GET " http_10 "HTTP/1.0" http_11 "HTTP/1.1" http_content_type "content-type: " -http_texthtml "text/html" http_location "location: " -http_host "host: " +http_host "Host: " http_crnl "\r\n" http_index_html "/index.html" http_404_html "/404.html" diff --git a/apps/webbrowser/http-strings.c b/apps/webbrowser/http-strings.c index 968a71851..3407105c3 100644 --- a/apps/webbrowser/http-strings.c +++ b/apps/webbrowser/http-strings.c @@ -22,15 +22,12 @@ const char http_11[9] = const char http_content_type[15] = /* "content-type: " */ {0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, }; -const char http_texthtml[10] = -/* "text/html" */ -{0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, }; const char http_location[11] = /* "location: " */ {0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, }; const char http_host[7] = -/* "host: " */ -{0x68, 0x6f, 0x73, 0x74, 0x3a, 0x20, }; +/* "Host: " */ +{0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20, }; const char http_crnl[3] = /* "\r\n" */ {0xd, 0xa, }; diff --git a/apps/webbrowser/http-strings.h b/apps/webbrowser/http-strings.h index f197bba2b..5c2cf9396 100644 --- a/apps/webbrowser/http-strings.h +++ b/apps/webbrowser/http-strings.h @@ -6,7 +6,6 @@ extern const char http_get[5]; extern const char http_10[9]; extern const char http_11[9]; extern const char http_content_type[15]; -extern const char http_texthtml[10]; extern const char http_location[11]; extern const char http_host[7]; extern const char http_crnl[3]; diff --git a/apps/webbrowser/www.c b/apps/webbrowser/www.c index 1b8b27ea3..06726e90a 100644 --- a/apps/webbrowser/www.c +++ b/apps/webbrowser/www.c @@ -638,7 +638,7 @@ void webclient_datahandler(char *data, uint16_t len) { if(len > 0) { - if(strcmp(webclient_mimetype(), http_texthtml) == 0) { + if(strstr(webclient_mimetype(), http_html + 1) != 0) { count = (count + 1) & 3; show_statustext(receivingmsgs[count]); htmlparser_parse(data, len); diff --git a/apps/webserver/http-strings b/apps/webserver/http-strings index 579faee74..7a3d51c03 100644 --- a/apps/webserver/http-strings +++ b/apps/webserver/http-strings @@ -6,9 +6,8 @@ http_get "GET " http_10 "HTTP/1.0" http_11 "HTTP/1.1" http_content_type "content-type: " -http_texthtml "text/html" http_location "location: " -http_host "host: " +http_host "Host: " http_crnl "\r\n" http_index_htm "/index.htm" http_index_html "/index.html" diff --git a/apps/webserver/http-strings.c b/apps/webserver/http-strings.c index 4e22787ea..5c02fedef 100644 --- a/apps/webserver/http-strings.c +++ b/apps/webserver/http-strings.c @@ -22,15 +22,12 @@ const char http_11[9] = const char http_content_type[15] = /* "content-type: " */ {0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, }; -const char http_texthtml[10] = -/* "text/html" */ -{0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, }; const char http_location[11] = /* "location: " */ {0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, }; const char http_host[7] = -/* "host: " */ -{0x68, 0x6f, 0x73, 0x74, 0x3a, 0x20, }; +/* "Host: " */ +{0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20, }; const char http_crnl[3] = /* "\r\n" */ {0xd, 0xa, }; diff --git a/apps/webserver/http-strings.h b/apps/webserver/http-strings.h index 35af562d4..01fc8cd9d 100644 --- a/apps/webserver/http-strings.h +++ b/apps/webserver/http-strings.h @@ -6,7 +6,6 @@ extern const char http_get[5]; extern const char http_10[9]; extern const char http_11[9]; extern const char http_content_type[15]; -extern const char http_texthtml[10]; extern const char http_location[11]; extern const char http_host[7]; extern const char http_crnl[3];