grmcdorman / esp8266_web_settings

General, non-specific web-based settings/status manager and classes for ESP8266 (possibly usable for other Arduino-class boards).
MIT License
1 stars 0 forks source link

Responses do not include charset=utf-8 #17

Open grmcdorman opened 2 years ago

grmcdorman commented 2 years ago

The response text is in UTF-8, but the content-type header does not specify this. This may result in incorrect interpretation by clients.

grmcdorman commented 2 years ago

The AsyncWebServer does not provide a way to set charset when assembling responses via AsyncJsonResponse. It is not clear if using this class provides much benefit, though; it may be possible to do the same functionality directly using a standard DynamicJsonDocument.