302 redirect causes max redirects error
- Dominant language
- TypeScript
- Stars
- 370
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Sorry to spam the repo with issues.
The response that is returned to the proxy is:
```
< HTTP/1.1 302 FOUND
< Server: Werkzeug/2.2.2 Python/3.10.7
< Date: Mon, 26 Sep 2022 22:33:59 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 669
< Location: $REDURECT_URL
< Vary: Cookie
< Set-Cookie: session=$COOKIE HttpOnly; Path=/
< Connection: close
<
Redirecting...
Redirecting...
You should be redirected automatically to the target URL: $REDURECT_URL. If not, click the link.
```
However, when proxied through openapi-cop, I get this error `Error: Exceeded maxRedirects. Probably stuck in a redirect loop $REDIRECT_URL`. With the server outputting this:
```
(node:8) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pipe listeners added. Use emitter.setMaxListeners() to increase limit
2022-09-26T22:34:53.451Z openapi-cop:proxy Validation results [GET /api/user/signin]
{
"request": {
"valid": true,
"errors": null
}
}
2022-09-26T22:34:53.456Z openapi-cop:proxy Could not send request: Error: Exceeded maxRedirects. Probably stuck in a redirect loop $REDIRECT_URL
```
This makes the proxy unusable for endpoints that redirect.
Contributor guide
Assessment
This issue has not been assessed yet.