This is absolutely the right place. Welcome! (And good on you for choosing Python 3 - migration from Python 2.x is slow, but it will be worth it :) )
The first thing I'll let you know is that we've done quite a bit of work on wfastcgi.py since the last release, so you may want to grab an updated version from
- when we release 2.1 Alpha, there will also be a dedicated installer for it.
Python 3.3 support was the main reason we made so many changes, as well as better adhering to the WSGI specification. Encoding was right at the top of the list of things to fix, and hopefully we've managed it. It will be great if you can try it out and see
if it works.
The most important thing about using it with Python 3 is that you should always deal with
. The encoding you mention has to be used for the FastCGI headers, but we were incorrectly applying it to data as well. Now as long as your WSGI handler only returns bytes, we won't modify them, and the
values should always be bytes (now that we don't encode/decode them).
There are a few parameters that are treated differently due to the encoding (such as
). We follow mod_wsgi's approach as described at
- in short,
are decoded using ISO-8859-15 and the original bytes are stored as
etc. I believe IIS defaults to ISO-8859-15 for parameters, so the decoding we do should never fail, but if it's a problem then we'll happily help fix it. (Possibly we can pick up the encoding from an environment variable rather
than hard-coding it? I haven't looked too far into that.)
Feel free to make any modifications you like to the script, and we're happy to accept contributions back if you make any changes.