7 changed files with 165 additions and 2 deletions
@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* httpdocrootsettings.h |
||||
* |
||||
* Created on: Nov 13, 2017 |
||||
* Author: f4exb |
||||
*/ |
||||
|
||||
#ifndef HTTPSERVER_HTTPDOCROOTSETTINGS_H_ |
||||
#define HTTPSERVER_HTTPDOCROOTSETTINGS_H_ |
||||
|
||||
namespace qtwebapp { |
||||
|
||||
struct HttpDocrootSettings |
||||
{ |
||||
QString path; |
||||
QString encoding; |
||||
int maxAge; |
||||
int cacheTime; |
||||
int cacheSize; |
||||
int maxCachedFileSize; |
||||
|
||||
HttpDocrootSettings() { |
||||
resetToDefaults(); |
||||
} |
||||
|
||||
void resetToDefaults() |
||||
{ |
||||
path = "."; |
||||
encoding = "UTF-8"; |
||||
maxAge = 60000; |
||||
cacheTime = 60000; |
||||
cacheSize = 1000000; |
||||
maxCachedFileSize = 65536; |
||||
} |
||||
}; |
||||
|
||||
} // end of namespace
|
||||
|
||||
#endif /* HTTPSERVER_HTTPDOCROOTSETTINGS_H_ */ |
||||
@ -0,0 +1,47 @@
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* httplistenersettings.h |
||||
* |
||||
* Created on: Nov 13, 2017 |
||||
* Author: f4exb |
||||
*/ |
||||
|
||||
#ifndef HTTPSERVER_HTTPLISTENERSETTINGS_H_ |
||||
#define HTTPSERVER_HTTPLISTENERSETTINGS_H_ |
||||
|
||||
namespace qtwebapp { |
||||
|
||||
struct HttpListenerSettings |
||||
{ |
||||
QString host; |
||||
int port; |
||||
int minThreads; |
||||
int maxThreads; |
||||
int cleanupInterval; |
||||
int readTimeout; |
||||
QString sslKeyFile; |
||||
QString sslCertFile; |
||||
int maxRequestSize; |
||||
int maxMultiPartSize; |
||||
|
||||
HttpListenerSettings() { |
||||
resetToDefaults(); |
||||
} |
||||
|
||||
void resetToDefaults() |
||||
{ |
||||
host = "192.168.0.100"; |
||||
port = 8080; |
||||
minThreads = 1; |
||||
maxThreads = 100; |
||||
cleanupInterval = 1000; |
||||
readTimeout = 10000; |
||||
sslKeyFile = ""; |
||||
sslCertFile = ""; |
||||
maxRequestSize = 16000; |
||||
maxMultiPartSize = 1000000; |
||||
} |
||||
}; |
||||
|
||||
} // end of namespace
|
||||
|
||||
#endif /* HTTPSERVER_HTTPLISTENERSETTINGS_H_ */ |
||||
@ -0,0 +1,40 @@
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* httpsessionssettings.h |
||||
* |
||||
* Created on: Nov 13, 2017 |
||||
* Author: f4exb |
||||
*/ |
||||
|
||||
#ifndef HTTPSERVER_HTTPSESSIONSSETTINGS_H_ |
||||
#define HTTPSERVER_HTTPSESSIONSSETTINGS_H_ |
||||
|
||||
namespace qtwebapp { |
||||
|
||||
struct HttpSessionsSettings |
||||
{ |
||||
int expirationTime; |
||||
QString cookieName; |
||||
QString cookiePath; |
||||
QString cookieComment; |
||||
QString cookieDomain; |
||||
|
||||
HttpSessionsSettings() { |
||||
resetToDefaults(); |
||||
} |
||||
|
||||
void resetToDefaults() |
||||
{ |
||||
expirationTime = 3600000; |
||||
cookieName = "sessionid"; |
||||
cookiePath = ""; |
||||
cookieComment = ""; |
||||
cookieDomain = ""; |
||||
} |
||||
}; |
||||
|
||||
} // end of namespace
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* HTTPSERVER_HTTPSESSIONSSETTINGS_H_ */ |
||||
Loading…
Reference in new issue