Skip to content

A Hardware Hacking Tool with Web-Based CLI That Speaks Every Protocol

only display text or json, not html for http get service

Geo600b4a16b4f6
diff --git a/src/Services/HttpService.cpp b/src/Services/HttpService.cpp
index 4b2fc5bc..3971d6d4 100644
--- a/src/Services/HttpService.cpp
+++ b/src/Services/HttpService.cpp
@@ -88,7 +88,7 @@ void HttpService::getTask(void* pv)
const String ct = self->http_.header("Content-Type");
const bool hasCT = ct.length() > 0;
const bool isJson = hasCT && (ct.indexOf("json") >= 0);
- const bool isText = hasCT && (ct.startsWith("text/") || ct.indexOf("plain") >= 0);
+ const bool isText = hasCT && (ct.indexOf("plain") >= 0);
if (isJson) {
if (!p->onlyContent) result += "\r\nJSON BODY:\n";