[Seaside-dev] HEAD HTTP method handling in RESTful handlers/filters

Esteban Maringolo emaringolo at gmail.com
Mon Aug 2 19:33:43 UTC 2021


Hi,

As per the RFC the HEAD is identical to a GET but without the body,
but given you might want to have full control of all requests coming
to your REST handler, it might be the case you want to answer HEAD
methods differently (e.g. to avoid serializing things and/or reading
them from the DB).

For some reason the HEAD HTTP method is not available as method in
WARouteBuilder, so it is not possible to have a specific HEAD handling
for a certain route.

Does it make sense not having HEAD support as a possible method for a route?
Having HEAD returning different headers to that of a common GET would
make it not compliant?

This might require not only implementing the configuration pragma in
the WARouteBuilder, but also modifying the WAServerAdaptor to forward
native HEAD requests to the handlers.

Regards!

Esteban A. Maringolo


More information about the seaside-dev mailing list