From 9fc5afec7ece954244296308553ed55382cb4ba7 Mon Sep 17 00:00:00 2001 From: asterix Date: Fri, 30 Sep 2011 10:40:04 +0000 Subject: [PATCH] Define 500 internal error page. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@5125 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/hw/hw_http.c | 13 +++++++++++-- bertos/hw/hw_http.h | 3 +++ boards/sam3x-ek/hw/hw_http.c | 13 +++++++++++-- boards/sam3x-ek/hw/hw_http.h | 3 +++ 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/bertos/hw/hw_http.c b/bertos/hw/hw_http.c index 7d9ba7b3..3e9eb90e 100644 --- a/bertos/hw/hw_http.c +++ b/bertos/hw/hw_http.c @@ -40,7 +40,7 @@ const char http_file_not_found[] = "\ \ \ -404 Not Found

404 Not Found

\ +404 Not Found

404 Not Found

\

The requested URL was not found on this server.


\
BeRTOS simple HTTP server
"; @@ -49,8 +49,17 @@ const size_t http_file_not_found_len = sizeof(http_file_not_found); const char http_sd_not_present[] = " \ \ \ -BeRTOS simple HTTP Server \ +BeRTOS simple HTTP Server \

BeRTOS simple HTTP Server

Simple Http server, the site's pages are stored on SD card, check it if is present.


\ www.BeRTOS.org \ "; const size_t http_sd_not_present_len = sizeof(http_sd_not_present); + +const char http_server_error[] = " \ + \ + \ +404 Not Found

500 Internal Server error

\ +

The internal server error was occur while processing the requested page.


\ +
BeRTOS simple HTTP server
"; + +const size_t http_server_error_len = sizeof(http_server_error_len); diff --git a/bertos/hw/hw_http.h b/bertos/hw/hw_http.h index 88ec1bf7..4ca9eb78 100644 --- a/bertos/hw/hw_http.h +++ b/bertos/hw/hw_http.h @@ -46,4 +46,7 @@ extern const size_t http_file_not_found_len; extern const char http_sd_not_present[]; extern const size_t http_sd_not_present_len; +extern const char http_server_error[]; +extern const size_t http_server_error_len; + #endif /* HW_HTTP_H */ diff --git a/boards/sam3x-ek/hw/hw_http.c b/boards/sam3x-ek/hw/hw_http.c index 7d9ba7b3..3e9eb90e 100644 --- a/boards/sam3x-ek/hw/hw_http.c +++ b/boards/sam3x-ek/hw/hw_http.c @@ -40,7 +40,7 @@ const char http_file_not_found[] = "\ \ \ -404 Not Found

404 Not Found

\ +404 Not Found

404 Not Found

\

The requested URL was not found on this server.


\
BeRTOS simple HTTP server
"; @@ -49,8 +49,17 @@ const size_t http_file_not_found_len = sizeof(http_file_not_found); const char http_sd_not_present[] = " \ \ \ -BeRTOS simple HTTP Server \ +BeRTOS simple HTTP Server \

BeRTOS simple HTTP Server

Simple Http server, the site's pages are stored on SD card, check it if is present.


\ www.BeRTOS.org \ "; const size_t http_sd_not_present_len = sizeof(http_sd_not_present); + +const char http_server_error[] = " \ + \ + \ +404 Not Found

500 Internal Server error

\ +

The internal server error was occur while processing the requested page.


\ +
BeRTOS simple HTTP server
"; + +const size_t http_server_error_len = sizeof(http_server_error_len); diff --git a/boards/sam3x-ek/hw/hw_http.h b/boards/sam3x-ek/hw/hw_http.h index 88ec1bf7..4ca9eb78 100644 --- a/boards/sam3x-ek/hw/hw_http.h +++ b/boards/sam3x-ek/hw/hw_http.h @@ -46,4 +46,7 @@ extern const size_t http_file_not_found_len; extern const char http_sd_not_present[]; extern const size_t http_sd_not_present_len; +extern const char http_server_error[]; +extern const size_t http_server_error_len; + #endif /* HW_HTTP_H */ -- 2.25.1