X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/16ea5aa7a2e5f326f8ff129e740a19bb3fb7829f..7ae91099e9b356d3f9fe14b41a53a6af1161690c:/Projects/Webserver/Lib/HTTPServerApp.c diff --git a/Projects/Webserver/Lib/HTTPServerApp.c b/Projects/Webserver/Lib/HTTPServerApp.c index 9a70dade1..c2263cb98 100644 --- a/Projects/Webserver/Lib/HTTPServerApp.c +++ b/Projects/Webserver/Lib/HTTPServerApp.c @@ -150,7 +150,7 @@ void HTTPServerApp_Callback(void) } } -/** HTTP Server State handler for the Request Process state. This state manages the processing of incomming HTTP +/** HTTP Server State handler for the Request Process state. This state manages the processing of incoming HTTP * GET requests to the server from the receiving HTTP client. */ static void HTTPServerApp_OpenRequestedFile(void) @@ -198,8 +198,7 @@ static void HTTPServerApp_SendResponseHeader(void) uip_tcp_appstate_t* const AppState = &uip_conn->appstate; char* const AppData = (char*)uip_appdata; - char* HeaderToSend; - uint16_t HeaderLength; + char* HeaderToSend; /* Determine which HTTP header should be sent to the client */ if (AppState->HTTPServer.FileOpen) @@ -214,9 +213,8 @@ static void HTTPServerApp_SendResponseHeader(void) } /* Copy over the HTTP response header and send it to the receiving client */ - HeaderLength = strlen_P(HeaderToSend); - strncpy_P(AppData, HeaderToSend, HeaderLength); - uip_send(AppData, HeaderLength); + strcpy_P(AppData, HeaderToSend); + uip_send(AppData, strlen(AppData)); } /** HTTP Server State handler for the MIME Header Send state. This state manages the transmission of the file