Use \r\n in SCGI example server header endlines.
authorW. Trevor King <wking@drexel.edu>
Tue, 21 Feb 2012 15:22:57 +0000 (10:22 -0500)
committerW. Trevor King <wking@drexel.edu>
Tue, 21 Feb 2012 15:23:01 +0000 (10:23 -0500)
As recommended by Jeroen Vermeulen in the referenced LJ article.

posts/SCGI.mdwn

index b4c19b88c164c01034e721425a9b5692432af32d..7859b081d718963b64351c202d3c20451fc6c559 100644 (file)
@@ -23,9 +23,9 @@ something like:
                        if url is None:  # fall back to the request URI                         
                 url = env.get('REQUEST_URI', None)
             data = urlparse.parse_qs(env.get('QUERY_STRING', ''))
-            output.write('Status: 200 OK\n')
-            output.write('Content-type: text/plain; charset=UTF-8\n')
-            output.write('\n')
+            output.write('Status: 200 OK\r\n')
+            output.write('Content-type: text/plain; charset=UTF-8\r\n')
+            output.write('\r\n')
             output.write('URI: {}\n'.format(url))
             output.write('data: {}\n'.format(data))