|
@@ -60,13 +60,13 @@ char *HTTP_GetParamsPage(uint32_t reqNum, char *bufIn, char *bufOut, uint16_t le
|
|
memset(bufOut, 0, SEND_BUF_MAX_LEN);
|
|
memset(bufOut, 0, SEND_BUF_MAX_LEN);
|
|
|
|
|
|
// Headers для поддержки saffari
|
|
// Headers для поддержки saffari
|
|
- strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n");
|
|
|
|
|
|
+ strcpy(bufOut, "HTTP/1.1 200 OK\r\nContent-Type:text/html\r\n\r\n");
|
|
|
|
|
|
monitor_param = cJSON_CreateObject();
|
|
monitor_param = cJSON_CreateObject();
|
|
#define XJSON_PARAMS_TAG(tag, get_param) JSON_ADD_TAG(tag, get_param, monitor_param);
|
|
#define XJSON_PARAMS_TAG(tag, get_param) JSON_ADD_TAG(tag, get_param, monitor_param);
|
|
WEB_PARAMS_TAGS_TABLE
|
|
WEB_PARAMS_TAGS_TABLE
|
|
#undef XJSON_PARAMS_TAG
|
|
#undef XJSON_PARAMS_TAG
|
|
- if(cJSON_PrintPreallocated(monitor_param, bufOut, SEND_BUF_MAX_LEN, 0)) {
|
|
|
|
|
|
+ if(cJSON_PrintPreallocated(monitor_param, &bufOut[strlen(bufOut)], SEND_BUF_MAX_LEN, 0)) {
|
|
*lenBufOut = strlen(bufOut);
|
|
*lenBufOut = strlen(bufOut);
|
|
} else {
|
|
} else {
|
|
*lenBufOut = 0;
|
|
*lenBufOut = 0;
|
|
@@ -94,13 +94,13 @@ char *HTTP_GetSettingsPage(uint32_t reqNum, char *bufIn, char *bufOut, uint16_t
|
|
cJSON *settings_param = NULL;
|
|
cJSON *settings_param = NULL;
|
|
|
|
|
|
/* Headers для поддержки saffari */
|
|
/* Headers для поддержки saffari */
|
|
- strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n");
|
|
|
|
|
|
+ strcpy(bufOut, "HTTP/1.1 200 OK\r\nContent-Type:text/html\r\n\r\n");
|
|
|
|
|
|
settings_param = cJSON_CreateObject();
|
|
settings_param = cJSON_CreateObject();
|
|
#define XJSON_SETTINGS_TAG(tag, get_param, set_param) JSON_ADD_TAG(tag, get_param, settings_param);
|
|
#define XJSON_SETTINGS_TAG(tag, get_param, set_param) JSON_ADD_TAG(tag, get_param, settings_param);
|
|
WEB_SETTINGS_TAGS_TABLE
|
|
WEB_SETTINGS_TAGS_TABLE
|
|
#undef XJSON_SETTINGS_TAG
|
|
#undef XJSON_SETTINGS_TAG
|
|
- if(cJSON_PrintPreallocated(settings_param, bufOut, SEND_BUF_MAX_LEN, 0)) {
|
|
|
|
|
|
+ if(cJSON_PrintPreallocated(settings_param, &bufOut[strlen(bufOut)], SEND_BUF_MAX_LEN, 0)) {
|
|
*lenBufOut = strlen(bufOut);
|
|
*lenBufOut = strlen(bufOut);
|
|
} else {
|
|
} else {
|
|
*lenBufOut = 0;
|
|
*lenBufOut = 0;
|