|
1 | 1 | /* |
2 | | - * Copyright (c) 2001-2024, Inversoft Inc., All Rights Reserved |
| 2 | + * Copyright (c) 2001-2025, Inversoft Inc., All Rights Reserved |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
27 | 27 | import io.fusionauth.http.server.HTTPRequest; |
28 | 28 | import io.fusionauth.http.server.HTTPResponse; |
29 | 29 | import org.primeframework.mvc.NotAllowedException; |
| 30 | +import org.primeframework.mvc.NotImplementedException; |
30 | 31 | import org.primeframework.mvc.http.HTTPTools; |
31 | 32 | import org.primeframework.mvc.http.Status; |
32 | 33 | import org.primeframework.mvc.parameter.fileupload.annotation.FileUpload; |
@@ -93,7 +94,15 @@ public void perform(WorkflowChain chain) throws IOException { |
93 | 94 | if (actionInvocation.action != null && actionInvocation.method == null) { |
94 | 95 | Class<?> actionClass = actionInvocation.configuration.actionClass; |
95 | 96 | logger.debug("The action class [{}] does not have a valid execute method for the HTTP method [{}]", actionClass.getCanonicalName(), method); |
96 | | - throw new NotAllowedException(); |
| 97 | + |
| 98 | + // Differentiate between not allowed for this action, vs not-implemented (supported by prime-mvc). |
| 99 | + if (HTTPMethod.StandardMethods.containsKey(method.name())) { |
| 100 | + throw new NotAllowedException(); |
| 101 | + } |
| 102 | + |
| 103 | + // Note that the DefaultActionConfigurationBuilder will only resolve executeMethods for methods named in StandardMethods. |
| 104 | + // See HTTPMethod.StandardMethods and DefaultActionConfigurationBuilder.findExecuteMethods |
| 105 | + throw new NotImplementedException(); |
97 | 106 | } |
98 | 107 |
|
99 | 108 | // Handle multipart file configuration |
|
0 commit comments