[Varnish] #1741: All request methods are changed to GET on cache miss

Varnish varnish-bugs at varnish-cache.org
Tue May 26 21:56:08 CEST 2015


#1741: All request methods are changed to GET on cache miss
----------------------+--------------------
 Reporter:  askalski  |       Type:  defect
   Status:  new       |   Priority:  normal
Milestone:            |  Component:  build
  Version:  4.0.3     |   Severity:  normal
 Keywords:            |
----------------------+--------------------
 In commit 2581a69bcdec44e00a6fafb93ca21b6f31d20aef the HEAD->GET logic was
 moved from vcl_recv{} to vcl_miss{}.

 As of that commit, all request methods (previously only HEAD) get
 converted to GET in the backend request.  Although the builtin vcl_recv
 returns "pass" for non-GET/HEAD, a user might trip over this behavior if
 he tries to return "hash" instead.

 For example, a user might want varnish to cache the preflight OPTIONS
 request when implementing CORS.  This is currently not possible because it
 is changed to GET on the backend request.

 Another problem is the behavior is confusing to troubleshoot.  A user
 might wonder why his PUT/POST/DELETE requests are being changed to GET,
 and not realize it was because of a "return(hash)" in his VCL.  For an
 example, see this thread: https://www.varnish-cache.org/forum/topic/235

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1741>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator



More information about the varnish-bugs mailing list