Revision: 8041 https://osdn.net/projects/ttssh2/scm/svn/commits/8041 Author: yutakapon Date: 2019-08-30 23:08:34 +0900 (Fri, 30 Aug 2019) Log Message: ----------- branches/ttssh_improvedからリビジョン8040をマージ: HTTPプロキシ接続がエラーとなり、ステータスコードが401,407,400,405,406,403以外だった場合、 メッセージボックスにゴミが表示される問題を修正した。 ........ Modified Paths: -------------- branches/ttproxy_improved/TTProxy/ProxyWSockHook.h Property Changed: ---------------- branches/ttproxy_improved/ branches/ttproxy_improved/TTProxy/ -------------- next part -------------- Index: branches/ttproxy_improved =================================================================== --- branches/ttproxy_improved 2019-08-30 14:04:23 UTC (rev 8040) +++ branches/ttproxy_improved 2019-08-30 14:08:34 UTC (rev 8041) Property changes on: branches/ttproxy_improved ___________________________________________________________________ Modified: svn:mergeinfo ## -2,5 +2,6 ## /branches/openssl_1_1_1_v2:7888 /branches/portfwd_memleak:7732,7736-7737,7764 /branches/ssh_ed25519:5495-5544 +/branches/ttssh_improved:8040 /branches/vs2015_warn:6194-6285 /tags/teraterm-4_89:6182 \ No newline at end of property Index: branches/ttproxy_improved/TTProxy =================================================================== --- branches/ttproxy_improved/TTProxy 2019-08-30 14:04:23 UTC (rev 8040) +++ branches/ttproxy_improved/TTProxy 2019-08-30 14:08:34 UTC (rev 8041) Property changes on: branches/ttproxy_improved/TTProxy ___________________________________________________________________ Modified: svn:mergeinfo ## -1 +1,2 ## +/branches/ttssh_improved/TTProxy:8040 /branches/vs2015_warn/TTProxy:6194-6285 \ No newline at end of property Modified: branches/ttproxy_improved/TTProxy/ProxyWSockHook.h =================================================================== --- branches/ttproxy_improved/TTProxy/ProxyWSockHook.h 2019-08-30 14:04:23 UTC (rev 8040) +++ branches/ttproxy_improved/TTProxy/ProxyWSockHook.h 2019-08-30 14:08:34 UTC (rev 8041) @@ -1363,7 +1363,9 @@ } } while (strcmp(buf,"\r\n") != 0); if (status_code != 200) { - char uimsg[MAX_UIMSG]; + char uimsg[MAX_UIMSG] = {0}; + char tmp[MAX_UIMSG + 32]; + switch (status_code) { case 401: case 407: @@ -1374,8 +1376,13 @@ case 405: case 406: case 403: - UTIL_get_lang_msg("MSG_PROXY_BAD_REQUEST", uimsg, sizeof(uimsg), + // \x8AY\x93\x96\x82\xB5\x82Ȃ\xA2\x83X\x83e\x81[\x83^\x83X\x83R\x81[\x83h\x82\xBE\x82\xC1\x82\xBD\x8Fꍇ\x81A\x95s\x92\xE8\x82ȓ\xE0\x97e\x82\xCCuimsg[]\x82\xAA + // MessageBox\x82ɕ\\x8E\xA6\x82\xB3\x82\xEA\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B + default: + UTIL_get_lang_msg("MSG_PROXY_BAD_REQUEST", tmp, sizeof(tmp), "Proxy prevent this connection!"); + _snprintf_s(uimsg, sizeof(uimsg), _TRUNCATE, "%s(HTTP: status code %d)", + tmp, status_code); break; } return setError(s, uimsg);