Also introduce the header `ws2bth.h` alongside the necessary constants for `AF_BTH` addresses in `ws2def.h`.
--
v2: ws2_32/tests: Add tests for Bluetooth addresses for WSAStringToAddress().
ws2_32: Implement WSAAddressToString() for Bluetooth (AF_BTH) addresses.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7504
This is the continuation of https://gitlab.winehq.org/wine/wine/-/merge_requests/7317.
There are a lot of smaller commits (some even no-op renames), because there are some inconsistencies in the codebase currently of what an NT thread priority vs a base thread priority should be and I hope that this clears that up a bit.
I tried making the commits as atomic as possible I hope this is fine... There are still a few tiny details missing like fixing up the `list_processes` request and `KeSetPriorityThread` and friends which are either stubs or not correctly working as well.
There are also probably a few tests that can be written here (after thread priority boosting has been disabled, cause that makes the behavior on windows very flaky and dynamic). In fact on windows there is some thread priority boost decay going on after the message has been processed (and probably other boosting mechanisms), which this MR does not properly capture, but are also probably not reasonable to implement.
This also reverts the commits of https://gitlab.winehq.org/wine/wine/-/merge_requests/1232, which are being effectively overwritten anyways.
The `get_thread_priority_info` request was added, because the reply in `get_thread_info` would be otherwise larger than 64 bytes, so it had to be split.
--
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7516
I add 5 tests to test_http_connection().
The first test sends "Expires: 0", the second test sends "Expires: -1", the third test sends "Expires: 100", the fourth test sends "Expires: invalid date", the fifth test sends "Expires: Thu, 06 Mar 2025 06:08:11 GMT".
The tests on actual windows 10 has output informations, such as:
```null
http.c:6837: expires: 2025-03-06 06:14:13, current time: 2025-03-06 06:14:13, server response expires: 0
http.c:6837: expires: 2025-03-06 06:14:14, current time: 2025-03-06 06:14:14, server response expires: -1
http.c:6837: expires: 2025-03-06 06:14:14, current time: 2025-03-06 06:14:14, server response expires: 100
http.c:6837: expires: 2025-03-06 05:14:15, current time: 2025-03-06 06:14:15, server response expires: invalid date
http.c:6837: expires: 2025-03-06 06:08:11, current time: 2025-03-06 06:14:15, server response expires: Thu, 06 Mar 2025 06:08:11 GMT
```
I think Windows treats all numbers as invalid values and sets the expiration time to the current system time, while other invalid values set the expiration time to one hour before the current system time, and valid expiration times use the set expiration time.
In Wine, handling inconsistencies with Windows 10, We treat "0" as "1601-01-01 00:00:00", and all other invalid values as 10 minutes after the current system time. such as
```coffeescript
http.c:6837: expires: 1601-01-01 00:00:00, current time: 2025-03-06 06:10:56, server response expires: 0
0118:err:wininet:HTTP_ParseDateAsAsctime unexpected weekday L"-1"
0118:err:wininet:HTTP_ParseDate unexpected date format L"-1"
http.c:6837: expires: 2025-03-06 06:20:56, current time: 2025-03-06 06:10:57, server response expires: -1
0110:err:wininet:HTTP_ParseDateAsAsctime unexpected weekday L"100"
0110:err:wininet:HTTP_ParseDate unexpected date format L"100"
http.c:6837: expires: 2025-03-06 06:20:56, current time: 2025-03-06 06:10:57, server response expires: 100
0118:err:wininet:HTTP_ParseDateAsAsctime unexpected weekday L"inv"
0118:err:wininet:HTTP_ParseDate unexpected date format L"invalid date"
http.c:6837: expires: 2025-03-06 06:20:56, current time: 2025-03-06 06:10:58, server response expires: invalid date
http.c:6837: expires: 2025-03-06 06:08:10, current time: 2025-03-06 06:10:58, server response expires: Thu, 06 Mar 2025 06:08:11 GMT
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7323#note_96954