|
@@ -705,7 +705,6 @@ char* HTTP_HistoryPage(uint32_t reqNum, char *bufIn, char *bufOut, uint16_t lenB
|
|
{
|
|
{
|
|
uint8_t i, valueLen = 0;
|
|
uint8_t i, valueLen = 0;
|
|
char value[20];
|
|
char value[20];
|
|
- uint32_t nbytes = 0;
|
|
|
|
|
|
|
|
(void)lenBufIn;
|
|
(void)lenBufIn;
|
|
(void)reqNum;
|
|
(void)reqNum;
|
|
@@ -756,7 +755,6 @@ char* HTTP_UpsHistoryPage(uint32_t reqNum, char *bufIn, char *bufOut, uint16_t l
|
|
{
|
|
{
|
|
uint8_t i, valueLen = 0;
|
|
uint8_t i, valueLen = 0;
|
|
char value[20];
|
|
char value[20];
|
|
- uint32_t nbytes = 0;
|
|
|
|
|
|
|
|
(void)lenBufIn;
|
|
(void)lenBufIn;
|
|
(void)reqNum;
|
|
(void)reqNum;
|
|
@@ -1746,6 +1744,9 @@ char *HTTP_LoginPage(uint32_t reqNum, char *bufIn, char *bufOut, uint16_t lenBuf
|
|
(void)reqNum;
|
|
(void)reqNum;
|
|
uint32_t req_data_received = 0;
|
|
uint32_t req_data_received = 0;
|
|
char *offset = 0;
|
|
char *offset = 0;
|
|
|
|
+
|
|
|
|
+ memset(bufOut, 0, SEND_BUF_MAX_LEN);
|
|
|
|
+
|
|
//printf("request 1: %d\r\n", lenBufIn);
|
|
//printf("request 1: %d\r\n", lenBufIn);
|
|
if (post_data_count == 0) {
|
|
if (post_data_count == 0) {
|
|
/* parse packet for Content-length field */
|
|
/* parse packet for Content-length field */
|
|
@@ -1779,15 +1780,9 @@ char *HTTP_LoginPage(uint32_t reqNum, char *bufIn, char *bufOut, uint16_t lenBuf
|
|
/* End reqest */
|
|
/* End reqest */
|
|
post_data_count = 0;
|
|
post_data_count = 0;
|
|
log_post_reqn = 0;
|
|
log_post_reqn = 0;
|
|
- if (HTTP_ConfirmWebPwd(post_req_data, bufOut, strlen(post_req_data), lenBufOut) == SEND_REQUIRED_YES) {
|
|
|
|
- *lenBufOut = strlen(bufOut);
|
|
|
|
- return bufOut;
|
|
|
|
- } else {
|
|
|
|
- /* Redirect to login page */
|
|
|
|
- fs_open("/login.html", &file);
|
|
|
|
- *lenBufOut = file.len;
|
|
|
|
- return file.data;
|
|
|
|
- }
|
|
|
|
|
|
+ HTTP_ConfirmWebPwd(post_req_data, bufOut, strlen(post_req_data), lenBufOut);
|
|
|
|
+ *lenBufOut = strlen(bufOut);
|
|
|
|
+ return bufOut;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/* request was fragmented before "\r\n\r\n" */
|
|
/* request was fragmented before "\r\n\r\n" */
|
|
@@ -1820,15 +1815,9 @@ char *HTTP_LoginPage(uint32_t reqNum, char *bufIn, char *bufOut, uint16_t lenBuf
|
|
post_data_count = 0;
|
|
post_data_count = 0;
|
|
log_post_reqn = 0;
|
|
log_post_reqn = 0;
|
|
|
|
|
|
- if (HTTP_ConfirmWebPwd(post_req_data, bufOut, strlen(post_req_data), lenBufOut) == SEND_REQUIRED_YES) {
|
|
|
|
- *lenBufOut = strlen(bufOut);
|
|
|
|
- return bufOut;
|
|
|
|
- } else {
|
|
|
|
- /* Redirect to login page */
|
|
|
|
- fs_open("/login.html", &file);
|
|
|
|
- *lenBufOut = file.len;
|
|
|
|
- return file.data;
|
|
|
|
- }
|
|
|
|
|
|
+ HTTP_ConfirmWebPwd(post_req_data, bufOut, strlen(post_req_data), lenBufOut);
|
|
|
|
+ *lenBufOut = strlen(bufOut);
|
|
|
|
+ return bufOut;
|
|
} else {
|
|
} else {
|
|
/* Redirect to login page */
|
|
/* Redirect to login page */
|
|
fs_open("/login.html", &file);
|
|
fs_open("/login.html", &file);
|