-
-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
network: do not retry on 429 and 503 #5727
Conversation
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
This should have tests. |
fwiw, it would have been better if this was added to the rate limiter rather than stopping completely. |
NoRouteToHostException.class, | ||
SSLException.class); | ||
|
||
private static final List<Integer> RETRIABLE_CODES = Arrays.asList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List.of()
Vs Arrays.asList()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
24fac82
to
ef249a6
Compare
I've added a test for both 429 and 503 status codes |
Would that be an additional change in combination with this PR or instead of this PR? I didn't see how the rate limiter could help with the behavior of the underlying http client retry strategy, but I'm not that familiar with the networking code here. Let me know if the team prefers a different solution. |
.../network/src/test/java/org/zaproxy/addon/network/internal/client/HttpSenderImplUnitTest.java
Outdated
Show resolved
Hide resolved
Looks good but we should verify the behaviour more broadly. It does not need to be in this PR. It would be an improvement for the rate limiter, this change/PR is still needed either way. |
Signed-off-by: FiveOFive <[email protected]>
ef249a6
to
60b8761
Compare
Thank you! |
Overview
This is fix for when ZAP is stuck waiting to retry requests after receiving a response with the
retry-after
header set. See zaproxy/zaproxy#8627Related Issues
Fix zaproxy/zaproxy#8627.
Checklist
./gradlew spotlessApply
for code formattingFor more details, please refer to the developer rules and guidelines.