Added Content-Length to all error response headers where not present; moved "req" code before proxy_client code in gateway.js file's "handler" method; fixed proxy_client error response headers logging comment; added error Event and Error throwing for audit service errors for improved logging; added err.stack logging where not present; increased proxy_client timeout value for ecrud core route in config file, added buffer ne strictLength with turned-off (i.e. "false") values to ecrud core route in config file.
Added clusterSize config option code to match VLER-DAS-4.4.1.2 changes; Updated log output; added time-out settings from config and timeout callback event methods for both structured and unstructured audit log requests; added request error listener events for requests for both structured and unstructured audit logging; added response listener events for unstructured auditing response; added try/catch blocks to fs.createWriteStream call area and fs.createReadStream call for tmp file path to re-throw errors for explicit logging in stack-trace output; added response headersSent test to prevent extra 504 response from being sent in proxy_client.on("timeout",...) event callback method.
Added clusterSize code change which got missed earlier; updated process.pid in log output.
Merge pull request #15 from JohnWMay/master

Added Content-Length to all error response headers where not present; mo...
Added res.headersSent if test to res in request.on.socket timeout callback method and req.on error event callback method to prevent error.
Merge pull request #17 from JohnWMay/master

Added res.headersSent if test to res in request.on.socket timeout callba...
Changed version to 0.2.2.
Moved request handling from chunk writing to piping for both upstream and unstructured audit requests (structured audit request is the same); turned off request unstructured auditing for all gateway requests with a "GET" method since request has not attachment, to avoid request pipe socket (with end: false option set) 'socket hang up' error; Updated logging messages; changed 'proxy_client' variable name to be 'proxy_clientReq'; changed 'proxyRes' variable name to be 'proxy_Res'; updated headersSent response time log-level from error to info level; added 'finished' events to write streams and 'close' events to request sockets; added 'socket.destroy()' call to callback method for timeout event for both structured and unstructured audit service sockets.
Updated package.json version number.
Merge branch 'master' of https://github.com/JohnWMay/vlerdas-gateway into JohnWMay-master

Conflicts:
	package.json