diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-11-09 12:47:15 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-11-09 12:47:15 +0000 |
commit | b057041660ebea74a6a2d70847b5a42ae6bd4c7c (patch) | |
tree | 5cfe6ace7f66a8768ca72a0865a8c356115340eb /Projects/Webserver/Lib | |
parent | 65644164792c3eaa9214c5abcb62052ca6ea2344 (diff) | |
download | lufa-b057041660ebea74a6a2d70847b5a42ae6bd4c7c.tar.gz lufa-b057041660ebea74a6a2d70847b5a42ae6bd4c7c.tar.bz2 lufa-b057041660ebea74a6a2d70847b5a42ae6bd4c7c.zip |
Use strcat() in the HTTPServer project instead of using strcpy() and strlen().
Diffstat (limited to 'Projects/Webserver/Lib')
-rw-r--r-- | Projects/Webserver/Lib/HTTPServerApp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Projects/Webserver/Lib/HTTPServerApp.c b/Projects/Webserver/Lib/HTTPServerApp.c index 37377d0af..9d2b8afda 100644 --- a/Projects/Webserver/Lib/HTTPServerApp.c +++ b/Projects/Webserver/Lib/HTTPServerApp.c @@ -218,7 +218,7 @@ static void HTTPServerApp_SendResponseHeader(void) { /* Copy over the HTTP 404 response header and send it to the receiving client */ strcpy_P(AppData, HTTP404Header); - strcpy(&AppData[strlen(AppData)], AppState->HTTPServer.FileName); + strcat(AppData, AppState->HTTPServer.FileName); uip_send(AppData, strlen(AppData)); AppState->HTTPServer.NextState = WEBSERVER_STATE_Closing; @@ -236,7 +236,7 @@ static void HTTPServerApp_SendResponseHeader(void) { if (strcmp(&Extension[1], MIMETypes[i].Extension) == 0) { - strcpy(&AppData[strlen(AppData)], MIMETypes[i].MIMEType); + strcat(AppData, MIMETypes[i].MIMEType); FoundMIMEType = true; break; } @@ -247,11 +247,11 @@ static void HTTPServerApp_SendResponseHeader(void) if (!(FoundMIMEType)) { /* MIME type not found - copy over the default MIME type */ - strcpy_P(&AppData[strlen(AppData)], DefaultMIMEType); + strcat_P(AppData, DefaultMIMEType); } /* Add the end-of-line terminator and end-of-headers terminator after the MIME type */ - strcpy_P(&AppData[strlen(AppData)], PSTR("\r\n\r\n")); + strcat_P(AppData, PSTR("\r\n\r\n")); /* Send the MIME header to the receiving client */ uip_send(AppData, strlen(AppData)); |