• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

The MinGW.org Installation Manager Tool


コミットメタ情報

リビジョン155d03aea26c303a2a6bb281324de6f2e6b173d2 (tree)
日時2017-09-05 05:21:54
作者Keith Marshall <keith@user...>
コミッターKeith Marshall

ログメッセージ

Improve probability of establishing successful URL connections.

変更サマリ

差分

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
1+2017-09-04 Keith Marshall <keith@users.osdn.me>
2+
3+ Improve probability of establishing successful URL connections.
4+
5+ * src/pkginet.cpp (pkgInternetAgent::OpenURL): Add...
6+ (INTERNET_FLAG_KEEP_CONNECTION, INTERNET_FLAG_IGNORE_CERT_CN_INVALID)
7+ (INTERNET_FLAG_IGNORE_CERT_DATE_INVALID, INTERNET_FLAG_PRAGMA_NOCACHE)
8+ (INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS)
9+ (INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP): ...these flags, when calling
10+ the InternetOpenUrl() function.
11+
112 2017-09-01 Keith Marshall <keith@users.osdn.me>
213
314 Increment version for first OSDN hosted release.
--- a/src/pkginet.cpp
+++ b/src/pkginet.cpp
@@ -4,7 +4,7 @@
44 * $Id$
55 *
66 * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
7- * Copyright (C) 2009-2013, MinGW.org Project
7+ * Copyright (C) 2009-2013, 2017, MinGW.org Project
88 *
99 *
1010 * Implementation of the package download machinery for mingw-get.
@@ -458,7 +458,14 @@ HINTERNET pkgInternetAgent::OpenURL( const char *URL )
458458 * specify it anyway, on the off-chance that it may introduce
459459 * an undocumented benefit beyond wishful thinking.
460460 */
461- SessionHandle, URL, NULL, 0, INTERNET_FLAG_EXISTING_CONNECT, 0
461+ SessionHandle, URL, NULL, 0,
462+ INTERNET_FLAG_EXISTING_CONNECT
463+ | INTERNET_FLAG_IGNORE_CERT_CN_INVALID
464+ | INTERNET_FLAG_IGNORE_CERT_DATE_INVALID
465+ | INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS
466+ | INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP
467+ | INTERNET_FLAG_KEEP_CONNECTION
468+ | INTERNET_FLAG_PRAGMA_NOCACHE, 0
462469 );
463470 if( ResourceHandle == NULL )
464471 {
@@ -469,11 +476,14 @@ HINTERNET pkgInternetAgent::OpenURL( const char *URL )
469476 {
470477 /* ...in which case, we diagnose failure to open the URL.
471478 */
479+ unsigned int status = GetLastError();
472480 DEBUG_INVOKE_IF( DEBUG_REQUEST( DEBUG_TRACE_INTERNET_REQUESTS ),
473481 dmh_printf( "%s\nConnection failed(status=%u); abandoned.\n",
474- URL, GetLastError() )
482+ URL, status )
483+ );
484+ dmh_notify(
485+ DMH_ERROR, "%s:cannot open URL; status = %u\n", URL, status
475486 );
476- dmh_notify( DMH_ERROR, "%s:cannot open URL\n", URL );
477487 }
478488 else DEBUG_INVOKE_IF( DEBUG_REQUEST( DEBUG_TRACE_INTERNET_REQUESTS ),
479489 dmh_printf( "%s\nConnecting ... failed(status=%u); retrying in %ds...\n",