Simple HTTP Server with one page index.html stored inside MBED as char vector and javascript to update a table content
Fork of HTTP_SERVER by
Diff: HTTP_SERVER.cpp
- Revision:
- 4:b551799053c6
- Parent:
- 3:59884bc0a238
- Child:
- 5:dedbaa9c633b
diff -r 59884bc0a238 -r b551799053c6 HTTP_SERVER.cpp --- a/HTTP_SERVER.cpp Sat Nov 26 18:22:42 2016 +0000 +++ b/HTTP_SERVER.cpp Sat Nov 26 18:30:33 2016 +0000 @@ -166,7 +166,7 @@ header_field_val = strtok(NULL, "\r\n"); header_field_val++; - if(header_field_name != NULL) { + if(header_field_name - 1 != NULL) { if(!strcmp(header_field_name, "Connection")) { field_Connection = header_field_val; } else if(!strcmp(header_field_name, "Upgrade")) { @@ -178,7 +178,9 @@ } else if(!strcmp(header_field_name, "Origin") ) { field_Origin = header_field_val; } - } else break; + } else { + break; + } #ifdef DEBUG printf("(HTTP_SERVER) *header_field_name adr: %d %s\r\n", header_field_name - 1, header_field_name); printf("(HTTP_SERVER) header_field_val adr: %d %s\r\n", header_field_val - 1, header_field_val);