#20 SPYCE_CONFIG for (F)CGI

closed-accepted
nobody
None
5
2007-02-18
2007-02-11
No

I couldn't find how to specify that (F)CGI should
use a configuration file different from
the spyceconf.py shipped with Spyce.

The attached patch (against branches/spyce-2.1, r1201) makes Spyce to get the name of the configuration file from the SPYCE_CONFIG environment variable. This is rather easy to set at least in Apache, both for CGI and FCGI.

In addition to this, the attached patch contains:

* spyceApache.conf: show how to set SPYCE_CONFIG

* spyceconf.py: set cgi_allow_only_redirect = True by default, for security. Specifying SPYCE_CONFIG, this feature can now be disabled on per-project basis, if using the #! CGI deployment mode.

* www/docs/doc.spy: update CGI configuration documentation. Was the /usr/bin/spyce symlink used for something?

Discussion

  • Jonathan Ellis

    Jonathan Ellis - 2007-02-18

    Logged In: YES
    user_id=657828
    Originator: NO

    could you re-upload the patch with "svn diff" instead of normal diff?

     
  • Pauli Virtanen

    Pauli Virtanen - 2007-02-18

    Rediffed against spyce-2.2 branch

     
  • Pauli Virtanen

    Pauli Virtanen - 2007-02-18

    Logged In: YES
    user_id=45712
    Originator: YES

    Rediffed against spyce-2.2 branch.

    However, it seems to me that CGI is broken in this branch as of now:
    For test.spy containing the text "Hello world", I get only

    $ /tmp/spyce-2.2/spyceCmd.py -w test.spy
    2007-02-18 15:20:06,825 INFO Creating server with config from config.py
    Status: 200 "OK"
    Content-Type: text/html

    File Added: cgi-config-file.patch

     
  • Jonathan Ellis

    Jonathan Ellis - 2007-02-18

    Logged In: YES
    user_id=657828
    Originator: NO

    Applied to 2.2 with a small modification to allow SPYCE_CONFIG to work with standalone and mod-python modes as well.

    Did not apply changing cgi_allow_only_redirect to default to True; I know that breaks the SF.net install so I think people should enable that themselves.

    Thanks again!

     
  • Jonathan Ellis

    Jonathan Ellis - 2007-02-18
    • status: open --> closed-accepted
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks