diff options
Diffstat (limited to '')
-rw-r--r-- | test/python/encoding/wsgi.py | 12 | ||||
-rw-r--r-- | test/python/unicode/wsgi.py | 8 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/python/encoding/wsgi.py b/test/python/encoding/wsgi.py new file mode 100644 index 00000000..0a916a9b --- /dev/null +++ b/test/python/encoding/wsgi.py @@ -0,0 +1,12 @@ +import sys + + +def application(environ, start_response): + start_response( + '200', + [ + ('Content-Length', '0'), + ('X-Encoding', sys.getfilesystemencoding()), + ], + ) + return [] diff --git a/test/python/unicode/wsgi.py b/test/python/unicode/wsgi.py new file mode 100644 index 00000000..40043af9 --- /dev/null +++ b/test/python/unicode/wsgi.py @@ -0,0 +1,8 @@ +def application(environ, start_response): + temp_dir = environ.get('HTTP_TEMP_DIR') + + with open(temp_dir + '/tempfile', 'w') as f: + f.write('\u26a0\ufe0f') + + start_response('200', [('Content-Length', '0')]) + return [] |