]> andersk Git - test.git/commitdiff
Fixed support for Swedish keyboards
authorMarkus Gutschke <markus@shellinabox.com>
Tue, 11 Aug 2009 18:37:12 +0000 (18:37 +0000)
committerMarkus Gutschke <markus@shellinabox.com>
Tue, 11 Aug 2009 18:37:12 +0000 (18:37 +0000)
Some more tweaks for IE6 support. Overall, IE6 is still pretty
broken. Not sure if we can do much about this.

config.h
configure
configure.ac
demo/vt100.js
libhttp/httpconnection.c
shellinabox/shell_in_a_box.js
shellinabox/vt100.js
shellinabox/vt100.jspp

index d2118c942ad6b62501649fd933e5f8281cb1b939..d139dc5bfcf2ca6d24945cd503f6c8d482202e5e 100644 (file)
--- a/config.h
+++ b/config.h
 #define STDC_HEADERS 1
 
 /* Most recent revision number in the version control system */
-#define VCS_REVISION "165"
+#define VCS_REVISION "166"
 
 /* Version number of package */
 #define VERSION "2.9"
index 37e5ae403d9bb552acfbe27e8ff8547040a17028..a9b93d9d4ed10c938faa2fc01de8206f85643052 100755 (executable)
--- a/configure
+++ b/configure
@@ -2317,7 +2317,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-VCS_REVISION=165
+VCS_REVISION=166
 
 
 cat >>confdefs.h <<_ACEOF
index b214501232c79d64541eca07a820cde158dbff14..f640637cd5aa35113688807e1ea1f70a25f20c08 100644 (file)
@@ -2,7 +2,7 @@ AC_PREREQ(2.57)
 
 dnl This is the one location where the authoritative version number is stored
 AC_INIT(shellinabox, 2.9, markus@shellinabox.com)
-VCS_REVISION=165
+VCS_REVISION=166
 AC_SUBST(VCS_REVISION)
 AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}",
                    [Most recent revision number in the version control system])
