Skip to content

Incorrect Content-Type Header in Local API Response #40

@cnadler86

Description

@cnadler86

The Zendure SolarFlow local HTTP API returns JSON data with an incorrect Content-Type header. The API endpoint /properties/report responds with valid JSON data but sets the Content-Type header to text/html instead of application/json (the response body is valid JSON, but the Content-Type header is incorrect.).

This causes issues with HTTP clients that strictly validate Content-Type headers before attempting to parse JSON responses (e.g., aiohttp, axios, fetch with strict mode).

Device Information

  • Model: SolarFlow 800 Pro
  • Firmware Version: V1.0.23
  • API Version: 2

Steps to Reproduce

  1. Connect to the SolarFlow device on local network
  2. Send HTTP GET request to: http://[device-ip]/properties/report
  3. Inspect the response headers

Expected Behavior

The API should return:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: [length]

{
  "timestamp": 1768894931,
  "messageId": 6,
  "sn": "EOAxxxxxx",
  ...
}

Actual Behavior

The API returns:

HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: [length]

{
  "timestamp": 1768894931,
  "messageId": 6,
  "sn": "EOAxxxxxx",
  ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions