File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public abstract class UnknownHttpMethodProcessor implements Serializable {
3737 private static class NotAllowed extends UnknownHttpMethodProcessor implements ExpressHandler {
3838 @ Override
3939 public Result handle (H .Method method ) {
40- return MethodNotAllowed .INSTANCE ;
40+ return MethodNotAllowed .get () ;
4141 }
4242
4343 private Object readResolve () {
Original file line number Diff line number Diff line change 2727import io .undertow .server .handlers .Cookie ;
2828import io .undertow .util .HttpString ;
2929import org .osgl .http .H ;
30+ import org .osgl .mvc .result .MethodNotAllowed ;
3031import org .osgl .util .E ;
3132import org .osgl .util .IO ;
3233
@@ -63,7 +64,11 @@ public String query() {
6364
6465 @ Override
6566 protected H .Method _method () {
66- return H .Method .valueOfIgnoreCase (hse .getRequestMethod ().toString ());
67+ try {
68+ return H .Method .valueOfIgnoreCase (hse .getRequestMethod ().toString ());
69+ } catch (IllegalArgumentException e ) {
70+ throw MethodNotAllowed .get ();
71+ }
6772 }
6873
6974 @ Override
You can’t perform that action at this time.
0 commit comments