if(mod_req != NULL) {
int ret = mod_req(&tools, &req, &res);
int co = ret & 0xff;
- if(co == _TW_MODULE_PASS) continue;
- if(co == _TW_MODULE_STOP) {
+ if(co == _TW_MODULE_PASS) {
+ continue;
+ } else if(co == _TW_MODULE_STOP) {
+ /* Handle response here ... */
res._processed = true;
break;
- }
- if(co == _TW_MODULE_ERROR) {
+ } else if(co == _TW_MODULE_STOP2) {
+ res._processed = true;
+ break;
+ } else if(co == _TW_MODULE_ERROR) {
tw_http_error(s, sock, (ret & 0xffff00) >> 8, name, port, vhost_entry);
break;
}
enum TW_MODULE_RETURN {
_TW_MODULE_PASS = 0, /* Pass to the next module. */
_TW_MODULE_STOP, /* Do not pass to the next module. */
+ _TW_MODULE_STOP2, /* Do not pass to the next module, and do not handle response. */
_TW_MODULE_ERROR, /* Error, and do not pass to the next module. */
_TW_CONFIG_PARSED, /* Got parsed */
#define TW_MODULE_PASS _TW_MODULE_PASS
#define TW_MODULE_STOP _TW_MODULE_STOP
+#define TW_MODULE_STOP2 _TW_MODULE_STOP2
#define TW_MODULE_ERROR(x) (_TW_MODULE_ERROR | ((x) << 8))
#define TW_CONFIG_PARSED _TW_CONFIG_PARSED
extern "C" {
#endif
-#define TW_VERSION "1.05A\0"
+#define TW_VERSION "1.06\0"
const char* tw_get_version(void);
const char* tw_get_platform(void);