Commit Graph

31 Commits

Author SHA1 Message Date
lorry li
5b52420184 Make sure http request on platforms can cancel request with proper reason;
Add test case for canceling request without calling ProcessRequest, make sure complete delegate will be invoked;
Add test case for canceling request which called ProcessRequest, but still in the queue, the complete delegate will be invoked immediately(Make sure canceled queued requests will complete immediately instead of waiting until they are popped from the queue).

[REVIEW] [at]michael.atchison [at]michael.kirzinger [at]rob.cannaday [at]rafa.lecina
#rb michael.atchison, Rafa.Lecina, Rob.Cannaday

[CL 34082567 by lorry li in ue5-main branch]
2024-06-03 20:21:58 -04:00
lorry li
21d7545a7d Add ResetTimeoutStatus method to clear bTimedOut flag for http request to be reused when the total timeout was set.
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina [at]rob.cannaday
#rb michael.atchison
#tests Tested through new test case in WebTests project.

[CL 34073981 by lorry li in ue5-main branch]
2024-06-03 15:24:38 -04:00
lorry li
94abfe5fb8 Refactor: Merge IHttpThreadedRequest into FHttpRequestCommon, deprecate FHttpRequestCommon and FHttpResponseCommon from public.
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#rb michael.atchison, Rafa.Lecina

[CL 34010820 by lorry li in ue5-main branch]
2024-05-30 15:47:58 -04:00
lorry li
30d9b2c42a Resubmit after fixing apple compile error:
Clean the cvar to trigger header received callback before http request complete;
Move the url patterns for logging response into http manager.

#jira UE-210894
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina

[CL 33687587 by lorry li in ue5-main branch]
2024-05-16 10:44:04 -04:00
hilda cruz
dd60ada02f [Backout] - CL33670189
[FYI] lorry.li
Original CL Desc
-----------------------------------------------------------------
Clean the cvar to trigger header received callback before http request complete;
Move the url patterns for logging response into http manager.

#jira UE-210894
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#rb michael.atchison, Michael.Kirzinger, Rafa.Lecina

[CL 33675691 by hilda cruz in ue5-main branch]
2024-05-15 20:04:32 -04:00
lorry li
ed62d76c72 Clean the cvar to trigger header received callback before http request complete;
Move the url patterns for logging response into http manager.

#jira UE-210894
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#rb michael.atchison, Michael.Kirzinger, Rafa.Lecina

[CL 33672785 by lorry li in ue5-main branch]
2024-05-15 17:54:14 -04:00
lorry li
e7ad743957 Add support to log response for specified url patterns, through CVarHttpUrlPatternsToLogResponse. By default it only logs json response but can enable for all content type by disable CVarHttpLogJsonResponseOnly;
Move response headers logging from CurlHttp into common http impl.

