Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A middleware for proper handling of HEAD requests.

Project Description

guillotine is a WSGI middleware which allows for HEAD requests to be properly handled by your WSGI pipeline. guillotine is intended to be placed as the first, or topmost component in a WSGI pipeline, such that all other middelware is downstream. For an incoming request, guillotine converts the request method from ‘HEAD’ to ‘GET’ before handing the request off to the next downstream middleware or application. guillotine then takes responsiblity for discarding the response body before returning to the application server.

For more information about why you might want to do this see Graham Dumpleton’s article, WSGI issues with HTTP HEAD requests.

Using guillotine with Paster

guillotine provides an entry point for Paster allowing it to be used as a middleware in a pipeline:

pipeline =

Using guillotine “by hand”

If you compose your WSGI pipeline in Python code, guillotine can be constructed directly:

from guillotine import Guillotine

middleware = Guillotine(app)  # app is some WSGI application or pipeline

0.1 (2011-05-20)

  • Initial release.
Release History

Release History

This version
History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
guillotine-0.1.tar.gz (2.7 kB) Copy SHA256 Checksum SHA256 Source May 20, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting