Fixed a check() failure that was caused by incorrect handling of partially
processed buffers. I believe, this could only be triggered by clients that enabled HTTP pipelining. That might explain why we haven't seen bug reports any earlier. git-svn-id: https://shellinabox.googlecode.com/svn/trunk@216 0da03de8-d603-11dd-86c2-0f8696b7b6f9
This commit is contained in:
parent
7289691555
commit
e8c241583d
8 changed files with 190 additions and 205 deletions
4
aclocal.m4
vendored
4
aclocal.m4
vendored
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
|
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
|
||||||
[m4_warning([this file was generated for autoconf 2.67.
|
[m4_warning([this file was generated for autoconf 2.65.
|
||||||
You have another version of autoconf. It may work, but is not guaranteed to.
|
You have another version of autoconf. It may work, but is not guaranteed to.
|
||||||
If you have problems, you may need to regenerate the build system entirely.
|
If you have problems, you may need to regenerate the build system entirely.
|
||||||
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
||||||
|
|
2
config.h
2
config.h
|
@ -153,7 +153,7 @@
|
||||||
#define STDC_HEADERS 1
|
#define STDC_HEADERS 1
|
||||||
|
|
||||||
/* Most recent revision number in the version control system */
|
/* Most recent revision number in the version control system */
|
||||||
#define VCS_REVISION "215"
|
#define VCS_REVISION "216"
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#define VERSION "2.10"
|
#define VERSION "2.10"
|
||||||
|
|
|
@ -2,7 +2,7 @@ AC_PREREQ(2.57)
|
||||||
|
|
||||||
dnl This is the one location where the authoritative version number is stored
|
dnl This is the one location where the authoritative version number is stored
|
||||||
AC_INIT(shellinabox, 2.10, markus@shellinabox.com)
|
AC_INIT(shellinabox, 2.10, markus@shellinabox.com)
|
||||||
VCS_REVISION=215
|
VCS_REVISION=216
|
||||||
AC_SUBST(VCS_REVISION)
|
AC_SUBST(VCS_REVISION)
|
||||||
AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}",
|
AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}",
|
||||||
[Most recent revision number in the version control system])
|
[Most recent revision number in the version control system])
|
||||||
|
|
|
@ -1962,7 +1962,7 @@ VT100.prototype.toggleCursorBlinking = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
VT100.prototype.about = function() {
|
VT100.prototype.about = function() {
|
||||||
alert("VT100 Terminal Emulator " + "2.10 (revision 215)" +
|
alert("VT100 Terminal Emulator " + "2.10 (revision 216)" +
|
||||||
"\nCopyright 2008-2010 by Markus Gutschke\n" +
|
"\nCopyright 2008-2010 by Markus Gutschke\n" +
|
||||||
"For more information check http://shellinabox.com");
|
"For more information check http://shellinabox.com");
|
||||||
};
|
};
|
||||||
|
|
|
@ -1539,7 +1539,7 @@ int httpHandleConnection(struct ServerConnection *connection, void *http_,
|
||||||
if (http->expecting) {
|
if (http->expecting) {
|
||||||
int len = bytes - offset;
|
int len = bytes - offset;
|
||||||
if (http->expecting > 0 &&
|
if (http->expecting > 0 &&
|
||||||
bytes > http->expecting) {
|
len > http->expecting) {
|
||||||
len = http->expecting;
|
len = http->expecting;
|
||||||
}
|
}
|
||||||
if (http->state == PAYLOAD) {
|
if (http->state == PAYLOAD) {
|
||||||
|
@ -1559,6 +1559,7 @@ int httpHandleConnection(struct ServerConnection *connection, void *http_,
|
||||||
check(0);
|
check(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
offset += consumed;
|
||||||
if (pushBack) {
|
if (pushBack) {
|
||||||
check(offset + pushBack == bytes);
|
check(offset + pushBack == bytes);
|
||||||
if (offset >= 0) {
|
if (offset >= 0) {
|
||||||
|
@ -1577,7 +1578,6 @@ int httpHandleConnection(struct ServerConnection *connection, void *http_,
|
||||||
offset = -pushBack;
|
offset = -pushBack;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
offset += consumed;
|
|
||||||
eob |= offset >= bytes;
|
eob |= offset >= bytes;
|
||||||
}
|
}
|
||||||
} while (!eob && !http->closed);
|
} while (!eob && !http->closed);
|
||||||
|
|
|
@ -358,7 +358,7 @@ ShellInABox.prototype.extendContextMenu = function(entries, actions) {
|
||||||
};
|
};
|
||||||
|
|
||||||
ShellInABox.prototype.about = function() {
|
ShellInABox.prototype.about = function() {
|
||||||
alert("Shell In A Box version " + "2.10 (revision 215)" +
|
alert("Shell In A Box version " + "2.10 (revision 216)" +
|
||||||
"\nCopyright 2008-2010 by Markus Gutschke\n" +
|
"\nCopyright 2008-2010 by Markus Gutschke\n" +
|
||||||
"For more information check http://shellinabox.com" +
|
"For more information check http://shellinabox.com" +
|
||||||
(typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ?
|
(typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ?
|
||||||
|
|
|
@ -1962,7 +1962,7 @@ VT100.prototype.toggleCursorBlinking = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
VT100.prototype.about = function() {
|
VT100.prototype.about = function() {
|
||||||
alert("VT100 Terminal Emulator " + "2.10 (revision 215)" +
|
alert("VT100 Terminal Emulator " + "2.10 (revision 216)" +
|
||||||
"\nCopyright 2008-2010 by Markus Gutschke\n" +
|
"\nCopyright 2008-2010 by Markus Gutschke\n" +
|
||||||
"For more information check http://shellinabox.com");
|
"For more information check http://shellinabox.com");
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue