@@ -590,7 +590,7 @@ are relative to the `/appointments` path. The `get()` method has a further
590590requests for `appointments/new` are handled by that method.
591591
592592The `getForDay()` method shows another usage of `@RequestMapping`: URI templates. (See
593- <<mvc-ann-requestmapping-uri-templates,the next section >>).
593+ <<mvc-ann-requestmapping-uri-templates>>).
594594
595595A `@RequestMapping` on the class level is not required. Without it, all paths are simply
596596absolute, and not relative. The following example from the __PetClinic__ sample
@@ -1162,6 +1162,26 @@ respectively instead. They are intended specifically for that purpose.
11621162====
11631163
11641164
1165+ [[mvc-ann-requestmapping-head-options]]
1166+ ==== HTTP HEAD and HTTP OPTIONS
1167+
1168+ `@RequestMapping` methods mapped to "GET" are also implicitly mapped to "HEAD",
1169+ i.e. there is no need to have "HEAD" explicitly declared. An HTTP HEAD request
1170+ is processed as if it was an HTTP GET except instead of writing the body only
1171+ the number of bytes are counted and the "Content-Length" header set.
1172+
1173+ `@RequestMapping` method have built-in support for HTTP OPTIONS. By default an
1174+ HTTP OPTIONS request is handled by setting the "Allow" response header to the
1175+ HTTP methods explicitly declared on all `@RequestMapping` methods with matching
1176+ URL patterns. When no HTTP methods are explicitly declared the "Allow" header
1177+ is set to "GET,HEAD". Therefore it's highly recommended to always explicitly
1178+ declare the HTTP method(s) an `@RequestMapping` method is meant to handle.
1179+
1180+ Although not necessary an `@RequestMapping` method can be mapped to and handle
1181+ either HTTP HEAD or HTTP OPTIONS, or both.
1182+
1183+
1184+
11651185
11661186[[mvc-ann-methods]]
11671187=== Defining @RequestMapping handler methods
0 commit comments