http://bugs.winehq.org/show_bug.cgi?id=16831
--- Comment #22 from TJ support@tjworld.net 2009-01-09 04:23:57 ---
Good work. It would be even better if you could add these to Wine's test suite (dlls/wininet/tests/http.c) and mark the tests that fail as todo_wine.
Thank you. I did consider adding them to the test suite but for the issue that the tests are doing live connections and I thought it possible that the tests may run on systems that have no Internet connectivity.
A second issue is that the test results are based on the live connection test, *not* the state of the URL_COMPONENTS structure - which is the key issue in this bug. From what I could see of the WINAPI there is no way to examine the internal state of that structure or control the request at a lower level that would allow an application to examine it.
Also, this only tests one path to a connection and from what I see there are several other ways the WinAPI might proceed.
Obviously some tests are meant to fail so they'd be considered a success :)
I'm willing to do some more work on integrating tests based on the current work if these issues can be resolved or put aside.
Going back to the patch - with these results is the patch now more acceptable?
I've looked in detail for better ways to achieve the end result but so far they would all require a large body of essentially duplicate code in the caller to InternetCrackUrlW() to check the prerequisites for forcing the change.
The only other solution, albeit requiring a whole bunch of duplicate pre-requisite code, is to provide a separate fix-up function that can be called by internal functions.
There are other callers, some of which might require the same fix-up, which suggests the 'static' storage-class should be dropped. Some are outside the module too - would it need exporting in some way?
dlls/urlmon/http.c:344: in HttpProtocol_Start() dlls/urlmon/umon.c:550: in URLMonikerImpl_BindToStorage_hack() dlls/urlmon/umon.c:730: in URLMonikerImpl_BindToStorage()
The wiki suggests HTTPS 'shares most code' with HTTP, so these probably need dealing with too. (http://wiki.winehq.org/UrlMon)
dlls/wininet/cookie.c:198: in COOKIE_crackUrlSimple() dlls/wininet/internet.c:1277: in InternetCrackUrlA() dlls/wininet/internet.c:2734: in InternetCheckConnectionW() dlls/wininet/internet.c:2848: in INTERNET_InternetOpenUrlW() dlls/wininet/http.c:1332: in HTTP_DealWithProxy() dlls/wininet/http.c:2980: in HTTP_HandleRedirect()
dlls/cryptnet/cryptnet_main.c:478: in CRYPT_CrackUrl() dlls/cryptnet/cryptnet_main.c:914: in File_RetrieveEncodedObjectW() dlls/cryptnet/cryptnet_main.c:996: in CRYPT_GetRetrieveFunction()