samcday/node-fastcgi-application

View on GitHub

Showing 3 of 3 total issues

Function createHandler has 118 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function createHandler(appCb, errCb) {
  errCb = errCb || function (e) {
    console.error(e);
    console.error(e.stack);
  };
Severity: Major
Found in index.js - About 4 hrs to fix

    Function connectFunction has 112 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      return function connectFunction(socket) {
        // Register an error handler so the process doesn't get killed in case of socket read errors, etc.
        socket.on('error', errCb);
    
        var fastcgiStream = new fcgi.FastCGIStream(socket);
    Severity: Major
    Found in index.js - About 4 hrs to fix

      Avoid deeply nested control flow statements.
      Open

                    switch (key) {
                      case 'server-protocol':
                        var httpVersionParts = val.replace(/^HTTP\//, '').split('.');
                        if (httpVersionParts.length != 2)
                          httpVersionParts = [1, 1];
      Severity: Major
      Found in index.js - About 45 mins to fix
        Severity
        Category
        Status
        Source
        Language