Commit Graph

69 Commits

Author SHA1 Message Date
Zebediah Figura 439600d5ce kernelbase: Prepend the scheme even if the requested URL part is empty.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 09:07:07 +01:00
Zebediah Figura 91ae5ffe08 kernelbase: Allow schemes to contain uppercase characters in UrlGetPart().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 09:07:07 +01:00
Zebediah Figura 6cb1264585 kernelbase: Get rid of the "size" and "type" arguments to scan_url().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 09:07:07 +01:00
Zebediah Figura b72f7afc8b kernelbase: Allow the two initial slashes to be backslashes in UrlGetPart().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 09:07:07 +01:00
Zebediah Figura 224d073388 kernelbase: Return E_INVALIDARG when requesting URL_PART_PORT and there is no port.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-16 08:21:11 +01:00
Zebediah Figura 67ea5ccc6b kernelbase: Return E_INVALIDARG when requesting URL_PART_PASSWORD and there is no password.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-16 08:21:08 +01:00
Zebediah Figura 68323afa08 kernelbase: Return E_INVALIDARG when requesting URL_PART_USERNAME and there is no username.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-16 08:21:04 +01:00
Zebediah Figura a3d67465d8 kernelbase: Return void from parse_url().
If we cannot parse a scheme, the entire parsed_url structure will be zero, in
which case we will always return S_FALSE from UrlGetPartW().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-16 08:20:07 +01:00
Zebediah Figura 77ac962ded kernelbase: Parse query strings even without a slash after the host in UrlGetPart().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-16 08:20:00 +01:00
Zebediah Figura c57992f8dc kernelbase: Do not return the question mark as part of the query string from UrlGetPart().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-15 10:36:08 +01:00
Zebediah Figura 932daf59c3 kernelbase: Allow usernames and passwords to contain any characters in UrlGetPart().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-15 10:36:04 +01:00
Zebediah Figura 0b9b73d6ef kernelbase: Allow ports to contain any characters in UrlGetPart().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-15 10:36:00 +01:00
Zebediah Figura 4ff109c3d6 kernelbase: Allow hostnames to contain any characters in UrlGetPart().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-15 10:35:56 +01:00
Zebediah Figura ef64aea701 kernelbase: Also return E_FAIL when trying to parse username, password, or port for non-Internet URLs.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-15 10:35:52 +01:00
Zebediah Figura 1747b0b1d5 kernelbase: Do not initialize output params on failure in UrlGetPart().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 11:04:19 +01:00
Zebediah Figura 0df41c3535 kernelbase: Also parse hostnames for news schemes in UrlGetPart().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 11:04:19 +01:00
Zebediah Figura 05e82ba113 kernelbase: Ignore URL_PARTFLAG_KEEPSCHEME for file URLs.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 11:04:19 +01:00
Zebediah Figura 2db68d8191 kernelbase: Ignore URL_PARTFLAG_KEEPSCHEME when used with URL_PART_SCHEME or URL_PART_QUERY.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 11:04:19 +01:00
Zebediah Figura 149b6869a2 kernelbase: Include the null terminator in the length passed to WideCharToMultiByte() in UrlGetPartA().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 11:04:19 +01:00
Eric Pouech 2dcfe06442 kernelbase: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-11 11:21:29 +01:00
Zebediah Figura d0ed0b676c kernelbase: Use ntdll ctype functions.
These were open-coded in 5933c2a690, but there's
no reason not to use the ASCII versions from ntdll.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-31 18:38:54 +01:00
Zebediah Figura 628f2a1e56 kernelbase: Use wcsnlen().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-31 18:38:54 +01:00
Daniel Lehman 2a5682d98b kernelbase: Handle UNC path in UrlApplySchemeW.
Fixes loading XML from a UNC path.

Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-23 21:02:13 +01:00
Daniel Lehman f33bf35d9a kernelbase: Don't add a backslash to the second path if not needed.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 22:14:19 +02:00
Rémi Bernon c27b2461a4 kernelbase: Don't strip leading dots in relative paths.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49315
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:42:37 +02:00
Esme Povirk 404cd8a92b kernelbase: Always remove trailing spaces in PathRemoveBlanks.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-26 12:17:36 +02:00
Michael Stefaniuc 1b1b6c5f7d kernelbase: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 12:36:53 +01:00
Zhiyi Zhang 3cbd9cda19 kernelbase: Check NULL canonicalized_len parameter in UrlCanonicalizeW().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49175
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 12:09:54 +02:00
Alexandre Julliard 5933c2a690 kernelbase: Don't allow the full Unicode character range in path functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-10 20:39:21 +01:00
Alexandre Julliard ef95e4a8b9 kernelbase: Don't use wcsicmp/wcsnicmp() on the full Unicode character range.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-10 20:39:21 +01:00
Alexandre Julliard 1a9ddc3759 kernelbase: Don't use towlower() on the full Unicode character range.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-10 20:39:21 +01:00
Alexandre Julliard fe79b87f02 kernelbase: Use wide character string literals in path.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-10 10:00:53 +01:00
Alexandre Julliard a76518c186 kernelbase: Use exception handlers instead of IsBad* functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 23:25:58 +01:00
Alexandre Julliard 22b2250834 kernelbase: Redirect heap allocation functions to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 22:46:19 +01:00
Jeff Smith c13a8f60bd kernelbase: Fix PathAllocCanonicalize handling segments that contain dots.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47766
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 12:22:35 +02:00
Alexandre Julliard 733cdaa698 kernelbase: Revert some incorrect differences with shlwapi.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-19 20:41:26 +02:00
Alexandre Julliard 483de1a8a2 kernelbase: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-18 23:51:51 +02:00
Nikolay Sivov 88ffcd5db4 kernelbase: Add remaining URL functions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 15:36:54 +02:00
Nikolay Sivov d97a164cd4 kernelbase: Add remaining path functions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-23 22:18:31 +02:00
Nikolay Sivov 3dc7bf3fd4 kernelbase: Add more URL API functions from shlwapi.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-23 22:18:31 +02:00
Nikolay Sivov 646c7803ec kernelbase: Remove helpers that are no longer necessary.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-22 19:16:05 +02:00
Nikolay Sivov 7b2396979e kernelbase: Add some URL API functions from shlwapi.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-22 19:16:05 +02:00
Nikolay Sivov 1cef84a124 kernelbase: Add most of path API from shlwapi.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 18:08:37 +02:00
Nikolay Sivov cb95cbc386 kernelbase: Duplicate more path API from shlwapi.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 19:25:20 +02:00
Nikolay Sivov 44ac5af07a kernelbase: Duplicate some path handling functions from shlwapi.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 20:13:59 +02:00
Alexandre Julliard cae3324739 kernelbase: Use strncmpiW instead of memicmpW for strings without embedded nulls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-07 11:31:13 -05:00
Michael Stefaniuc e441d88262 kernelbase: Remove redundant not-NULL check (coccinellery).
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:28:35 +01:00
Michael Stefaniuc 426099a4a3 kernelbase: Avoid TRUE : FALSE conditional expressions.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-05 10:20:59 +01:00
Zhiyi Zhang 7c08c6f037 kernelbase: Implement PathCchAppend.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 13:22:35 +01:00
Zhiyi Zhang 9bd8254a85 kernelbase: Implement PathCchAppendEx.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 13:22:26 +01:00