[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#jira UE-202804, UE-205793

#rb rafa.lecina
#tests Tried on pc when the command line -ini:Engine:[ConsoleVariables]:http.UrlPatternsToLogResponse=epicgames.net

[CL 32828807 by lorry li in ue5-main branch]
2024-04-09 12:13:24 -04:00
lorry li
b05920e492 Fix the non-unity compile error on android and apple, caused by the request payload refactor.
[REVIEW] [at]michael.atchison [at]michael.kirzinger [at]rafa.lecina
#rb michael.atchison

[CL 32422775 by lorry li in ue5-main branch]
2024-03-21 20:07:18 -04:00
lorry li
1d1ab20f6f Extract duplicated code for setting content stream file into HttpRequestCommon.
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#rb Rafa.Lecina

[CL 32413561 by lorry li in ue5-main branch]
2024-03-21 16:22:12 -04:00
lorry li
94234107c7 Add the interface to set activity timeout per request.
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina [at]jon.cook
#rb jon.cook, michael.atchison
#tests Passed WebTests test case

[CL 32409091 by lorry li in ue5-main branch]
2024-03-21 15:03:46 -04:00
lorry li
3139b7bf9c Log warning instead of check when http activity timer has been started.
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#rb michael.atchison, Michael.Kirzinger

[CL 32193587 by lorry li in ue5-main branch]
2024-03-12 17:33:11 -04:00
lorry li
efdbf20e85 Make sure to stop activity timeout timer when total timeout triggered;
Only output log if request had completed when activity timeout, it can continue to run even if that happened.

[REVIEW] [at]michael.atchison [at]michael.kirzinger [at]rafa.lecina
#rb Rafa.Lecina

[CL 31948912 by lorry li in ue5-main branch]
2024-03-01 13:19:35 -05:00
lorry li
1470d52971 Fix the http issue that FinishRequest could potentially be called twice in CurlHttp impl.
Reason: When FHttpRequestCommon::CancelRequest get called, it will set bCanceled as true and abort request which will in the end call FinishRequest. But in http thread it will also check IsThreadedRequestComplete to see if the request is complete and call FinishRequest, in that function we shouldn't check bCanceled or bTimedOut, because request has already been aborted when those flags changed.

[REVIEW] [at]michael.atchison [at]michael.kirzinger [at]rafa.lecina [at]jens.petersam
#jira UE-206965
#rb Michael.Kirzinger, Rafa.Lecina
#tests Reproduced and fixed with a test case

[CL 31858760 by lorry li in ue5-main branch]
2024-02-27 19:20:09 -05:00
lorry li
0cd2b1ff8d Make sure don't pass received data to stream interface after cancelling the http request or after shutdowning http module;
Add test cases to test that after canceling/shut down request, the response body receive delegate won't ever been called.

[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina [at]jens.petersam
#jira UE-207423, FORT-706402
#rb michael.atchison, Rafa.Lecina

[CL 31820574 by lorry li in ue5-main branch]
2024-02-26 18:06:19 -05:00
lorry li
c6292b58db Don't output warning when timed out if the request is in completed state.
[REVIEW] [at]chris.adams [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#rb Michael.Kirzinger

[CL 31624018 by lorry li in ue5-main branch]
2024-02-19 16:03:26 -05:00
lorry li
f793c875f2 Extract the Response from http request implementions into HttpRequestCommon;
Fix the test case the response in request is not cleared on some platforms when retrying.

#jira UE-202804
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#rb michael.atchison, Rafa.Lecina

[CL 31518978 by lorry li in ue5-main branch]
2024-02-15 09:54:57 -05:00
lorry li
702eeb4a13 Stop activity timeout timer after canceling request;
Stop total timeout timer after request completed in retry manager;
Move the virtual impls of FHttpRequestAdapter to cpp file.

[REVIEW] [at]michael.kirzinger [at]rafa.lecina [at]michael.atchison
#jira UE-197485
[FYI] [at]jens.petersam
#rb Jens.Petersam, Rafa.Lecina
#tests Repro and fixed in WebTests

[CL 31304925 by lorry li in ue5-main branch]
2024-02-08 16:31:09 -05:00
lorry li
f1f1946eee Add GetEffectiveURL interface to get the effective url after redirection.
#jira UE-204044
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina [at]jens.petersam
#rb Rafa.Lecina
#tests Passed WebTests test case, launched the game to main menu.

[CL 31180593 by lorry li in ue5-main branch]
2024-02-05 13:23:49 -05:00
lorry li
d1b0478e2f Fix the http dead lock when Flush while AbortRequest;
Add the ProcessRequestUntilComplete sync call to IHttpRequest.

[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina [at]robert.millar [at]laura.hermanns
#jira UE-197485
#rb Laura.Hermanns, michael.atchison, Rafa.Lecina
#tests Passed tests in WebTests.

[CL 30934863 by lorry li in ue5-main branch]
2024-01-26 14:25:18 -05:00
lorry li
aa2d8d4a0b Make activity timeout can be turned off by hotfixing to 0;
Change default activity timeout to 30s.

[REVIEW] [at]michael.kirzinger [at]rafa.lecina [at]michael.atchison
#rb michael.atchison, Michael.Kirzinger

[CL 30887697 by lorry li in ue5-main branch]
2024-01-25 11:01:33 -05:00
lorry li
0980390e94 Migrate retry system total timeout for http request, by adding total timeout feature in http request;
Deprecate HttpTimeout config, use HttpActivityTimeout or HttpTotalTimeout instead;
Deprecate HttpSendTimeout config, only use HttpActivityTimeout;
Make HttpActivityTimeout work on all platforms, not only CurlHttp;
Added corresponding http tests;
Now because timeout migrated, enable new flow by default in retry system to have non-game thread support.

#jira UE-197485, UE-202201
[REVIEW] [at]michael.atchison [at]michael.kirzinger [at]rafa.lecina
#rb michael.atchison, Michael.Kirzinger
#tests Tested through WebTests project on all platforms, also tried the game on PC.

[CL 30817277 by lorry li in ue5-main branch]
2024-01-23 16:08:08 -05:00
lorry li
05a45465b3 Add status code received callback for http and implement it for all platforms.
#jira UE-203992
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina [at]jans.petersam
#rb michael.atchison, Rafa.Lecina
#tests Tested through new test cases in WebTests project

[CL 30726774 by lorry li in ue5-main branch]
2024-01-19 15:35:30 -05:00
lorry li
51d9f634fa Add analytics stats for http.
[REVIEW] [at]michael.kirzinger [at]michael.atchison
#jira UE-201506, UE-193490
#rb Michael.Kirzinger

[CL 30544200 by lorry li in ue5-main branch]
2024-01-10 14:19:37 -05:00
lorry li
af6cc418c8 Move some http request start logs and http disable option from curl http impl into http request common.
#jira UE-202804
[REVIEW] [at]michael.kirzinger [at]justin.marcus
#rb Justin.Marcus

[CL 30376035 by lorry li in ue5-main branch]
2023-12-18 10:32:06 -05:00
lorry li
48e220c626 Refactor to prepare for retry migration from retry system to http request, should have no behavior change:
- Move timeout related functions into FHttpRequestCommon, make sure those functions are not exposed to FHttpRequestAdapterBase;
- Rename PreCheck to PreProcess, also clear internal states in PreProcess to make sure the request is clean for retry.

[REVIEW] [at]rafa.lecina [at]michael.kirzinger [at]michael.atchison
#jira UE-197485

#rb Rafa.Lecina

[CL 30186509 by lorry li in ue5-main branch]
2023-12-07 13:38:15 -05:00