index e66f1638e219f81833be5c08024176b04ad5ffca..15a555b4a592d1a37790b5e6a3fd0d6c60003538 100644 (file)
@@ -1801,7 +1801,7 @@ VT100.prototype.toggleBell = function() {
 };
 
 VT100.prototype.about = function() {
-  alert("VT100 Terminal Emulator " + "2.9 (revision 165)" +
+  alert("VT100 Terminal Emulator " + "2.9 (revision 166)" +
         "\nCopyright 2008-2009 by Markus Gutschke\n" +
         "For more information check http://shellinabox.com");
 };
@@ -2251,7 +2251,8 @@ VT100.prototype.keyDown = function(event) {
     event.keyCode >=  65 && event.keyCode <=  90;
   var alphNumKey                =
     asciiKey                                     ||
-    event.keyCode >=  96 && event.keyCode <= 105;
+    event.keyCode >=  96 && event.keyCode <= 105 ||
+    event.keyCode == 226;
   var normalKey                 =
     alphNumKey                                   ||
     event.keyCode ==  59 || event.keyCode ==  61 ||
@@ -2259,7 +2260,7 @@ VT100.prototype.keyDown = function(event) {
     event.keyCode >= 109 && event.keyCode <= 111 ||
     event.keyCode >= 186 && event.keyCode <= 192 ||
     event.keyCode >= 219 && event.keyCode <= 222 ||
-    event.keyCode == 226 || event.keyCode == 252;
+    event.keyCode == 252;
   try {
     if (navigator.appName == 'Konqueror') {
       normalKey                |= event.keyCode < 128;
index a41c0c1c7b8ae11f64f38e6f607fc0facc2e8b13..c4a467307551a4852dc00a3bcb6da03da73488f4 100644 (file)
@@ -492,6 +492,16 @@ void httpTransfer(struct HttpConnection *http, char *msg, int len) {
   check(msg);
   check(len >= 0);
 
+  // Internet Explorer prior to version 7 seems to have difficulties with
+  // compressed data. It also has difficulties with SSL connections that
+  // are being proxied.
+  int ieBug                 = 0;
+  const char *userAgent     = getFromHashMap(&http->header, "user-agent");
+  const char *msie          = userAgent ? strstr(userAgent, "MSIE ") : NULL;
+  if (msie && msie[5] >= '4' && msie[5] <= '6') {
+    ieBug++;
+  }
+      
   int compress              = 0;
   char *contentLength       = NULL;
   if (!http->totalWritten) {
@@ -528,7 +538,7 @@ void httpTransfer(struct HttpConnection *http, char *msg, int len) {
 
         #ifdef HAVE_ZLIB
         // Compress replies that might exceed the size of a single IP packet
-        compress            = !isHead &&
+        compress            = !ieBug && !isHead &&
                               !http->isPartialReply &&
                               len > 1400 &&
                               httpAcceptsEncoding(http, "deflate");
@@ -630,18 +640,6 @@ void httpTransfer(struct HttpConnection *http, char *msg, int len) {
     http->msgLength         = len;
   }
 
-  // Internet Explorer prior to version 7 has a bug when sending
-  // XMLHttpRequests over HTTPS that go through a proxy. It won't see the
-  // reply until we close the connection.
-  int ieBug                 = 0;
-  if (http->sslHndl) {
-    const char *userAgent   = getFromHashMap(&http->header, "user-agent");
-    const char *msie        = userAgent ? strstr(userAgent, "MSIE ") : NULL;
-    if (msie && msie[5] >= '4' && msie[5] <= '6') {
-      ieBug++;
-    }
-  }
-
   // The caller can suspend the connection, so that it can send an
   // asynchronous reply. Once the reply has been sent, the connection
   // gets reactivated. Normally, this means it would go back to listening
@@ -688,7 +686,7 @@ void httpTransfer(struct HttpConnection *http, char *msg, int len) {
     }
   }
 
-  if (ieBug) {
+  if (http->sslHndl && ieBug) {
     httpCloseRead(http);
   }
 }
index 90bf13a910ff114e7a48fcc2a717c0b550111253..7b8c87231cd03f0ce0eee49f897f78f59f338dce 100644 (file)
@@ -355,7 +355,7 @@ ShellInABox.prototype.extendContextMenu = function(entries, actions) {
 };
 
 ShellInABox.prototype.about = function() {
-  alert("Shell In A Box version " + "2.9 (revision 165)" +
+  alert("Shell In A Box version " + "2.9 (revision 166)" +
         "\nCopyright 2008-2009 by Markus Gutschke\n" +
         "For more information check http://shellinabox.com" +
         (typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ?
index e66f1638e219f81833be5c08024176b04ad5ffca..15a555b4a592d1a37790b5e6a3fd0d6c60003538 100644 (file)
@@ -1801,7 +1801,7 @@ VT100.prototype.toggleBell = function() {
 };
 
 VT100.prototype.about = function() {
-  alert("VT100 Terminal Emulator " + "2.9 (revision 165)" +
+  alert("VT100 Terminal Emulator " + "2.9 (revision 166)" +
         "\nCopyright 2008-2009 by Markus Gutschke\n" +
         "For more information check http://shellinabox.com");
 };
@@ -2251,7 +2251,8 @@ VT100.prototype.keyDown = function(event) {
     event.keyCode >=  65 && event.keyCode <=  90;
   var alphNumKey                =
     asciiKey                                     ||
-    event.keyCode >=  96 && event.keyCode <= 105;
+    event.keyCode >=  96 && event.keyCode <= 105 ||
+    event.keyCode == 226;
   var normalKey                 =
     alphNumKey                                   ||
     event.keyCode ==  59 || event.keyCode ==  61 ||
@@ -2259,7 +2260,7 @@ VT100.prototype.keyDown = function(event) {
     event.keyCode >= 109 && event.keyCode <= 111 ||
     event.keyCode >= 186 && event.keyCode <= 192 ||
     event.keyCode >= 219 && event.keyCode <= 222 ||
-    event.keyCode == 226 || event.keyCode == 252;
+    event.keyCode == 252;
   try {
     if (navigator.appName == 'Konqueror') {
       normalKey                |= event.keyCode < 128;
index 36d682810d182db4aea8ec526dba59370135daf2..8759856a2db3d0a5e5feb71bba52ef5e34670ea4 100644 (file)
@@ -2251,7 +2251,8 @@ VT100.prototype.keyDown = function(event) {
     event.keyCode >=  65 && event.keyCode <=  90;
   var alphNumKey                =
     asciiKey                                     ||
-    event.keyCode >=  96 && event.keyCode <= 105;
+    event.keyCode >=  96 && event.keyCode <= 105 ||
+    event.keyCode == 226;
   var normalKey                 =
     alphNumKey                                   ||
     event.keyCode ==  59 || event.keyCode ==  61 ||
@@ -2259,7 +2260,7 @@ VT100.prototype.keyDown = function(event) {
     event.keyCode >= 109 && event.keyCode <= 111 ||
     event.keyCode >= 186 && event.keyCode <= 192 ||
     event.keyCode >= 219 && event.keyCode <= 222 ||
-    event.keyCode == 226 || event.keyCode == 252;
+    event.keyCode == 252;
   try {
     if (navigator.appName == 'Konqueror') {
       normalKey                |= event.keyCode < 128;
This page took 0.067271 seconds and 5 git commands to generate.