You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2020/11/29 17:48:39 UTC

[GitHub] [httpcomponents-core] aukhatov opened a new pull request #233: Add HttpStatus.SC_TOO_MANY_REQUESTS 429 Too Many Requests

aukhatov opened a new pull request #233:
URL: https://github.com/apache/httpcomponents-core/pull/233


   Hi guys!
   The 4.x version of the project doesn't provide `429 Too Many Requests` status by `org.apache.http.HttpStatus`.
   
   This is a little PR to extend it. Because we prefer use HTTP Statuses via this library.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] garydgregory commented on pull request #233: Add HttpStatus.SC_TOO_MANY_REQUESTS 429 Too Many Requests

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #233:
URL: https://github.com/apache/httpcomponents-core/pull/233#issuecomment-735448601


   > > No objections either but I also wonder if a ticket like this should not just be augmented by adding whatever return codes might be missing.
   > 
   > Can you please rephrase?
   
   OK: What are the other return codes not handled by the catalog?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] ok2c commented on pull request #233: Add HttpStatus.SC_TOO_MANY_REQUESTS 429 Too Many Requests

Posted by GitBox <gi...@apache.org>.
ok2c commented on pull request #233:
URL: https://github.com/apache/httpcomponents-core/pull/233#issuecomment-735896708


   @aukhatov Generally we are not supposed to add new features to the 4.4 branch but for small things exceptions can be made. However please do consider migrating to 5.0
   @garydgregory Any objections to merging this PR?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] aukhatov commented on a change in pull request #233: Add HttpStatus.SC_TOO_MANY_REQUESTS 429 Too Many Requests

Posted by GitBox <gi...@apache.org>.
aukhatov commented on a change in pull request #233:
URL: https://github.com/apache/httpcomponents-core/pull/233#discussion_r532245588



##########
File path: httpcore/src/main/java/org/apache/http/impl/EnglishReasonPhraseCatalog.java
##########
@@ -140,6 +140,8 @@ private static void setReason(final int status, final String reason) {
                   "Forbidden");
         setReason(HttpStatus.SC_NOT_FOUND,
                   "Not Found");
+        setReason(HttpStatus.SC_TOO_MANY_REQUESTS,
+                "Too Many Requests");

Review comment:
       @garydgregory I've fixed the indentation




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] michael-o commented on pull request #233: Add HttpStatus.SC_TOO_MANY_REQUESTS 429 Too Many Requests

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #233:
URL: https://github.com/apache/httpcomponents-core/pull/233#issuecomment-735448785


   > 
   > 
   > > > No objections either but I also wonder if a ticket like this should not just be augmented by adding whatever return codes might be missing.
   > > 
   > > 
   > > Can you please rephrase?
   > 
   > OK: What are the other return codes not handled by the catalog?
   
   I think 5.0 has more of them. Likely all WebDAV status codes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] garydgregory commented on a change in pull request #233: Add HttpStatus.SC_TOO_MANY_REQUESTS 429 Too Many Requests

Posted by GitBox <gi...@apache.org>.
garydgregory commented on a change in pull request #233:
URL: https://github.com/apache/httpcomponents-core/pull/233#discussion_r532244944



##########
File path: httpcore/src/main/java/org/apache/http/impl/EnglishReasonPhraseCatalog.java
##########
@@ -140,6 +140,8 @@ private static void setReason(final int status, final String reason) {
                   "Forbidden");
         setReason(HttpStatus.SC_NOT_FOUND,
                   "Not Found");
+        setReason(HttpStatus.SC_TOO_MANY_REQUESTS,
+                "Too Many Requests");

Review comment:
       Nit: The indentation does not match.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] aukhatov commented on pull request #233: Add HttpStatus.SC_TOO_MANY_REQUESTS 429 Too Many Requests

Posted by GitBox <gi...@apache.org>.
aukhatov commented on pull request #233:
URL: https://github.com/apache/httpcomponents-core/pull/233#issuecomment-735587055


   > > > > No objections either but I also wonder if a ticket like this should not just be augmented by adding whatever return codes might be missing.
   > > > 
   > > > 
   > > > Can you please rephrase?
   > > 
   > > 
   > > OK: What are the other return codes not handled by the catalog?
   > 
   > I think 5.0 has more of them. Likely all WebDAV status codes.
   
   I think the same


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] ok2c merged pull request #233: Add HttpStatus.SC_TOO_MANY_REQUESTS 429 Too Many Requests

Posted by GitBox <gi...@apache.org>.
ok2c merged pull request #233:
URL: https://github.com/apache/httpcomponents-core/pull/233


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] garydgregory commented on pull request #233: Add HttpStatus.SC_TOO_MANY_REQUESTS 429 Too Many Requests

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #233:
URL: https://github.com/apache/httpcomponents-core/pull/233#issuecomment-735443648


   No objections either but I also wonder if a ticket like this should not just be augmented by adding whatever return codes might be missing.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] michael-o commented on pull request #233: Add HttpStatus.SC_TOO_MANY_REQUESTS 429 Too Many Requests

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #233:
URL: https://github.com/apache/httpcomponents-core/pull/233#issuecomment-735444283


   > 
   > 
   > No objections either but I also wonder if a ticket like this should not just be augmented by adding whatever return codes might be missing.
   
   Can you please rephrase?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org