mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
webclient: 304 and 305 are not really redirects
Eg. The docker API sometimes returns 304 even for requests without etags. https://docs.docker.com/engine/api/v1.40/#operation/ContainerStop
This commit is contained in:
parent
15c65b23c7
commit
2d0a174cec
1 changed files with 7 additions and 1 deletions
|
|
@ -423,9 +423,15 @@ static inline int wget_parsestatus(struct webclient_context *ctx,
|
|||
|
||||
/* Check for 3xx (Redirection)
|
||||
* Location: header line will contain the new location.
|
||||
*
|
||||
* Note: the following 3xx are not redirects.
|
||||
* 304 not modified
|
||||
* 305 use proxy
|
||||
*/
|
||||
|
||||
else if ((http_status / 100) == 3)
|
||||
else if ((http_status / 100) == 3 &&
|
||||
(http_status != 304) &&
|
||||
(http_status != 305))
|
||||
{
|
||||
ws->httpstatus = HTTPSTATUS_MOVED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue