Граф коммитов

674 Коммитов

Автор SHA1 Сообщение Дата
Sasha Weiss ee05b20998
Address lint warnings in the Android Java code (#569)
* Fix a bunch of lints

* Copy modified source to other libHC projects

* Unfix some lints :P

* Unfix a lint that's not relevant till OkHttp upgrade

* Remove an unused method

* Empty commit to bump CI
2021-03-03 17:27:13 -08:00
Sasha Weiss 0260ef82cf
Remove network check during Android HTTP request initialization (#570)
* Remove explicit network check during Android HttpRequest::Initialize

* Copy modified source to other libHC projects

* Remove unused imports
2021-03-03 16:01:18 -08:00
Sasha Weiss ebfbecf96a
Upgrade OkHttp version (#568)
* Bump version in Android-Studio build

* Bump version in VS builds

* Use non-deprecated method
2021-03-03 14:03:31 -08:00
Sasha Weiss 0151cbffeb
Update path casing for Android Java files to align with package name (#567)
* Temporarily rename java path to junk

* Rename back with better casing

* Temporarily rename java path to junk for VS builds

* Rename back with better casing

* Change casing in .androidproj files

* Empty commit to bump CI

* Second empty commit to bump CI
2021-03-02 15:48:07 -08:00
Sasha Weiss 438bed7ab5
Drop Android 19 from Android Studio build (#565)
* Drop Android 19 from the Android Studio-compatible build

* Consolidate externalNativeBuild blocks

* Remove common Gradle config, move reduced config into individual projects
2021-02-25 11:51:04 -08:00
Brad King 531104cd26
openssl.bash: Use Xcode instance preferred by caller (#564)
Do not assume the caller is building with `/Applications/Xcode.app`.
Some environments use other paths like `/Applications/Xcode_12.1.app`.

Ask `xcode-select -p` for the path to the Xcode `/Developer` directory.
Within `libHttpClient.xcodeproj`, it will use the matching Xcode.

Fixes: #563

Co-authored-by: Jason Sandlin <jasonsa@microsoft.com>
2021-02-17 14:34:31 -08:00
John L 193b45fd93
Make WinHttp WebSocket send fully asyncronous (#561) 2021-02-11 20:53:03 -08:00
Sasha Weiss 7fcf5216ca
Disable header maps for SSL targets (#560) 2021-01-19 23:26:34 -08:00
Sasha Weiss 662d66ed48
Bump Android NDK version to r22 (#559) 2021-01-19 14:48:18 -08:00
Sasha Weiss f4f170b5cb
Make iOS NOWEBSOCKETS targets have same name but be sub-directory-ed (#558)
* Make iOS NOWEBSOCKETS targets have same name but be sub-directory-ed

* Disable header maps for all libHC static lib targets

* Add missing prefix header and missing include dir to libHttpClient_macOS target
2021-01-19 13:23:45 -08:00
Brian Pepin 9116eb24d7
Fix possible race condition during cancel (#557)
Co-authored-by: Jason Sandlin <jasonsa@microsoft.com>

If a call completes with either a zero byte payload or an error, the async lib will try to call Cleanup on the call provider early, instead of the normal cleanup which occurs after the completion event has been fired. This early cleanup can create a race condition with XAsyncCancel as follows:

XAsyncCancel is called. Early in the method it acquires a reference on the state structure.
The provider completes its DoWork with zero payload or error and rolls out of the method.
Early cleanup of the provider now happens.
XAsyncCancel continues and tries to call Cancel on the provider.
The provider is likely to crash now because it has already run its cleanup code.
This race was observed with the networking stack on Xbox.

My fix for this is to introduce another "cleanup location" and to change the code that allows cleanup after DoWork to only set this value if the current location is the default Destructor setting. The net effect of this is if the race occurs the async provider cleanup is deferred to state cleanup and loses out on the early cleanup optimization. This seemed better than ditching the early cleanup route entirely.
2021-01-08 13:20:39 -08:00
Ramsey dc081191ee
Updating the headers to match the docs chm (#555)
Co-authored-by: Jason Sandlin <jasonsa@microsoft.com>
2021-01-08 12:16:34 -08:00
Sasha Weiss b6757e81bf
Add iOS targets for building without websockets/SSL (#556)
* Don't bother installing OpenSSL docs/man pages/etc

* SSL targets merge libssl and libcrypto and are depended on by libHC static lib targets

* Add NOWEBSOCKETS framework target

* Add macOS NOWEBSOCKETS framework target

* Add xcschemes to libHttpClient workspace to build the _NOWEBSOCKETS targets

* Empty commit to force fresh CI

* Disable arm64 support for 'Any Mac' target

* Alphabetize

* Update a couple vestigial fields

* Clean up SSLDummy copyright header

* Empty commit to force fresh CI
2021-01-07 17:42:30 -08:00
Jason Sandlin 7ebf7150ca
Removing task files from GDK projects (#554) 2020-12-09 12:51:18 -08:00
John L 10a805d7c1
Adding GDK projects to libHttpClient props file (#552) 2020-11-02 14:10:47 -08:00
John L 0332b4e43e
Adding GDK projects (#551) 2020-10-30 14:41:05 -07:00
Jason Sandlin e0c0010d71
Fixing mem hook delete of PerformEnv (#550) 2020-10-29 13:38:40 -07:00
Sasha Weiss a3659949ea
Exclude arm64 arch from iOS simulator builds (#549) 2020-10-29 13:38:14 -07:00
John L d2eaf8aae6
Add null check in WinRT Websocket to fix crash seen by Coalition (#548) 2020-10-26 09:49:48 -07:00
Jason Sandlin b76fa6f057
Adding more memhooking (#546) 2020-10-13 13:17:06 -07:00
Ramsey 3b636601ca
Adding initial state to better manage websocket lifecycle (#545)
* Adding initial state to better manage websocket lifecycle

* Feedback
2020-10-05 14:34:19 -07:00
Matt VanderKolk 586d5a9525
Fixing Android network error retry (#543)
On Android if a network request failed due to network issues, the Android code set a failure on both the network call object as well as the async call. Because the async call was indicating a failure as well, the retry logic was never kicking in.

Co-authored-by: Jason Sandlin <jasonsa@microsoft.com>
2020-09-29 14:49:59 -07:00
Luca Beltrami 07bf1a4219
Add missing export for iOS/Mac (#542) 2020-09-25 14:48:06 -07:00
Luca Beltrami 1eb312c47f
Expose async cleanup (#541)
The current blocking version of HCCleanup has 3 major flaws:

- It always uses the system task queue, which may be undesirable by some clients
- It blocks waiting for the internal work to complete, which could cause a deadlock
- It does not expose a result so in the case of multiple libHttpClient initializations it is impossible to tell if the memory hooks are safe to remove

This change simply exposes the internal asynchronous cleanup functionality allowing the caller control to bypass all these issues
2020-09-25 12:55:27 -07:00
Brian Pepin 0541869696
Fix for possible spin during queue termination (#539)
If a task queue is terminated while tasks are still being dispatched, the logic that drains the queue before termination can get into an infinite loop. The drain logic needs to pop items off the queue and those that should not be removed are re-added. The first one to be re-added is remembered as a sentinel so the loop knows when to quit. If that item gets dispatched, the loop never terminates.

With this change we put all the items to re-add to the queue into a local buffer and then push them back onto the queue later.
2020-08-25 22:42:01 -07:00
Brian Pepin c5d7b2b40a
Sync from OS tree (#538)
There was a minor bug fix in the Windows OS tree to clear the header data of a task queue before it is deleted so if someone tried to use a released task queue handle we could catch it early. If you reused right after releasing the un-allocated memory could still look like a valid task queue and this will cause crashes later on.
2020-08-19 11:21:59 -07:00
Luca Vezzaro 92bc0dd6fd
Add error log line for WINHTTP_CALLBACK_STATUS_SECURE_FAILURE (#536)
* Add error log line for WINHTTP_CALLBACK_STATUS_SECURE_FAILURE

* Add WINHTTP_CALLBACK_FLAG_SECURE_FAILURE to WinHttpSetStatusCallback() as WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS doesn't really include all notifications

* Remove unreferenced formal parameter
2020-08-10 13:08:44 -07:00
Jason Sandlin 7e3b6d2591
Adding XNetworking support (#535)
* Adding XNetworking support

* PR feedback

* Fixing ifdef

* Adding locking and immediate queue

* Fixing bugs
2020-07-28 23:42:21 -07:00
Sasha Weiss bb85f6469d
Add Android Studio 4.0 compatibility (#533)
* Specify CMake target in build.gradle instead of using dummy .so workaround

* Bump Gradle and plugin versions

* Add comments on workaround

* Pin NDK version
2020-07-07 14:22:07 -07:00
MSFT-Heba 2ce09da494
Adding HCMockRemoveMock to Exports.exp (#532)
Adding HCMockRemoveMock to Exports.exp
2020-06-30 13:14:13 -07:00
Jason Sandlin 2c225f13d0
Adding support to Fiddler websockets on Win32 builds (#531)
* Adding support to debug websockets on Win32 builds

* Removing tabs

* adding ifdef
2020-06-29 14:04:47 -07:00
Luca Vezzaro 511b322860
Add HCHttpCallRequestSetSSLValidation(). Implemented for WinHttp only. (#517)
* Add HCHttpCallRequestSetSSLValidation(). Implemented for WinHttp only

* Convert tabs to spaces

* Ensure HCHttpCallRequestSetSSLValidation()  and related implementations are only defined on platforms using WinHTTP

Co-authored-by: Luca <40400240@users.noreply.github.com>
2020-06-19 12:48:55 -07:00
Sasha Weiss 7a000c8033
Pipe HC_NOWEBSOCKETS through the Gradle+CMake Android build (#528) 2020-06-12 14:00:21 -07:00
Sasha Weiss 2449892934
Make the common Android config generic to which Android plugin is applied (#529) 2020-06-12 13:36:09 -07:00
Matt VanderKolk 187672671d
Adding Xcode workspace and moving schemes to be owned by workspace (#530)
In order to have the schemes for libHttpClient's project not show up and clutter parenting workspaces, I'm adding a workspace next to the existing project and moving ownership of the schemes from the project to the new workspace.

With this change I'm also renaming the existing *_mac targets and schemes to *_macOS to match more widely accepted convention.

* Adding new workspace

* Setting autocreate schemes to false

* Moving libHttpClient schemes from project to workspace

* Renaming *_mac schemes and targets to *_macOS
2020-06-11 17:55:50 -07:00
Sasha Weiss 843fe41918
Standardize CMake function name convention and break libHC flags into a file (#526) 2020-06-11 15:36:12 -07:00
Sasha Weiss d40748fe42
Consolidate common gradle config (#527) 2020-06-11 14:22:50 -07:00
Sasha Weiss d92aaf57c8
Convert includedBuilds to subprojects (#525) 2020-06-11 12:23:19 -07:00
Sasha Weiss b13455e762
Add libHttpClient.Android.Workspace composite build (#524) 2020-06-10 12:37:33 -07:00
Jason Sandlin 80d8eee91c
Jitter Retry-After delay to spread load out (#522)
* Jitter Retry-After delay to spread load out

* Fixing iOS build
2020-06-04 13:35:21 -07:00
Sasha Weiss c2dfe76a10
Tweak binary dir for libHttpClient Java (#521)
* Tweak binary dir for libHttpClient Java

* Align Java and native binary dirs per feedback
2020-05-29 15:29:40 -07:00
Brian Pepin 5a24f6685d
Fix termination race (#520) 2020-05-29 11:20:24 -07:00
Sasha Weiss 3935814c5f
Add modern Gradle+CMake Android builds (#518) 2020-05-28 20:02:54 -07:00
Jason Sandlin 64739ee5b9
Fixing project templates when using cmake (#519) 2020-05-26 21:56:10 -07:00
John L 12899b44c3
WSPP should use composit queue for background work (#515) 2020-05-07 11:35:55 -07:00
Brian Pepin 1b65701858
Fix random FAIL_FAST and async context corruption in XAsyncGetResults (#514)
This PR fixes a random FAIL_FAST crash when completing an async call and fixes an issue where if you call XAsyncGetResults before a call is complete the async block's internal context gets corrupted.
2020-05-03 01:25:47 -07:00
Ramsey b06d2b73c1
Bug 26084980: Disable Edit and Continue (#513) 2020-04-29 16:42:38 -07:00
Brian Pepin 0df9a4434b
Fix race condition in termination code (#512)
* Fix race in termination

* Task Queue should alert monitors during termination
2020-04-13 10:46:53 -07:00
John L f767ad3034
Http fail fast logic shouldn't allow multiple calls to await the Retry-After window (#511) 2020-04-10 16:51:04 -07:00
Jason Sandlin fbaf74c02d
Fixing platform name (#510)
* Fixing platform name

* PR
2020-04-09 21:12:39 -07:00