svnno****@sourc*****
svnno****@sourc*****
2016年 11月 3日 (木) 00:53:05 JST
Revision: 6527 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6527 Author: maya Date: 2016-11-03 00:53:04 +0900 (Thu, 03 Nov 2016) Log Message: ----------- HTTP プロキシ接続は CONNECT メソッドを使用しているので HTTP/1.0 から HTTP/1.1 に変更した。 https://osdn.net/ticket/browse.php?group_id=1412&tid=36726 Modified Paths: -------------- trunk/TTProxy/ProxyWSockHook.h -------------- next part -------------- Modified: trunk/TTProxy/ProxyWSockHook.h =================================================================== --- trunk/TTProxy/ProxyWSockHook.h 2016-11-02 15:32:57 UTC (rev 6526) +++ trunk/TTProxy/ProxyWSockHook.h 2016-11-02 15:53:04 UTC (rev 6527) @@ -1389,8 +1389,10 @@ static const char base64_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; char buf[1024]; int status_code; - if (sendToSocketFormat(s, strchr(realhost,':')?"CONNECT [%s]:%d HTTP/1.0\r\n":"CONNECT %s:%d HTTP/1.0\r\n", realhost, realport) == SOCKET_ERROR) + if (sendToSocketFormat(s, strchr(realhost,':')?"CONNECT [%s]:%d HTTP/1.1\r\n":"CONNECT %s:%d HTTP/1.1\r\n", realhost, realport) == SOCKET_ERROR) return SOCKET_ERROR; + if (sendToSocketFormat(s, strchr(realhost,':')?"Host: [%s]:%d\r\n":"Host: %s:%d\r\n", realhost, realport) == SOCKET_ERROR) + return SOCKET_ERROR; if (proxy.user != NULL) { int userlen = strlen(proxy.user); int passlen = strlen(proxy.pass);