aboutsummaryrefslogtreecommitdiff
path: root/Projects/Webserver/Lib/HTTPServerApp.c
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-03-10 12:48:20 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-03-10 12:48:20 +0000
commit51e27aced8a4681ae22873360a8970ad1d60a249 (patch)
treecc807cb6af03604e0f019c181b96d31f39b08dcd /Projects/Webserver/Lib/HTTPServerApp.c
parentaa320b20c349f8c0888f47cc16c1b55862c93986 (diff)
Added ENABLE_TELNET_SERVER compile time option to the Webserver project to disable the TELNET server if desired.
Change over static strings in the Webserver project to use PROGMEM where possible. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1162 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Projects/Webserver/Lib/HTTPServerApp.c')
-rw-r--r--Projects/Webserver/Lib/HTTPServerApp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Projects/Webserver/Lib/HTTPServerApp.c b/Projects/Webserver/Lib/HTTPServerApp.c
index 1a1d2c4b..08d84943 100644
--- a/Projects/Webserver/Lib/HTTPServerApp.c
+++ b/Projects/Webserver/Lib/HTTPServerApp.c
@@ -56,12 +56,12 @@ const char PROGMEM HTTP404Header[] = "HTTP/1.1 404 Not Found\r\n"
"Content-Type: text/plain\r\n\r\n"
"Error 404: File Not Found: /";
-/** Default MIME type sent if no other MIME type can be determined. */
-const char PROGMEM DefaultMIMEType[] = "text/plain";
-
/** Default filename to fetch when a directory is requested */
const char PROGMEM DefaultDirFileName[] = "index.htm";
+/** Default MIME type sent if no other MIME type can be determined. */
+const char PROGMEM DefaultMIMEType[] = "text/plain";
+
/** List of MIME types for each supported file extension. */
const MIME_Type_t MIMETypes[] =
{
@@ -174,7 +174,7 @@ static void HTTPServerApp_OpenRequestedFile(void)
char* RequestedFileName = strtok(NULL, " ");
/* Must be a GET request, abort otherwise */
- if (strcmp(RequestToken, "GET") != 0)
+ if (strcmp_P(RequestToken, PSTR("GET")) != 0)
{
uip_abort();
return;
@@ -257,7 +257,7 @@ static void HTTPServerApp_SendResponseHeader(void)
}
/* Add the end-of-line terminator and end-of-headers terminator after the MIME type */
- strcpy(&AppData[strlen(AppData)], "\r\n\r\n");
+ strcpy_P(&AppData[strlen(AppData)], PSTR("\r\n\r\n"));
/* Send the MIME header to the receiving client */
uip_send(AppData, strlen(AppData));