deda-ca / cgi-node

CGI Node.js complete module to replace PHP on shared hosting such as GoDaddy
http://www.cgi-node.org/
MIT License
172 stars 21 forks source link

maybe a typo #31

Closed dotme closed 5 years ago

dotme commented 7 years ago

Hello. It is normal that EndTag is '<?' instead '?>'? Sorry if I have missunderstand something. Have a nice day.

AlexisWilke commented 5 years ago

The EndTag is wrong in the CgiNodeConfig definition:

var CgiNodeConfig = 
{
    Version: '0.2',

    StartTag: '<?',
    EndTag: '<?',    // <- here, should be '?>'

    ScriptExtensions: ['.js'],

    EmbededScriptExtensions: ['.jss'],

    SessionCookie: 'CGI-NODE-SESSIONID',
    SessionTimeOut: 15*60, // 15 minutes
    SessionPath: '/var/lib/cgi-node'
};

Note that at this point those two configuration parameters are not used. If you search the source, you will see:

script : function(id, path, content)
{
    // Set the optional parameters to the default values.
    // TODO: get these from the configuration object.
    var openTag = '<?';
    var closeTag = '?>';
    [...snip...]

So it will work as expected, only it is definitely confusing.

dotme commented 5 years ago

My mistake