If your WSGI application for instance does not natively support HEAD requests, 
because it only handles GET requests, you can use this middleware to do the 
rewrite, have your WSGI app return the whole response, and Guillotine will then 
return a body less response to the remote client.

Bert

> On Oct 18, 2019, at 15:47, Jens Troeger <[email protected]> wrote:
> 
> Hello,
> 
> Today I stumbled upon a somewhat dated Pylons project called Guillotine 
> <https://github.com/Pylons/guillotine>, a WSGI middleware 
> <https://docs.pylonsproject.org/projects/pyramid/en/1.10-branch/glossary.html#term-middleware>
>  extension. It seems to have only one purpose: rewrite the request method of 
> HEAD requests into GET.
> 
> Now I am curious about the why. A HEAD request is, as per documentation 
> <https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD>, pretty much 
> a GET without body. So what’s the purpose then of this particular extension 
> and the rewrite?
> 
> Much thanks,
> Jens
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pylons-discuss/cd9466d9-47ce-410f-9b36-5a47417cf8f2%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/pylons-discuss/cd9466d9-47ce-410f-9b36-5a47417cf8f2%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/F107895E-EF6E-4FEA-8971-AC414FADC28A%400x58.com.

Reply via email to