Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qcobjects-cli

Package Overview
Dependencies
Maintainers
1
Versions
198
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qcobjects-cli - npm Package Compare versions

Comparing version 0.1.27 to 0.1.28

30

org.quickcorp.qcobjects.main.http.gae.server.js

@@ -278,13 +278,18 @@ /**

CONFIG.set('backendTimeout',CONFIG.get('backendTimeout') || 20000);
server.setTimeout(CONFIG.get('backendTimeout'), ()=>{
var timeoutHandler = ()=>{
// end the stream on timeout
try {
logger.info('A timeout occurred...' + CONFIG.get('backendTimeout').toString());
logger.info('Killing session...');
res.respond([{
':status': 408,
'content-type': 'text/html'
}]);
res.write('<h1>408 - REQUEST TIMEOUT</h1>');
res.end();
if (!res.destroyed){
logger.info('A timeout occurred...' + CONFIG.get('backendTimeout').toString());
logger.info('Killing session...');
res.writeHeader( 500, {
'content-type': 'text/html'
});
res.on('error',()=>{});
res.write('<h1>500 - INTERNAL SERVER ERROR (TIMEOUT)</h1>');
res.end();
} else {
logger.debug('Session was normally finishing...');
}
}catch (e){

@@ -294,4 +299,9 @@ logger.debug('An unhandled error occurred during timeout catching...');

}
});
server.removeListener('timeout',timeoutHandler);
};
if (!res.destroyed){
server.setTimeout(CONFIG.get('backendTimeout'), timeoutHandler);
}
if (this.request.pathname.indexOf('.')<0){

@@ -298,0 +308,0 @@ this.request.scriptname = CONFIG.get('documentRootFileIndex');

@@ -209,3 +209,3 @@ /**

stream.session.setMaxListeners(9999999999);
stream.session.on('timeout', () => {
var timeoutHandler = () => {
// end the stream on timeout

@@ -217,6 +217,7 @@ try {

stream.respond([{
':status': 408,
':status': 500,
'content-type': 'text/html'
}]);
stream.write('<h1>408 - REQUEST TIMEOUT</h1>');
stream.on('error',()=>{});
stream.write('<h1>500 - INTERNAL SERVER ERROR (TIMEOUT)</h1>');
stream.end();

@@ -227,10 +228,17 @@ } else {

}catch(e){
logger.info('An unhandled error occurred during timeout catching...');
logger.info(e.message);
logger.debug('An unhandled error occurred during timeout catching...');
logger.debug(e.message);
}
});
if (!stream.destroyed){
stream.session.removeListener('timeout',timeoutHandler);
} else {
server.removeListener('timeout',timeoutHandler);
}
};
if (!stream.destroyed){
stream.session.on('timeout', timeoutHandler );
}
stream.session.altsvc('h2=":8000"', stream.id);

@@ -268,2 +276,3 @@ stream.session.altsvc('https=":'+CONFIG.get('serverPortHTTPS')+'"', stream.id);

route:route,
server:server,
stream:stream,

@@ -270,0 +279,0 @@ request:request

{
"name": "qcobjects-cli",
"version": "0.1.27",
"version": "0.1.28",
"description": "qcobjects cli command line tool",

@@ -5,0 +5,0 @@ "main": "qcobjects-cli.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc