Skip to content
Snippets Groups Projects

urlmon: Add support for IsValidURL

Open Leonid Pospelov requested to merge Pospelove/wine:isvalidurl into master
3 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ghost User requested review from @jacek

    requested review from @jacek

  • Leonid Pospelov added 1 commit

    added 1 commit

    • 645688c8 - urlmon: Add support for IsValidURL

    Compare with previous version

  • Leonid Pospelov changed title from urlmon: Implement IsValidURL to urlmon: Add support for IsValidURL

    changed title from urlmon: Implement IsValidURL to urlmon: Add support for IsValidURL

    • Contributor

      Marvin replied on the mailing list:

      Hi,
      
      It looks like your patch introduced the new failures shown below.
      Please investigate and fix them before resubmitting your patch.
      If they are not new, fixing them anyway would help a lot. Otherwise
      please ask for the known failures list to be updated.
      
      The full results can be found at:
      https://testbot.winehq.org/JobDetails.pl?Key=136530
      
      Your paranoid android.
      
      
      === build (build log) ===
      
      ../wine/include/winbase.h:2951:24: error: unknown type name ???error???; did you mean ???errno_t????
      ../wine/include/winbase.h:2951:24: error: unknown type name ???error???; did you mean ???errno_t????
      ../wine/dlls/urlmon/tests/misc.c:1859:6: error: initializer element is not constant
      ../wine/dlls/urlmon/tests/misc.c:1860:6: error: initializer element is not constant
      ../wine/dlls/urlmon/tests/misc.c:1936:31: error: ???default_feature_tests??? undeclared (first use in this function)
      ../wine/include/winnt.h:888:35: error: invalid operands to binary / (have ???const struct <anonymous> *??? and ???unsigned int???)
      Task: The exe32 Wine build failed
      
      === debian11 (build log) ===
      
      ../wine/include/winbase.h:2951:24: error: unknown type name ???error???; did you mean ???errno_t????
      ../wine/include/winbase.h:2951:24: error: unknown type name ???error???; did you mean ???errno_t????
      ../wine/dlls/urlmon/tests/misc.c:1859:6: error: initializer element is not constant
      ../wine/dlls/urlmon/tests/misc.c:1860:6: error: initializer element is not constant
      ../wine/dlls/urlmon/tests/misc.c:1936:31: error: ???default_feature_tests??? undeclared (first use in this function)
      ../wine/include/winnt.h:888:35: error: invalid operands to binary / (have ???const struct <anonymous> *??? and ???unsigned int???)
      Task: The win32 Wine build failed
      
      === debian11b (build log) ===
      
      ../wine/include/winbase.h:2951:24: error: unknown type name ???error???; did you mean ???errno_t????
      ../wine/include/winbase.h:2951:24: error: unknown type name ???error???; did you mean ???errno_t????
      ../wine/dlls/urlmon/tests/misc.c:1859:6: error: initializer element is not constant
      ../wine/dlls/urlmon/tests/misc.c:1860:6: error: initializer element is not constant
      ../wine/dlls/urlmon/tests/misc.c:1936:31: error: ???default_feature_tests??? undeclared (first use in this function)
      ../wine/include/winnt.h:888:35: error: invalid operands to binary / (have ???const struct <anonymous> *??? and ???long long unsigned int???)
      Task: The wow64 Wine build failed
    • Contributor

      Marvin replied on the mailing list:

      Hi,
      
      It looks like your patch introduced the new failures shown below.
      Please investigate and fix them before resubmitting your patch.
      If they are not new, fixing them anyway would help a lot. Otherwise
      please ask for the known failures list to be updated.
      
      The full results can be found at:
      https://testbot.winehq.org/JobDetails.pl?Key=136529
      
      Your paranoid android.
      
      
      === build (build log) ===
      
      ../wine/include/winbase.h:2951:24: error: unknown type name ???error???; did you mean ???errno_t????
      ../wine/include/winbase.h:2951:24: error: unknown type name ???error???; did you mean ???errno_t????
      ../wine/dlls/urlmon/tests/misc.c:1859:6: error: initializer element is not constant
      ../wine/dlls/urlmon/tests/misc.c:1860:6: error: initializer element is not constant
      ../wine/dlls/urlmon/tests/misc.c:1936:31: error: ???default_feature_tests??? undeclared (first use in this function)
      ../wine/include/winnt.h:888:35: error: invalid operands to binary / (have ???const struct <anonymous> *??? and ???unsigned int???)
      Task: The exe32 Wine build failed
      
      === debian11 (build log) ===
      
      ../wine/include/winbase.h:2951:24: error: unknown type name ???error???; did you mean ???errno_t????
      ../wine/include/winbase.h:2951:24: error: unknown type name ???error???; did you mean ???errno_t????
      ../wine/dlls/urlmon/tests/misc.c:1859:6: error: initializer element is not constant
      ../wine/dlls/urlmon/tests/misc.c:1860:6: error: initializer element is not constant
      ../wine/dlls/urlmon/tests/misc.c:1936:31: error: ???default_feature_tests??? undeclared (first use in this function)
      ../wine/include/winnt.h:888:35: error: invalid operands to binary / (have ???const struct <anonymous> *??? and ???unsigned int???)
      Task: The win32 Wine build failed
      
      === debian11b (build log) ===
      
      ../wine/include/winbase.h:2951:24: error: unknown type name ???error???; did you mean ???errno_t????
      ../wine/include/winbase.h:2951:24: error: unknown type name ???error???; did you mean ???errno_t????
      ../wine/dlls/urlmon/tests/misc.c:1859:6: error: initializer element is not constant
      ../wine/dlls/urlmon/tests/misc.c:1860:6: error: initializer element is not constant
      ../wine/dlls/urlmon/tests/misc.c:1936:31: error: ???default_feature_tests??? undeclared (first use in this function)
      ../wine/include/winnt.h:888:35: error: invalid operands to binary / (have ???const struct <anonymous> *??? and ???long long unsigned int???)
      Task: The wow64 Wine build failed
  • Jacek Caban
    Jacek Caban @jacek started a thread on commit 645688c8
517 536
518 537 if (dwReserved || !szURL)
519 538 return E_INVALIDARG;
520 539
521 return S_OK;
540 const size_t len = wcslen(szURL);
541
542 if (len >= MAX_URL_SIZE)
543 return S_FALSE;
544
545 if (StartsWithProtocol(szURL, len, L"https") ||
546 StartsWithProtocol(szURL, len, L"http") ||
547 StartsWithProtocol(szURL, len, L"ftp") ||
548 StartsWithProtocol(szURL, len, L"file") ||
549 StartsWithProtocol(szURL, len, L"mailto") ||
550 StartsWithProtocol(szURL, len, L"mk") ||
  • I think that we should use pluggable protocols to try to parse the URL. See the attached test hack. It fails on Windows showing how it's supposed to work: it queries IInternetProtocolInfo interface of protocol handler and calls ParseUrl(PARSE_CANONICALIZE) on it. Maybe we could just use CoInternetParseUrl for that and see if it fails, I'm not sure without more tests.

  • Please register or sign in to reply
Please register or sign in to reply
Loading