jblanked 1 год назад
Родитель
Сommit
d8ec2a5b5f
1 измененных файлов с 8 добавлено и 1 удалено
  1. 8 1
      flipper_http.h

+ 8 - 1
flipper_http.h

@@ -1229,7 +1229,14 @@ void flipper_http_rx_callback(const char *line, void *context)
     char *trimmed_line = trim(line);
     if (trimmed_line != NULL && trimmed_line[0] != '\0')
     {
-        fhttp.last_response = (char *)line;
+        // if the line is not [GET/END] or [POST/END] or [PUT/END] or [DELETE/END]
+        if (strstr(trimmed_line, "[GET/END]") == NULL &&
+            strstr(trimmed_line, "[POST/END]") == NULL &&
+            strstr(trimmed_line, "[PUT/END]") == NULL &&
+            strstr(trimmed_line, "[DELETE/END]") == NULL)
+        {
+            fhttp.last_response = (char *)line;
+        }
     }
     free(trimmed_line); // Free the allocated memory for trimmed_line