zeroflag commented on code in PR #799:
URL: https://github.com/apache/knox/pull/799#discussion_r1350073117


##########
gateway-service-knoxtoken/src/main/java/org/apache/knox/gateway/service/knoxtoken/TokenResource.java:
##########
@@ -559,6 +569,22 @@ public Response renew(String token) {
     return resp;
   }
 
+  @DELETE
+  @Path(BATCH_REVOKE_PATH)
+  @Produces({APPLICATION_JSON})
+  public Response revokeTokens(String tokenIds) {
+    final List<String> ids = GSON.fromJson(tokenIds, List.class);

Review Comment:
   Hmm, I remember there was some arguments whether DELETE requests are allowed 
to have request bodies or not. Maybe the frameworks think it's not allowed 
therefore it rejects it.
   
   I found this:
   
   
   > There is nothing in the specifications that prohibits the use of a body 
for a HTTP Delete request. However for > some HTTP clients this may not be 
implemented and some servers may ignore it, work incorrectly or refuse the>  
request.
   
   
   Does it work in all major web browsers?



##########
gateway-service-knoxtoken/src/main/java/org/apache/knox/gateway/service/knoxtoken/TokenResource.java:
##########
@@ -559,6 +569,22 @@ public Response renew(String token) {
     return resp;
   }
 
+  @DELETE
+  @Path(BATCH_REVOKE_PATH)
+  @Produces({APPLICATION_JSON})
+  public Response revokeTokens(String tokenIds) {
+    final List<String> ids = GSON.fromJson(tokenIds, List.class);

Review Comment:
   Hmm, I remember there was some arguments whether DELETE requests are allowed 
to have request bodies or not. Maybe the frameworks think it's not allowed 
therefore it rejects it.
   
   I found this:
   
   
   > There is nothing in the specifications that prohibits the use of a body 
for a HTTP Delete request. However for  some HTTP clients this may not be 
implemented and some servers may ignore it, work incorrectly or refuse the  
request.
   
   
   Does it work in all major web browsers?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to