diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2014-10-15 19:17:29 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2014-10-15 19:17:29 +0000 |
commit | 9b5c6cf86ed8dbf749bc2e401d4f87d340b6413d (patch) | |
tree | 38e035f0b797edeb5bdbc708681eacedeef53887 /src/htsserver.h | |
parent | cce112d40a6e36b2c437418e84c57490818603cb (diff) |
Fixed webhttrack incompatibility with Chrome
* closes:#53
Also fixed HTML-escaping issues inside webhttrack
Rationale: The webhttrack script made the wrong assumption that once the "browse" command returned, it meant the user killed the navigation window, and it had to kill the server itself. However, modern browsers tend to "attach" to an existing session (creating a new tab, for example, within an existing window), causing the browsing command to return immediately, thus causing the server to be killed immediately by the webhttrack script. I have rewritten the logic behind, and now the server is able to kill himself if the parent script dies, AND if the browsing client did not make any activity for two minutes. The "activity" can be any browser/refreshed page, or the internal "ping" iframe (which pings the server every 30 seconds). With this model, we *should* be compatible with old browsers, and modern ones.
Diffstat (limited to 'src/htsserver.h')
-rw-r--r-- | src/htsserver.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/htsserver.h b/src/htsserver.h index 9b3b125..b5decfd 100644 --- a/src/htsserver.h +++ b/src/htsserver.h @@ -91,6 +91,7 @@ extern httrackp *global_opt; #define min(a,b) ((a)>(b)?(b):(a)) #define max(a,b) ((a)>(b)?(a):(b)) +extern void smallserver_setpinghandler(void (*fun)(void*), void*arg); extern int smallserver_setkey(const char *key, const char *value); extern int smallserver_setkeyint(const char *key, LLint value); extern int smallserver_setkeyarr(const char *key, int id, const char *key2, const char *value); |