Skip to content

HTTPClient: Split "HTTPC_ERROR_READ_TIMEOUT" up into more detailed error codes #8302

Open
@M-Reimer

Description

@M-Reimer

I'm currently facing an issue with some "IoT device web server" which at some point seems to be a bit off with how they implemented the HTTP standard. After some runtime in some situation I end up getting "HTTPC_ERROR_READ_TIMEOUT" all the time. Sometimes this "revives" somehow just to reappear later.

The problem is that this error code could actually mean different things. Several checks return this code. We have it at the following locations in the GIT revision I've checked (with GIT revision in URLs to make them "stable"):

  1. case Stream::Report::TimedOut: return HTTPC_ERROR_READ_TIMEOUT;
  2. return returnError(HTTPC_ERROR_READ_TIMEOUT);
  3. return returnError(HTTPC_ERROR_READ_TIMEOUT);
  4. return HTTPC_ERROR_READ_TIMEOUT;

Where only the last one actually is based on actual measurement of time. The first one may also be timeout related (didn't dig that deep). Point 2 and 3 can also be "malformed data" which would be interesting to know so I can check what my server does wrong here. Probably it would be even possible to make the HTTPClient more robust once I know what is wrong on the server side. The access works every time with a "regular browser" so I guess the HTTP implementation is more forgiving there.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions