Skip to content

Commit 50ecd56

Browse files
committed
Default to HttpMethod.POST if none specified. Fixes #9878
1 parent 8c81c89 commit 50ecd56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/taglib/FormTagLib.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ class FormTagLib implements ApplicationContextAware, InitializingBean, TagLibrar
410410
} else {
411411
method = linkAttrs[LinkGenerator.ATTRIBUTE_METHOD]?.toUpperCase() ?: 'POST'
412412
}
413-
def httpMethod = HttpMethod.valueOf(method)
413+
def httpMethod = method != null ? HttpMethod.valueOf(method) : HttpMethod.POST
414414
boolean notGet = httpMethod != HttpMethod.GET
415415

416416
if (notGet) {

0 commit comments

Comments
 (0)