“WSGI from Start to Finish” materials available

I’ve just uploaded the materials for my tutorial at EuroPython 2010, “WSGI from Start to Finish”. You can also get the slides and the WSGI cheat-sheet individually. I’ve updated the slides so that they make sense even without me speaking; so now they have references to the code examples.

The tutorial was recorded and should be published on the EuroPython Web site after the event.

This was the first time I give such a long talk. Three hours talking about WSGI! But it was really fun. And the room was absolutely full, which I couldn’t believe.

6 Comments “WSGI from Start to Finish” materials available

  1. Graham Dumpleton

    One comment about your slides.

    Under ‘No unknown length wsgi.input’ you state ‘Some libraries use “-1”.’ and ‘Others use “0”, which actually means “there are no bytes in wsgi.input”.’. If any WSGI hosting mechanism is using ‘-1’ then they are likely violating both CGI and WSGI specifications and would also probably break any WSGI applications. The use of ‘-1’ has only ever been a suggestion as far as I know for a future version of WSGI and not actually used.

    Where chunked request content is used, there is no Content-Length header. Technically there should also probably thus be no CONTENT_LENGTH variable at all in the WSGI environment and WSGI specification allows for it to be missing, but wouldn’t be surprised if some WSGI adapters always populate it with 0 even though no such header supplied.

    The only one way of really knowing if have unknown length request content is to have no CONTENT_LENGTH and check HTTP_TRANSFER_ENCODING for ‘chunked’. The only WSGI hosting mechanism I know of that supports that is Apache/mod_wsgi and even then you have to set the WSGIChunkedRequest directive to allow handling of chunked request content, given that it sits outside of the WSGI specification.

  2. Gustavo


    Thanks for the note on chunked request content! I’ve just updated the slides.

    BTW, WebOb’s request wrapper sets CONTENT_LENGTH to “-1” when people set the body of the request to a file-like object; if it’s a string, its length is used.


  3. Dharmavirsinh Jhala


    Asking you a question about hosting, as read your past post about webfaction.com
    Your website is pretty fast do you still host it with webfaction.com?

    if not where?


Comments are closed.