Permalink
Browse files

Merge branch 'master' of github.com:cherokee/pyscgi

Conflicts:
	.gitignore
  • Loading branch information...
alobbs committed Nov 15, 2011
2 parents 1146831 + b703d44 commit 2c095186fb49216828e597b6016b5c8f05db8b01
Showing with 523 additions and 7 deletions.
  1. +0 −7 .gitignore
  2. +1 −0 AUTHORS
  3. +67 −0 ChangeLog
  4. +29 −0 LICENSE
  5. +6 −0 MANIFEST.in
  6. +58 −0 README
  7. +1 −0 pyscgi/__init__.py
  8. +278 −0 pyscgi/pyscgi.py
  9. +13 −0 setup.py
  10. +27 −0 tests/test1_env.py
  11. +43 −0 tests/test2_post.py
View
@@ -1,7 +0,0 @@
-*.pyc
-*.pyo
-*~
-Makefile
-Makefile.in
-Makefile.in.in
-CTK-run
View
@@ -0,0 +1 @@
+Alvaro Lopez Ortega <alvaro@alobbs.com>
View
@@ -0,0 +1,67 @@
+2008-08-27 Alvaro Lopez Ortega <alvaro@alobbs.com>
+
+ * pyscgi.py (SCGIHandler.handle_request): The default handler
+ method had to use send() so reply the requests rather than the low
+ level self.wfile socket.
+
+ * Applies a couple of changes that there released with 1.7 but
+ that for some reason were not committed.
+
+2008-03-23 Alvaro Lopez Ortega <alvaro@alobbs.com>
+
+ * pyscgi/pyscgi.py: Added a new method send() to write the
+ information safely. There was an issue on OS X that made large
+ responses to fail.
+
+ * pyscgi/pyscgi.py: Print all the exceptions except of SystemExit.
+
+2007-12-29 Alvaro Lopez Ortega <alvaro@alobbs.com>
+
+ * pyscgi/pyscgi.py: Fixed communication issue between the SCGI
+ application and the web server. The information follow could
+ fail because EAGAIN errors. It is fixed now.
+
+2007-10-04 Alvaro Lopez Ortega <alvaro@alobbs.com>
+
+ * The __init__.py file inside the pyscgi module is empty, this
+ means that to import the module properly I need to type:
+ from pyscgi.pyscgi import *, instead of: from pyscgi import *
+ Patch by Alberto Ruiz <aruiz@gnome.org>
+
+2007-08-02 Alvaro Lopez Ortega <alvaro@alobbs.com>
+
+ * tests/test1_env.py, tests/test2_post.py: Updated to use rfile
+ and wfile instead of input and output.
+
+2007-02-07 Alvaro Lopez Ortega <alvaro@alobbs.com>
+
+ * pyscgi/pyscgi.py (SCGIHandler.__init__): It inherits from
+ StreamRequestHandler rather than from BaseRequestHandler.
+
+2007-01-27 Alvaro Lopez Ortega <alvaro@alobbs.com>
+
+ * pyscgi/pyscgi.py (SCGIHandler.handle): self.handle_request() is
+ now inside a try clause. That method have to be implement by the
+ user, so there is a change of something going wrong, in which case
+ the server should close the in/out descriptiors as well.
+
+2006-12-12 Alvaro Lopez Ortega <alvaro@alobbs.com>
+
+ * 1.1 Released
+
+ * setup.py: Version bumped
+
+ * tests/test1_env.py, tests/test2_post.py: Updated for using
+ ServerFactory.
+
+ * pyscgi/pyscgi.py: Added new SCGIServerFork class implementing a
+ forking server. So far I had only a Thread based one.
+
+ * pyscgi/pyscgi.py (ServerFactory): Added a new factory function
+ to instance servers.
+
+2006-12-10 Alvaro Lopez Ortega <alvaro@alobbs.com>
+
+ * pyscgi/pyscgi.py, tests/test1_env.py, tests/test2_post.py: First
+ version.
+
View
29 LICENSE
@@ -0,0 +1,29 @@
+Copyright (c) 2006, Alvaro Lopez Ortega <alvaro@alobbs.com>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+* The name "Alvaro Lopez Ortega" may not be used to endorse or
+ promote products derived from this software without specific prior
+ written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
View
@@ -0,0 +1,6 @@
+include README
+include LICENSE
+include ChangeLog
+include pyscgi/pyscgi.py
+include tests/test1_env.py
+include tests/test2_post.py
View
58 README
@@ -0,0 +1,58 @@
+Cherokee's SCGI Python implementation
+=====================================
+
+I have written this package because the original SCGI python module
+(written by Neil Schemenauer) didn't fit for my needs. The problem is
+that it depends on a C source file that needs to be compiled in order
+to make the module work, and even if Python provides tools for the
+task, it still makes the distribution a bit more difficult under some
+circumstances.
+
+This implementation of the SCGI protocol has been completely written
+in Python to easy as much as possible the deploy for SCGI based apps.
+
+This module is BSD licensed. Read the LICENSE file or the notice at
+the beginning of the source code files for more information.
+
+
+Tests
+=====
+There are a few tests programs for checking the module. Each one of
+them test an specific feature of the module.
+
+
+Configuration
+=============
+This module is suitable for all the web servers that support SCGI:
+Cherokee, Apache or any one else.
+
+However, here is an configuration example for Cherokee 0.6 (actually,
+this is what I've used to test it out):
+
+vserver!default!directory!/!handler = scgi
+vserver!default!directory!/!handler!balancer = round_robin
+vserver!default!directory!/!handler!balancer!type = interpreter
+vserver!default!directory!/!handler!balancer!local1!host = localhost:4000
+vserver!default!directory!/!priority = 99999
+
+Just write that on a file, lets suppose /var/tmp/test_scgi.conf, and
+execute Cherokee with the -C parameter to point to the configuration
+file:
+
+ # cherokee -C /var/tmp/test_scgi.conf
+
+Then, launch one of the test programs provided with this package. It
+will start a new SCGI server instance that will be used to execute the
+web server requests. Finally, go to your browser and try to browser
+and type http://localhost.
+
+
+References
+==========
+SCGI: http://www.mems-exchange.org/software/scgi/
+Cherokee: http://www.cherokee-project.com/
+
+
+--
+Alvaro Lopez Ortega
+<alvaro@alobbs.com>
View
@@ -0,0 +1 @@
+from pyscgi import *
Oops, something went wrong.

0 comments on commit 2c09518

Please sign in to comment.