Files
UnrealEngineUWP/Engine/Source/Runtime/Online/HTTP/Private/Windows/HttpWinInet.cpp

1355 lines
41 KiB
C++
Raw Normal View History

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "HttpWinInet.h"
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3209340 on 2016/11/23 by Ben.Marsh Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h. Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms. * Every header now includes everything it needs to compile. * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first. * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h. * Every .cpp file includes its matching .h file first. * This helps validate that each header is including everything it needs to compile. * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more. * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there. * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible. * No engine code explicitly includes a precompiled header any more. * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies. * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files. Tool used to generate this transform is at Engine\Source\Programs\IncludeTool. [CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
#include "Misc/ScopeLock.h"
#include "Misc/App.h"
#include "HAL/PlatformTime.h"
#include "EngineVersion.h"
Copying //UE4/Dev-Networking to //UE4/Main (Source: //UE4/Dev-Networking @3004032 ) ========================== MAJOR FEATURES + CHANGES ========================== Change 2939164 on 2016/04/10 by John.Barrett Updated base UNetConnection netcode to be bit-based, rather than byte-based (to optimize packet size with PacketHandler's and Oodle) - this CL is interdependent with subsequent CL's. Fixed an issue with FBitReader, when inserting a non-byte-aligned number of bits, where it would fail to zero the unused bits, in the last byte - this led to corrupt reads, in the new termination bit code (subsequent CL). Added better overflow detection for FBitWriter - plus other additional asserts. Fixed a potential bug with control channel messages, where non-byte-aligned control channel messages that were queued for later sending, were stored as byte-aligned, causing bad (too large) data to be sent. Optimized MAX_PACKET_HEADER_BITS to save a bit. Change 2939169 on 2016/04/10 by John.Barrett NetcodeUnitTest maintenance. Added unit test for testing bit reader/writer limits. Added 'LogHex' debug command, for logging a hex-editor-style dump of selected memory data - without requiring a dependency on NetcodeUnitTest. Change 2939170 on 2016/04/10 by John.Barrett Added work-in-progress DoS/DDoS unit test. Change 2943718 on 2016/04/14 by John.Pollard Allow override of replay session ID + start using match ID for replays Change 2944678 on 2016/04/14 by Ryan.Gerleve Merging using Release-4.11_to_Dev-Networking: 4.11 hotfix change: fix for an assert that can occur when network clients call AActor::SetReplicates. SetReplicates will now only modify RemoteRole if Role is Authority and warn otherwise. #jira UE-27646 Change 2946909 on 2016/04/18 by John.Pollard Misc seamless travel cleanup + sanity checks * Cleanup the naming of variables and logic used to pick which actors will transfer to new world during seamless travel to more explicitly convey intent * Warn when there is no context for a world when destroying actors, it's likely that this world is the floating world during seamless travel, and if we hit this case, something is likely in a bad state Change 2948883 on 2016/04/19 by John.Pollard GitHub request: https://jira.ol.epicgames.net/browse/UE-29385 Change 2952109 on 2016/04/21 by John.Barrett Fixed false positive with FBitWriter overflow error log, in PackageMap code. Change 2953639 on 2016/04/22 by John.Barrett Fixed shadowed local variable - UE-29829 Change 2958267 on 2016/04/27 by John.Pollard Make vision manager more resilient to bad network data from old replays Change 2958410 on 2016/04/27 by John.Pollard Fix incorrect warning when ReceivedBunch fails for replays Change 2958411 on 2016/04/27 by John.Pollard Replay backwards compatibility fixes. * Mark custom properties/RPC's as incompatible if there was an error reading them in the stream, and ignore from there on out. * Don't close connection when failing to read properties on clients now that we can skip over this info easily. Change 2960134 on 2016/04/28 by Ryan.Gerleve Protect against adding null player controllers to the out list of UEngine::GetAllLocalPlayerControllers. See https://udn.unrealengine.com/questions/289948/uenginegetalllocalplayercontrollers-pushes-a-null.html Change 2960617 on 2016/04/29 by John.Barrett Made way for engine version code refactor. Change 2961050 on 2016/04/29 by John.Pollard Log when we send hello to server in pending net game Change 2961468 on 2016/04/29 by John.Pollard ReplayCompat: Show name of incompatible property when logging + log when we don't read correct number of bits + cleanup Change 2964357 on 2016/05/03 by John.Barrett Optimized netcode SerializeInt\WriteIntWrapped, to allow compile-time calculation of the data bit size. The runtime calculated version of these functions, has been adjusted to not assert on 1-bit sized writes - to fix a false positive in Paragon. Adjusted some FMath functions, to allow CONSTEXPR for compile-time calculation. Change 2964361 on 2016/05/03 by John.Barrett Update unit test to work with new integer serialization code. Change 2964831 on 2016/05/03 by John.Barrett Back out net serialization changes for now. Change 2964832 on 2016/05/03 by John.Barrett Back out unit test net serialization change. Change 2964838 on 2016/05/03 by John.Barrett Fix Paragon false positive netcode assert. Change 2966257 on 2016/05/04 by John.Pollard Unify network version logic + move to core * Move network version logic to core * Formalized concept of compatible network/replay changelist * Fixed up UDemoNetDriver to work with new version concepts * Fixed up Orion/other samples in the same way * This is first step to officially supporting backwards compatility for replays, and possibly networking in general (would be opt-in if so) Change 2966657 on 2016/05/04 by John.Pollard Deprecate GEngineNetVersion, GEngineMinNetVersion and GEngineNegotiationVersion Change 2968945 on 2016/05/06 by John.Pollard Print name of object that has NULL level Change 2970529 on 2016/05/09 by Bart.Bressler Add an optional "CapturePercentage" command line parameter that has a percentage chance of generating capture files per connection Change 2971233 on 2016/05/09 by Bart.Bressler Update Oodle DLLs in Orion Change 2975585 on 2016/05/12 by Bart.Bressler - Keep track of STAT_NumNetActors on clients as well as servers - Change STAT_NumActors to just be the world actor count instead of using FActorIterator (FActorIterator was causing a hitch) Change 2979207 on 2016/05/16 by Bart.Bressler Remove FActorIterator loop around world actor count retrieval in UNetDriver::TickFlush Change 2981198 on 2016/05/17 by John.Pollard Changes to support FN replays * Save streaming levels within network stream * Don't load streaming level if it's already in the list * Remove need for meta data Change 2981201 on 2016/05/17 by John.Pollard Forgot to check in Change 2982075 on 2016/05/18 by John.Pollard Cache network checksum so we don't spam log (we call this function more now) Change 2982092 on 2016/05/18 by John.Pollard Lower verbosity of log Change 2986571 on 2016/05/23 by Bart.Bressler Fix issue where oodle wasn't getting enabled in shipping correctly Change 2988628 on 2016/05/24 by Bart.Bressler When processing captures with the Oodle commandlet, only check files that end with "ucap" (there might be gzipped files that have the exact same filenames, for example) Change 2988838 on 2016/05/24 by Bart.Bressler - Add script to pull down captures from S3 - Add script to do the whole process from pulling down captures to generating dictionaries Change 2994575 on 2016/05/31 by John.Pollard Include networkversion.h in UnrealNetwork.h, this is so that older code will continue to compile that relied on network version code that used to be in this file Change 2996026 on 2016/06/01 by John.Pollard Add network version to FArchive Change 2996043 on 2016/06/01 by John.Pollard Store network version on NetConnection/Bunch, replays properly initialize these to current replay network versions Change 2996081 on 2016/06/01 by John.Pollard Remove unused FInBunch constructor Change 2996544 on 2016/06/01 by John.Pollard Make sure network version is correct for external data + set on connection after checkpoint Change 2996731 on 2016/06/01 by John.Pollard Set game network version for Orion Change 2997042 on 2016/06/01 by John.Pollard Fix issue when game server times out, and replay service turns off live replay flag, and we fail to download last chunk + more log info when replay http chunk downloading fails Change 2997908 on 2016/06/02 by Ryan.Gerleve Use the smoothed mesh transform for characters when recording client replays. Since the root component's transform may only be updated periodically, this greatly improves the quality of character movement. Change 2998001 on 2016/06/02 by Ryan.Gerleve Set the NetDriverName in the replay spectator's constructor. The replay spectator will always be associated with a DemoNetDriver and this fixes cases where GetNetMode could return the wrong value before the net driver name was set (such as during BeginPlay). Also inverted the logic in IsForPlayback() to make it more intuitive. Change 2998636 on 2016/06/02 by John.Pollard If we don't have enough external replay samples, use the best one Change 2998637 on 2016/06/02 by John.Pollard Clamp replay time Change 2998705 on 2016/06/02 by John.Pollard Replay fixes: * Fix issue when scrubbing to time 0, and first chunk takes longer than normal to download * Better streaming logic that works better with new backend delay logic * Better handling when replay flips from live to not live * Don't update StreamTimeRangeStart/End unless we got those values in the header response * Handle when we fail to download a chunk and HighPriorityEndTime is active Change 2998832 on 2016/06/02 by Ryan.Gerleve Fix an issue that could cause the replay spectator controller to not get the notification that the spectator class has been received while recording a client replay. Change 2999054 on 2016/06/02 by Ryan.Gerleve Added ability to set a maximum desired time budget for replay recording. Once the budget is reached, remaining actors will have to wait until the next frame to try to replicate. Change 2999057 on 2016/06/02 by Ryan.Gerleve Fixed an issue that could cause the main game world to use the incorrect vision manager when deathcam was enabled and the replay recording time budget was set very aggressively. In this case, AOrionVisionManager2::PostInitializeComponents would be called before the spectator player controller was spawned in the playback world, causing it to fail to find the local player and not initializing GKillcamVisionManager correctly. Change 2999749 on 2016/06/03 by Ryan.Gerleve RPCs will now be recorded in client replays. Cleaned up actor role swapping logic for client recording and re-use it for RPCs. Change 3000051 on 2016/06/03 by Ryan.Gerleve Fix Paragon server crash. #jira UE-31618 Change 3001361 on 2016/06/05 by Ryan.Gerleve Added support for prioritizing actors during replay recording to get better results when a maximum desired recording time is set. Added virtual function GetReplayPriority to Actor, similar to GetNetPriority, but allows different priorities for live networking and replays. Moved FCompareFActorPriority to a header so that the DemoNetDriver can use it. Change 3001365 on 2016/06/05 by Ryan.Gerleve Paragon now uses a desired recording time limit and enables actor prioritization for recording the deathcam replay. Change 3002094 on 2016/06/06 by Ryan.Gerleve Missed file from a main merge fixup. Change 3002417 on 2016/06/06 by Ryan.Gerleve Disabling a check to work around UE-31636 for now. Change 3002547 on 2016/06/06 by John.Barrett Added improved 'DebugDump' command option to the Oodle trainer commandlet - this takes UE4 .ucap capture files, and batch converts them into Oodle-example-code compatible .bin files. Use through the new BatchDebugDump.bat file. Change 3002989 on 2016/06/06 by John.Pollard Add ability to skip missing/changed properties in FFastArraySerializer Change 3003072 on 2016/06/06 by John.Pollard Fix crash related to new replay backwards compatibility changes #lockdown Nick.Penwarden [CL 3004618 by John Pollard in Main branch]
2016-06-07 16:19:22 -04:00
#include "NetworkVersion.h"
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3209340 on 2016/11/23 by Ben.Marsh Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h. Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms. * Every header now includes everything it needs to compile. * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first. * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h. * Every .cpp file includes its matching .h file first. * This helps validate that each header is including everything it needs to compile. * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more. * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there. * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible. * No engine code explicitly includes a precompiled header any more. * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies. * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files. Tool used to generate this transform is at Engine\Source\Programs\IncludeTool. [CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
#include "HttpManager.h"
#include "Http.h"
bool FWinInetConnection::bStaticConnectionInitialized = false;
/**
* Translates an error returned from GetLastError returned from a WinInet API call.
*
* @param GetLastErrorResult - error code to translate
* @return string for the error code
*/
FString InternetTranslateError(::DWORD GetLastErrorResult)
{
FString ErrorStr = FString::Printf(TEXT("ErrorCode: %08X. "), (uint32)GetLastErrorResult);
HANDLE ProcessHeap = GetProcessHeap();
if (ProcessHeap == NULL)
{
ErrorStr += TEXT("Call to GetProcessHeap() failed, cannot translate error... ");
return ErrorStr;
}
TCHAR FormatBuffer[1024];
uint32 BaseLength = FormatMessageW(
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE,
GetModuleHandle(TEXT("wininet.dll")),
GetLastErrorResult,
0,
FormatBuffer,
ARRAYSIZE(FormatBuffer),
NULL);
if (!BaseLength)
{
ErrorStr += FString::Printf(TEXT("Call to FormatMessage() failed: %08X. "),
(uint32)GetLastError());
return ErrorStr;
}
ErrorStr += FString::Printf(TEXT("Desc: %s. "), FormatBuffer);
if (GetLastErrorResult == ERROR_INTERNET_EXTENDED_ERROR)
{
::DWORD InetError;
::DWORD ExtLength = 0;
InternetGetLastResponseInfo(&InetError, NULL, &ExtLength);
ExtLength = ExtLength+1;
TArray<TCHAR> ExtErrMsg;
ExtErrMsg.AddUninitialized(ExtLength);
if (!InternetGetLastResponseInfo(&InetError, ExtErrMsg.GetData(), &ExtLength))
{
ErrorStr += FString::Printf(TEXT("Call to InternetGetLastResponseInfo() failed: %08X. "),
(uint32) GetLastError());
return ErrorStr;
}
}
return ErrorStr;
}
// override for debug logging
#define DEBUG_LOG_HTTP(bIsDebug, Verbosity, Format, ...) \
if (bIsDebug) \
{ \
UE_LOG(LogHttp, Log, Format, ##__VA_ARGS__); \
} \
else \
{ \
UE_LOG(LogHttp, Verbosity, Format, ##__VA_ARGS__); \
}
/**
* Global callback for WinInet API. Will use the dwInternetStatus and dwContext
* fields to route the results back to the appropriate class instance if necessary.
*
* @param hInternet - See WinInet API
* @param dwContext - See WinInet API
* @param dwInternetStatus - See WinInet API
* @param lpvStatusInformation - See WinInet API
* @param dwStatusInformationLength - See WinInet API
*/
void CALLBACK InternetStatusCallbackWinInet(
HINTERNET hInternet, DWORD_PTR dwContext,
::DWORD dwInternetStatus, LPVOID lpvStatusInformation,
::DWORD dwStatusInformationLength)
{
FScopeLock ScopeLock(&FHttpManager::RequestLock);
// Ignore callbacks on module shutdown
if ( !FWinInetConnection::bStaticConnectionInitialized )
{
return;
}
check(FWinInetConnection::Get().GetHttpManager() != NULL);
uint32 Error = GetLastError();
if (Error != 0 &&
Error != ERROR_HTTP_HEADER_NOT_FOUND &&
Error != ERROR_IO_PENDING)
{
// Connection has been closed an any further processing is using an invalid handle
if (Error == ERROR_INVALID_HANDLE)
{
return;
}
}
// Original request/response that kicked off the connection attempt
FHttpResponseWinInet* Response = NULL;
FHttpRequestWinInet* Request = (FHttpRequestWinInet*)dwContext;
// Verify request is still valid
if (Request != NULL)
{
if (!FWinInetConnection::Get().GetHttpManager()->IsValidRequest(Request))
{
// Invalid since not in the active request list
Request = NULL;
UE_LOG(LogHttp, Warning, TEXT("InternetStatusCallbackWinInet: on invalid request %p. "), dwContext);
}
}
// Response is always valid while there is a request in flight
if (Request != NULL)
{
Response = Request->Response.Get();
}
bool bDebugLog = Request != NULL && Request->bDebugVerbose;
switch (dwInternetStatus)
{
case INTERNET_STATUS_PREFETCH:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("STATUS_PREFETCH: %p"), dwContext);
break;
case INTERNET_STATUS_USER_INPUT_REQUIRED:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("USER_INPUT_REQUIRED: %p"), dwContext);
break;
case INTERNET_STATUS_DETECTING_PROXY:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("DETECTING_PROXY: %p"), dwContext);
break;
case INTERNET_STATUS_CLOSING_CONNECTION:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("CLOSING_CONNECTION: %p"), dwContext);
break;
case INTERNET_STATUS_CONNECTED_TO_SERVER:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("CONNECTED_TO_SERVER: %p"), dwContext);
break;
case INTERNET_STATUS_CONNECTING_TO_SERVER:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("CONNECTING_TO_SERVER: %p"), dwContext);
break;
case INTERNET_STATUS_CONNECTION_CLOSED:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("CONNECTION_CLOSED: %p"), dwContext);
break;
case INTERNET_STATUS_HANDLE_CLOSING:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("HANDLE_CLOSING: %p"), dwContext);
break;
case INTERNET_STATUS_HANDLE_CREATED:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("HANDLE_CREATED: %p"), dwContext);
break;
case INTERNET_STATUS_INTERMEDIATE_RESPONSE:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("INTERMEDIATE_RESPONSE: %p"), dwContext);
break;
case INTERNET_STATUS_NAME_RESOLVED:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("NAME_RESOLVED: %p"), dwContext);
break;
case INTERNET_STATUS_RECEIVING_RESPONSE:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("RECEIVING_RESPONSE: %p"), dwContext);
Copying //UE4/Fortnite-Staging to //UE4/Main #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2806454 on 2015/12/16 by Bob.Tellez #UE4 Getting crash reporting working again on linux servers. Since -Unattended is now being passed BEFORE the target folder, the cmd line parsing code was failing so now it parses tokens and switches in a more general way. Also, diagnostics.txt had the incorrect case, since the d is supposed to be capitolized and the crash report processor is case sensitive. #rb Ben.Zeigler #codereview Dmitry.Rekman Change 2805502 on 2015/12/16 by Ben.Zeigler #UE4 Move ValidateEnumProperties into ValidateGeneratedClass, it was happening too early in the generation process so was being called at an invalid time. As a result of this ValidateEnumProperties will not be called correctly for compile on load blueprints, that issue is covered in UE-24569 #codereview mike.beach, bob.tellez Change 2805288 on 2015/12/16 by David.Nikdel #HTTP #HttpRetry - Add new Failed_ConnectionError code to EHttpRequestStatus to distinguish between connection errors and protocol errors. - Changed HTTP retry logic a little bit * If a response was received, retry on service-specific explicit HTTP codes (defaults to empty) * If a response was not received and we did not send a full request, automatically retry * If a response was not received and a request may have been sent, retry if the verb is GET or HEAD (should be idempotent) - Adjusted Curl/IOS/Mac/PS4/WinInet to try and distinguish Failed_ConnectionError where possible * Other systems will default to Failed which is ok (ConnectionError is an opportunistic categorization) * Opened a PS4 ticket to try to improve detection, but unfortunately there's no way (currently) to distinguish between send timeout, connection timeout, and receive timeout, the latter being the problematic case. - Removed the concept of global/default HTTP retry status codes. No system has enough knowledge to set those globally. * Individual requests still specify explicit "retryable" codes and McpServiceBase sets that on each request on a per-service basis #RB: Sam.Zamani #CodeReview: Sam.Zamani, Josh.Markiewicz, Alex.Fennell, Dmitry.Rekman, Sam.Spiro #Fixes: FORT-17804 Change 2803864 on 2015/12/15 by Bob.Tellez #UE4 Changed usage of !UE_SERVER to !IsRunningDedicatedServer in cases where we are preventing load attempts on UFonts. This is so running an editor build with -server works the same as running a cooked server. #rb Dmitry.Rekman #codereview Nick.Darnell Change 2803677 on 2015/12/15 by Billy.Bramer - Expose equality and inequality operators for gameplay attributes #rb Todd.Eckert Change 2802881 on 2015/12/14 by Bob.Tellez #UE4 InheritableComponentHandler no longer keeps records for components that we are no longer inheriting. #rb Phillip.Kavan, Maciej.Mroz #codereview Phillip.Kavan, Maciej.Mroz Change 2801636 on 2015/12/14 by Bob.Tellez #UE4 Returning package insert order for non-imports back to being after those of matching priorities unconditionally since this is what you want even when you are not using the asset registry to preload packages. #codereview Graeme.Thornton Change 2800400 on 2015/12/11 by Jonathan.Lindquist Submitting a new Pivot Painter Edition - now renders to textures - improved workflow - greater capabilities Change 2799579 on 2015/12/11 by John.Abercrombie [AUTOMERGE] Fixed EQS BP query wrappers getting GCed before wrapped query finishes #UE4 Fixes FORT-18649 - Patrols don't spawn consistently - The patrol blueprint was waiting (endlessly) for an EQS query to finish but because the wrapper could be GC-ed while the EQS query was running the delegate would never fire #rb me (this code was written by MieszkoZ) (removed code review for integration of Mieszko.Zielinski, Phil.Cole, Dominic.Barile) -------- Integrated using branch UE4-Fortnite-To-UE4-FortniteReleases/0.10 (reversed) of change#2799575 by John.Abercrombie on 2015/12/11 09:55:11. Change 2799018 on 2015/12/10 by Bob.Tellez #UE4 The asset registry tags stripped from cooked builds is now a blacklist by default that includes only the FiB tag. You can opt-in to using the whitelist by flipping the bUseAssetRegistryTagsWhitelistInsteadOfBlacklist flag. #rb Fred.Kimberley #codereview Peter.Knepley Change 2798926 on 2015/12/10 by Bob.Tellez #UE4 Removed some showflags from the list of "Fixed" showflags since they were actually in use at runtime in Fortnite in a scene capture. #jira FORT-18514 #codereview Martin.Mittring Change 2797758 on 2015/12/10 by Mark.Satterthwaite Defer calls to AUGraphUpdate into FCoreAudioDevice::UpdateHardware - this call will synchronise the calling thread with the CoreAudio thread/run-loop so that the CoreAudio graph is safe to modify and this may incur a significant stall. This means it is far more efficient to amortise the cost of all changes to the graph with a single call. To ensure correctness the audio format conversion components are cached and disposed of after the call to AUGraphUpdate so that any existing operations on the CoreAudio thread are completed prior to disposal. Change 2781204 on 2015/11/25 by Dmitry.Rekman Linux: use jemalloc by default if available. - Alleviates one of the reasons for player disconnect (FORT-18048), which was machines running OOM. #rb Bob.Tellez #codereview Bob.Tellez, Ben.Zeigler Change 2779398 on 2015/11/24 by Mark.Satterthwaite Switch the default graphics API on Mac back to OpenGL, but allow Metal to run with -metal (or -metalsm5 for experimental SM5 support).
2016-01-08 19:10:43 -05:00
if (Response != NULL)
{
// if we receive a response, we sent the request (and it's no longer safe to retry)
FPlatformAtomics::InterlockedExchange(&Response->bRequestSent, 1);
}
break;
case INTERNET_STATUS_RESPONSE_RECEIVED:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("RESPONSE_RECEIVED (%d bytes): %p"), *(uint32*)lpvStatusInformation, dwContext);
break;
case INTERNET_STATUS_REDIRECT:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("STATUS_REDIRECT: %p"), dwContext);
break;
case INTERNET_STATUS_REQUEST_COMPLETE:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("REQUEST_COMPLETE: %p"), dwContext);
if (lpvStatusInformation != NULL)
{
const INTERNET_ASYNC_RESULT* AsyncResult = (const INTERNET_ASYNC_RESULT*)lpvStatusInformation;
// callback failed so can't process response
if (AsyncResult->dwResult == 0)
{
DEBUG_LOG_HTTP(bDebugLog, Log, TEXT("InternetStatusCallbackWinInet request=%p AsyncResult.dwError: %08X. "),
dwContext, AsyncResult->dwError, *InternetTranslateError(AsyncResult->dwError));
if (Response != NULL)
{
// Done processing response due to error
FPlatformAtomics::InterlockedExchange(&Response->bIsReady, 1);
}
Response = NULL;
}
}
if (Request != NULL && Request->GetStatus() == EHttpRequestStatus::Processing &&
Response != NULL && !Response->bIsReady)
{
Response->ProcessResponse();
}
break;
case INTERNET_STATUS_REQUEST_SENT:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("REQUEST_SENT: %p"), dwContext);
break;
case INTERNET_STATUS_RESOLVING_NAME:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("RESOLVING_NAME: %p"), dwContext);
break;
case INTERNET_STATUS_SENDING_REQUEST:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("SENDING_REQUEST: %p"), dwContext);
Copying //UE4/Fortnite-Staging to //UE4/Main #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2806454 on 2015/12/16 by Bob.Tellez #UE4 Getting crash reporting working again on linux servers. Since -Unattended is now being passed BEFORE the target folder, the cmd line parsing code was failing so now it parses tokens and switches in a more general way. Also, diagnostics.txt had the incorrect case, since the d is supposed to be capitolized and the crash report processor is case sensitive. #rb Ben.Zeigler #codereview Dmitry.Rekman Change 2805502 on 2015/12/16 by Ben.Zeigler #UE4 Move ValidateEnumProperties into ValidateGeneratedClass, it was happening too early in the generation process so was being called at an invalid time. As a result of this ValidateEnumProperties will not be called correctly for compile on load blueprints, that issue is covered in UE-24569 #codereview mike.beach, bob.tellez Change 2805288 on 2015/12/16 by David.Nikdel #HTTP #HttpRetry - Add new Failed_ConnectionError code to EHttpRequestStatus to distinguish between connection errors and protocol errors. - Changed HTTP retry logic a little bit * If a response was received, retry on service-specific explicit HTTP codes (defaults to empty) * If a response was not received and we did not send a full request, automatically retry * If a response was not received and a request may have been sent, retry if the verb is GET or HEAD (should be idempotent) - Adjusted Curl/IOS/Mac/PS4/WinInet to try and distinguish Failed_ConnectionError where possible * Other systems will default to Failed which is ok (ConnectionError is an opportunistic categorization) * Opened a PS4 ticket to try to improve detection, but unfortunately there's no way (currently) to distinguish between send timeout, connection timeout, and receive timeout, the latter being the problematic case. - Removed the concept of global/default HTTP retry status codes. No system has enough knowledge to set those globally. * Individual requests still specify explicit "retryable" codes and McpServiceBase sets that on each request on a per-service basis #RB: Sam.Zamani #CodeReview: Sam.Zamani, Josh.Markiewicz, Alex.Fennell, Dmitry.Rekman, Sam.Spiro #Fixes: FORT-17804 Change 2803864 on 2015/12/15 by Bob.Tellez #UE4 Changed usage of !UE_SERVER to !IsRunningDedicatedServer in cases where we are preventing load attempts on UFonts. This is so running an editor build with -server works the same as running a cooked server. #rb Dmitry.Rekman #codereview Nick.Darnell Change 2803677 on 2015/12/15 by Billy.Bramer - Expose equality and inequality operators for gameplay attributes #rb Todd.Eckert Change 2802881 on 2015/12/14 by Bob.Tellez #UE4 InheritableComponentHandler no longer keeps records for components that we are no longer inheriting. #rb Phillip.Kavan, Maciej.Mroz #codereview Phillip.Kavan, Maciej.Mroz Change 2801636 on 2015/12/14 by Bob.Tellez #UE4 Returning package insert order for non-imports back to being after those of matching priorities unconditionally since this is what you want even when you are not using the asset registry to preload packages. #codereview Graeme.Thornton Change 2800400 on 2015/12/11 by Jonathan.Lindquist Submitting a new Pivot Painter Edition - now renders to textures - improved workflow - greater capabilities Change 2799579 on 2015/12/11 by John.Abercrombie [AUTOMERGE] Fixed EQS BP query wrappers getting GCed before wrapped query finishes #UE4 Fixes FORT-18649 - Patrols don't spawn consistently - The patrol blueprint was waiting (endlessly) for an EQS query to finish but because the wrapper could be GC-ed while the EQS query was running the delegate would never fire #rb me (this code was written by MieszkoZ) (removed code review for integration of Mieszko.Zielinski, Phil.Cole, Dominic.Barile) -------- Integrated using branch UE4-Fortnite-To-UE4-FortniteReleases/0.10 (reversed) of change#2799575 by John.Abercrombie on 2015/12/11 09:55:11. Change 2799018 on 2015/12/10 by Bob.Tellez #UE4 The asset registry tags stripped from cooked builds is now a blacklist by default that includes only the FiB tag. You can opt-in to using the whitelist by flipping the bUseAssetRegistryTagsWhitelistInsteadOfBlacklist flag. #rb Fred.Kimberley #codereview Peter.Knepley Change 2798926 on 2015/12/10 by Bob.Tellez #UE4 Removed some showflags from the list of "Fixed" showflags since they were actually in use at runtime in Fortnite in a scene capture. #jira FORT-18514 #codereview Martin.Mittring Change 2797758 on 2015/12/10 by Mark.Satterthwaite Defer calls to AUGraphUpdate into FCoreAudioDevice::UpdateHardware - this call will synchronise the calling thread with the CoreAudio thread/run-loop so that the CoreAudio graph is safe to modify and this may incur a significant stall. This means it is far more efficient to amortise the cost of all changes to the graph with a single call. To ensure correctness the audio format conversion components are cached and disposed of after the call to AUGraphUpdate so that any existing operations on the CoreAudio thread are completed prior to disposal. Change 2781204 on 2015/11/25 by Dmitry.Rekman Linux: use jemalloc by default if available. - Alleviates one of the reasons for player disconnect (FORT-18048), which was machines running OOM. #rb Bob.Tellez #codereview Bob.Tellez, Ben.Zeigler Change 2779398 on 2015/11/24 by Mark.Satterthwaite Switch the default graphics API on Mac back to OpenGL, but allow Metal to run with -metal (or -metalsm5 for experimental SM5 support).
2016-01-08 19:10:43 -05:00
if (Response != NULL)
{
// mark that we have started sending the request (at this point it's no longer safe to retry)
FPlatformAtomics::InterlockedExchange(&Response->bRequestSent, 1);
}
break;
case INTERNET_STATUS_STATE_CHANGE:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("STATE_CHANGE: %p"), dwContext);
break;
case INTERNET_STATUS_COOKIE_SENT:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("COOKIE_SENT: %p"), dwContext);
break;
case INTERNET_STATUS_COOKIE_RECEIVED:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("COOKIE_RECEIVED: %p"), dwContext);
break;
case INTERNET_STATUS_PRIVACY_IMPACTED:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("PRIVACY_IMPACTED: %p"), dwContext);
break;
case INTERNET_STATUS_P3P_HEADER:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("P3P_HEADER: %p"), dwContext);
break;
case INTERNET_STATUS_P3P_POLICYREF:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("P3P_POLICYREF: %p"), dwContext);
break;
case INTERNET_STATUS_COOKIE_HISTORY:
{
const InternetCookieHistory* CookieHistory = (const InternetCookieHistory*)lpvStatusInformation;
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("COOKIE_HISTORY: %p. Accepted: %u. Leashed: %u. Downgraded: %u. Rejected: %u.")
, dwContext
, CookieHistory->fAccepted
, CookieHistory->fLeashed
, CookieHistory->fDowngraded
, CookieHistory->fRejected);
}
break;
default:
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("Unknown Status: %u. %p"), (uint32)dwInternetStatus, dwContext);
break;
}
}
bool FWinInetConnection::InitConnection()
{
// Make sure previous connection is closed
ShutdownConnection();
UE_LOG(LogHttp, Log, TEXT("Initializing WinInet connection"));
// Check and log the connected state so we can report early errors.
::DWORD ConnectedFlags;
BOOL bConnected = InternetGetConnectedState(&ConnectedFlags, 0);
FString ConnectionType;
ConnectionType += (ConnectedFlags & INTERNET_CONNECTION_CONFIGURED) ? TEXT("Configured ") : TEXT("");
ConnectionType += (ConnectedFlags & INTERNET_CONNECTION_LAN) ? TEXT("LAN ") : TEXT("");
ConnectionType += (ConnectedFlags & INTERNET_CONNECTION_MODEM) ? TEXT("Modem ") : TEXT("");
ConnectionType += (ConnectedFlags & INTERNET_CONNECTION_MODEM_BUSY) ? TEXT("Modem Busy ") : TEXT("");
ConnectionType += (ConnectedFlags & INTERNET_CONNECTION_OFFLINE) ? TEXT("Offline ") : TEXT("");
ConnectionType += (ConnectedFlags & INTERNET_CONNECTION_PROXY) ? TEXT("Proxy Server ") : TEXT("");
ConnectionType += (ConnectedFlags & INTERNET_RAS_INSTALLED) ? TEXT("RAS Installed ") : TEXT("");
UE_LOG(LogHttp, Log, TEXT("Connected State: %s. Flags: (%s)"),
bConnected ? TEXT("Good") : TEXT("Bad"), *ConnectionType);
// max simultaneous connections allowed by wininet
::DWORD MaxServerConnections = FHttpModule::Get().GetHttpMaxConnectionsPerServer();
InternetSetOption(NULL, INTERNET_OPTION_MAX_CONNS_PER_SERVER, (LPVOID)&MaxServerConnections, sizeof(::DWORD));
InternetSetOption(NULL, INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER, (LPVOID)&MaxServerConnections, sizeof(::DWORD));
if (InternetAttemptConnect(0) != ERROR_SUCCESS)
{
UE_LOG(LogHttp, Warning, TEXT("InternetAttemptConnect failed: %s\n"),
*InternetTranslateError(GetLastError()));
return false;
}
// setup net connection
InternetHandle = InternetOpen(
Copying //UE4/Dev-Networking to //UE4/Main (Source: //UE4/Dev-Networking @3004032 ) ========================== MAJOR FEATURES + CHANGES ========================== Change 2939164 on 2016/04/10 by John.Barrett Updated base UNetConnection netcode to be bit-based, rather than byte-based (to optimize packet size with PacketHandler's and Oodle) - this CL is interdependent with subsequent CL's. Fixed an issue with FBitReader, when inserting a non-byte-aligned number of bits, where it would fail to zero the unused bits, in the last byte - this led to corrupt reads, in the new termination bit code (subsequent CL). Added better overflow detection for FBitWriter - plus other additional asserts. Fixed a potential bug with control channel messages, where non-byte-aligned control channel messages that were queued for later sending, were stored as byte-aligned, causing bad (too large) data to be sent. Optimized MAX_PACKET_HEADER_BITS to save a bit. Change 2939169 on 2016/04/10 by John.Barrett NetcodeUnitTest maintenance. Added unit test for testing bit reader/writer limits. Added 'LogHex' debug command, for logging a hex-editor-style dump of selected memory data - without requiring a dependency on NetcodeUnitTest. Change 2939170 on 2016/04/10 by John.Barrett Added work-in-progress DoS/DDoS unit test. Change 2943718 on 2016/04/14 by John.Pollard Allow override of replay session ID + start using match ID for replays Change 2944678 on 2016/04/14 by Ryan.Gerleve Merging using Release-4.11_to_Dev-Networking: 4.11 hotfix change: fix for an assert that can occur when network clients call AActor::SetReplicates. SetReplicates will now only modify RemoteRole if Role is Authority and warn otherwise. #jira UE-27646 Change 2946909 on 2016/04/18 by John.Pollard Misc seamless travel cleanup + sanity checks * Cleanup the naming of variables and logic used to pick which actors will transfer to new world during seamless travel to more explicitly convey intent * Warn when there is no context for a world when destroying actors, it's likely that this world is the floating world during seamless travel, and if we hit this case, something is likely in a bad state Change 2948883 on 2016/04/19 by John.Pollard GitHub request: https://jira.ol.epicgames.net/browse/UE-29385 Change 2952109 on 2016/04/21 by John.Barrett Fixed false positive with FBitWriter overflow error log, in PackageMap code. Change 2953639 on 2016/04/22 by John.Barrett Fixed shadowed local variable - UE-29829 Change 2958267 on 2016/04/27 by John.Pollard Make vision manager more resilient to bad network data from old replays Change 2958410 on 2016/04/27 by John.Pollard Fix incorrect warning when ReceivedBunch fails for replays Change 2958411 on 2016/04/27 by John.Pollard Replay backwards compatibility fixes. * Mark custom properties/RPC's as incompatible if there was an error reading them in the stream, and ignore from there on out. * Don't close connection when failing to read properties on clients now that we can skip over this info easily. Change 2960134 on 2016/04/28 by Ryan.Gerleve Protect against adding null player controllers to the out list of UEngine::GetAllLocalPlayerControllers. See https://udn.unrealengine.com/questions/289948/uenginegetalllocalplayercontrollers-pushes-a-null.html Change 2960617 on 2016/04/29 by John.Barrett Made way for engine version code refactor. Change 2961050 on 2016/04/29 by John.Pollard Log when we send hello to server in pending net game Change 2961468 on 2016/04/29 by John.Pollard ReplayCompat: Show name of incompatible property when logging + log when we don't read correct number of bits + cleanup Change 2964357 on 2016/05/03 by John.Barrett Optimized netcode SerializeInt\WriteIntWrapped, to allow compile-time calculation of the data bit size. The runtime calculated version of these functions, has been adjusted to not assert on 1-bit sized writes - to fix a false positive in Paragon. Adjusted some FMath functions, to allow CONSTEXPR for compile-time calculation. Change 2964361 on 2016/05/03 by John.Barrett Update unit test to work with new integer serialization code. Change 2964831 on 2016/05/03 by John.Barrett Back out net serialization changes for now. Change 2964832 on 2016/05/03 by John.Barrett Back out unit test net serialization change. Change 2964838 on 2016/05/03 by John.Barrett Fix Paragon false positive netcode assert. Change 2966257 on 2016/05/04 by John.Pollard Unify network version logic + move to core * Move network version logic to core * Formalized concept of compatible network/replay changelist * Fixed up UDemoNetDriver to work with new version concepts * Fixed up Orion/other samples in the same way * This is first step to officially supporting backwards compatility for replays, and possibly networking in general (would be opt-in if so) Change 2966657 on 2016/05/04 by John.Pollard Deprecate GEngineNetVersion, GEngineMinNetVersion and GEngineNegotiationVersion Change 2968945 on 2016/05/06 by John.Pollard Print name of object that has NULL level Change 2970529 on 2016/05/09 by Bart.Bressler Add an optional "CapturePercentage" command line parameter that has a percentage chance of generating capture files per connection Change 2971233 on 2016/05/09 by Bart.Bressler Update Oodle DLLs in Orion Change 2975585 on 2016/05/12 by Bart.Bressler - Keep track of STAT_NumNetActors on clients as well as servers - Change STAT_NumActors to just be the world actor count instead of using FActorIterator (FActorIterator was causing a hitch) Change 2979207 on 2016/05/16 by Bart.Bressler Remove FActorIterator loop around world actor count retrieval in UNetDriver::TickFlush Change 2981198 on 2016/05/17 by John.Pollard Changes to support FN replays * Save streaming levels within network stream * Don't load streaming level if it's already in the list * Remove need for meta data Change 2981201 on 2016/05/17 by John.Pollard Forgot to check in Change 2982075 on 2016/05/18 by John.Pollard Cache network checksum so we don't spam log (we call this function more now) Change 2982092 on 2016/05/18 by John.Pollard Lower verbosity of log Change 2986571 on 2016/05/23 by Bart.Bressler Fix issue where oodle wasn't getting enabled in shipping correctly Change 2988628 on 2016/05/24 by Bart.Bressler When processing captures with the Oodle commandlet, only check files that end with "ucap" (there might be gzipped files that have the exact same filenames, for example) Change 2988838 on 2016/05/24 by Bart.Bressler - Add script to pull down captures from S3 - Add script to do the whole process from pulling down captures to generating dictionaries Change 2994575 on 2016/05/31 by John.Pollard Include networkversion.h in UnrealNetwork.h, this is so that older code will continue to compile that relied on network version code that used to be in this file Change 2996026 on 2016/06/01 by John.Pollard Add network version to FArchive Change 2996043 on 2016/06/01 by John.Pollard Store network version on NetConnection/Bunch, replays properly initialize these to current replay network versions Change 2996081 on 2016/06/01 by John.Pollard Remove unused FInBunch constructor Change 2996544 on 2016/06/01 by John.Pollard Make sure network version is correct for external data + set on connection after checkpoint Change 2996731 on 2016/06/01 by John.Pollard Set game network version for Orion Change 2997042 on 2016/06/01 by John.Pollard Fix issue when game server times out, and replay service turns off live replay flag, and we fail to download last chunk + more log info when replay http chunk downloading fails Change 2997908 on 2016/06/02 by Ryan.Gerleve Use the smoothed mesh transform for characters when recording client replays. Since the root component's transform may only be updated periodically, this greatly improves the quality of character movement. Change 2998001 on 2016/06/02 by Ryan.Gerleve Set the NetDriverName in the replay spectator's constructor. The replay spectator will always be associated with a DemoNetDriver and this fixes cases where GetNetMode could return the wrong value before the net driver name was set (such as during BeginPlay). Also inverted the logic in IsForPlayback() to make it more intuitive. Change 2998636 on 2016/06/02 by John.Pollard If we don't have enough external replay samples, use the best one Change 2998637 on 2016/06/02 by John.Pollard Clamp replay time Change 2998705 on 2016/06/02 by John.Pollard Replay fixes: * Fix issue when scrubbing to time 0, and first chunk takes longer than normal to download * Better streaming logic that works better with new backend delay logic * Better handling when replay flips from live to not live * Don't update StreamTimeRangeStart/End unless we got those values in the header response * Handle when we fail to download a chunk and HighPriorityEndTime is active Change 2998832 on 2016/06/02 by Ryan.Gerleve Fix an issue that could cause the replay spectator controller to not get the notification that the spectator class has been received while recording a client replay. Change 2999054 on 2016/06/02 by Ryan.Gerleve Added ability to set a maximum desired time budget for replay recording. Once the budget is reached, remaining actors will have to wait until the next frame to try to replicate. Change 2999057 on 2016/06/02 by Ryan.Gerleve Fixed an issue that could cause the main game world to use the incorrect vision manager when deathcam was enabled and the replay recording time budget was set very aggressively. In this case, AOrionVisionManager2::PostInitializeComponents would be called before the spectator player controller was spawned in the playback world, causing it to fail to find the local player and not initializing GKillcamVisionManager correctly. Change 2999749 on 2016/06/03 by Ryan.Gerleve RPCs will now be recorded in client replays. Cleaned up actor role swapping logic for client recording and re-use it for RPCs. Change 3000051 on 2016/06/03 by Ryan.Gerleve Fix Paragon server crash. #jira UE-31618 Change 3001361 on 2016/06/05 by Ryan.Gerleve Added support for prioritizing actors during replay recording to get better results when a maximum desired recording time is set. Added virtual function GetReplayPriority to Actor, similar to GetNetPriority, but allows different priorities for live networking and replays. Moved FCompareFActorPriority to a header so that the DemoNetDriver can use it. Change 3001365 on 2016/06/05 by Ryan.Gerleve Paragon now uses a desired recording time limit and enables actor prioritization for recording the deathcam replay. Change 3002094 on 2016/06/06 by Ryan.Gerleve Missed file from a main merge fixup. Change 3002417 on 2016/06/06 by Ryan.Gerleve Disabling a check to work around UE-31636 for now. Change 3002547 on 2016/06/06 by John.Barrett Added improved 'DebugDump' command option to the Oodle trainer commandlet - this takes UE4 .ucap capture files, and batch converts them into Oodle-example-code compatible .bin files. Use through the new BatchDebugDump.bat file. Change 3002989 on 2016/06/06 by John.Pollard Add ability to skip missing/changed properties in FFastArraySerializer Change 3003072 on 2016/06/06 by John.Pollard Fix crash related to new replay backwards compatibility changes #lockdown Nick.Penwarden [CL 3004618 by John Pollard in Main branch]
2016-06-07 16:19:22 -04:00
*FString::Printf(TEXT("game=%s, engine=UE4, version=%u"), FApp::GetGameName(), FNetworkVersion::GetNetworkCompatibleChangelist()),
INTERNET_OPEN_TYPE_PRECONFIG,
NULL,
NULL,
INTERNET_FLAG_ASYNC);
if (InternetHandle == NULL)
{
UE_LOG(LogHttp, Warning, TEXT("Failed WinHttpOpen: %s"),
*InternetTranslateError(GetLastError()));
return false;
}
{
FScopeLock ScopeLock(&FHttpManager::RequestLock);
bStaticConnectionInitialized = true;
}
// Register callback to update based on WinInet connection state
InternetSetStatusCallback(InternetHandle, &InternetStatusCallbackWinInet);
return true;
}
bool FWinInetConnection::ShutdownConnection()
{
UE_LOG(LogHttp, Log, TEXT("Closing internet connection"));
{
FScopeLock ScopeLock(&FHttpManager::RequestLock);
bStaticConnectionInitialized = false;
if (InternetHandle != NULL)
{
// Clear the callback if still set
InternetSetStatusCallback(InternetHandle, NULL);
// shut down WinINet
if (!InternetCloseHandle(InternetHandle))
{
UE_LOG(LogHttp, Warning, TEXT("InternetCloseHandle failed on the FHttpRequestWinInet: %s"),
*InternetTranslateError(GetLastError()));
return false;
}
InternetHandle = NULL;
}
}
return true;
}
// FHttpRequestWinInet
FHttpRequestWinInet::FHttpRequestWinInet()
: CompletionStatus(EHttpRequestStatus::NotStarted)
, ConnectionHandle(NULL)
, RequestHandle(NULL)
, ElapsedTimeSinceLastServerResponse(0)
, ProgressBytesSent(0)
, StartRequestTime(0)
, ElapsedTime(0.0f)
, bDebugVerbose(false)
{
}
FHttpRequestWinInet::~FHttpRequestWinInet()
{
UE_LOG(LogHttp, Verbose, TEXT("Destroying FHttpRequestWinInet %p %p"), this, RequestHandle);
CleanupRequest();
}
FString FHttpRequestWinInet::GetURL()
{
return RequestURL.GetURL();
}
FString FHttpRequestWinInet::GetURLParameter(const FString& ParameterName)
{
const FString* Result = RequestURL.GetParameter(ParameterName);
return Result != NULL ? *Result : FString();
}
FString FHttpRequestWinInet::GetHeader(const FString& HeaderName)
{
FString* Header = RequestHeaders.Find(HeaderName);
return Header != NULL ? *Header : TEXT("");
}
TArray<FString> FHttpRequestWinInet::GetAllHeaders()
{
TArray<FString> Result;
for (TMap<FString, FString>::TConstIterator It(RequestHeaders); It; ++It)
{
Result.Add(It.Key() + TEXT(": ") + It.Value());
}
return Result;
}
FString FHttpRequestWinInet::GetContentType()
{
return GetHeader(TEXT("Content-Type"));
}
int32 FHttpRequestWinInet::GetContentLength()
{
return RequestPayload.Num();
}
const TArray<BYTE>& FHttpRequestWinInet::GetContent()
{
return RequestPayload;
}
FString FHttpRequestWinInet::GetVerb()
{
return RequestVerb;
}
void FHttpRequestWinInet::SetVerb(const FString& Verb)
{
RequestVerb = Verb;
}
void FHttpRequestWinInet::SetURL(const FString& URL)
{
RequestURL = FURLWinInet(URL);
}
void FHttpRequestWinInet::SetContent(const TArray<uint8>& ContentPayload)
{
RequestPayload = ContentPayload;
}
void FHttpRequestWinInet::SetContentAsString(const FString& ContentString)
{
FTCHARToUTF8 Converter(*ContentString);
RequestPayload.SetNumUninitialized(Converter.Length());
FMemory::Memcpy(RequestPayload.GetData(), (const uint8*)Converter.Get(), RequestPayload.Num());
}
void FHttpRequestWinInet::SetHeader(const FString& HeaderName, const FString& HeaderValue)
{
Copying //UE4/Fortnite-Staging to //UE4/Dev-Main (Source: //UE4/Fortnite-Staging @ 3026859) #rb none #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3016173 on 2016/06/16 by Lukasz.Furman fixed path updates in nested move tasks #jira FORT-25742 Change 3015722 on 2016/06/15 by Bob.Tellez #UE4 Avoiding a crash in FOnlinePartySystemMcp::PublishPartyInfoToPresence #JIRA OR-14102 Change 3015626 on 2016/06/15 by Bob.Tellez #UE4 Experimental fix for hitches involving spinlocks in windows. #JIRA FORT-25253 Change 3015473 on 2016/06/15 by Bob.Tellez #UE4 Compiling CrashReportClient in VS2013 instead of 2015 until we can figure out the appropriate way to install the redist on end-user machines. #JIRA FORT-25748 Change 3014721 on 2016/06/15 by Bob.Tellez #UE4 Returning false in cases where we want to skip replication of GameplayAbilities structures in NetDeltaSerialize. This fixes a bug where actors trying to become net dormant were not allowed because they were continuously reporting that they had data to replicate. #JIRA FORT-25689 Change 3014323 on 2016/06/15 by Rob.Cannaday When kicked from lobby beacon, restore the persistent party after leaving the previous persistent party #jira FORT-25407 #tests front end parties, being kicked from outpost lobby Change 3013712 on 2016/06/14 by Bob.Tellez #UE4 Fix DrawNetDriverDebug crash during map transitions Change 3013418 on 2016/06/14 by Mark.Satterthwaite Don't release Metal buffers directly into the buffer pool, instead defer this until the command-buffer is known to have finished. This prevents the CPU from trying to modify the buffer while the GPU is still reading it if the GPU has fallen so far behind the CPU and therefore eliminates one possible cause of invalid access on the GPU. #jira FORT-24510 Change 3013394 on 2016/06/14 by Mark.Satterthwaite Report Metal command-buffer failures in MetalQuery in the same way as MetalCommandList and make them fatal as well. This ensures that the game doesn't try to continue if the commands failed as that is unsafe. #jira FORT-24808 Change 3012977 on 2016/06/14 by Fred.Kimberley Add a blueprint exposed function to evaluate an attribute from a given base value. Change 3012755 on 2016/06/14 by Bob.Tellez #UE4 ExclusiveInternalFlags is now respected when passing in a null ObjectPackage in StaticFindObjectFastInternalThreadSafe #JIRA FORT-113 Change 3011948 on 2016/06/13 by Mark.Satterthwaite Workaround a Fortnite crash on launch for Mac OpenGL - one or more shaders are using the bit-cast operators (asuint(), asfloat()) that aren't available with GLSL version 150. In order to use them the GLSL version must be 330 which means switching the version tag at runtime. There will be Mac GPUs on 10.10.5 which don't correctly implement these instructions so this really isn't a fix - that would be to change shaders to not use SM5-level instructions. Change 3011659 on 2016/06/13 by Bob.Tellez #UE4 Better handling of checked state in SGameplayTagWidget::IsTagChecked. Checking direct child tags was not sufficient and also not needed since HasTag allows you to follow parent tags when checking for an explicit tag. Change 3011647 on 2016/06/13 by Rob.Cannaday Fix for multiple account login not kicking previous logins Client was not parsing response from backend. Client was expecting content-type to be "application/json" (using FString::Equals). Backend was returning "application/json;charset=UTF-8". Changed usage from FString::Equals to FString::StartsWith #jira FORT-25452 #tests multiple account login, frontend only Change 3011436 on 2016/06/13 by Nick.Cooper #UE4 - Added bRelativeToInitialFOV option to UCameraAnim, defaulting to true. If turned off, camera anims will use the camera's current FOV as the initial FOV for the animation #jira FORT-23606 Change 3010411 on 2016/06/12 by Bob.Tellez #UE4 Fix for a possible case where a reference to an async loading package that would contain a level gets replicated before the level it contains is fully serialized, causing network loading code client side to attempt to load the package even though it is not allowed to load maps. #jira FORT-113, FORT-22222 Change 3009885 on 2016/06/10 by Billy.Bramer #jira FORT-25361 [FORT-25361] Health and shield values are incorrect when slotting survivors with bonuses - Fix some resultant bugs from swapping attributes to be struct-based: - Fix issue wherein the initial creation of the client-side aggregator could be initialized with the computed final value from the server, resulting in incorrect client-side math - Fix issue where subsequent changes to the aggregator's base value on the client would be lost Change 3009514 on 2016/06/10 by Bob.Tellez #UE4 Remove final usage of the task graph in WmfMediaPlayer to dodge shutdown crashes. Change 3009197 on 2016/06/10 by Michael.Trepka Disabled reverb on Mac again. It's too expensive and doesn't fix FORT-22090 anyway Change 3008392 on 2016/06/09 by Ben.Zeigler #jira FORT-25244 Change it so application error codes like 400/404 do not cause the mcp to think it is disconnected from the backend. Only 408, 501, 502, and 504 now result in ServiceUnavailable. Change 3008106 on 2016/06/09 by Lukasz.Furman fixed cutting corners near navmesh obstacles in detour crowd's string pulling #jira FORT-24981 Change 3008039 on 2016/06/09 by Bob.Tellez #UE4 Fixed conversion of TAssetPtr to UObject* properties for the case where the referenced object is not already loaded. Change 3007864 on 2016/06/09 by Fred.Kimberley Updates to supporting attributes as structs. Adding functionality that makes them easier to use and override in projects. Change 3007682 on 2016/06/09 by Michael.Trepka Re-enabled reverb on Mac Change 3006971 on 2016/06/08 by Saul.Abreu #fortnite #jira FORT-25169 Added node costs types, cost amounts, and remaining balance for each cost type to the NodePurchase analytics event. Change 3006933 on 2016/06/08 by Chris.Gagnon Fixed up all the Power levle widget use cases. #Jira FORT-23472, FORT-24132, FORT-24144, FORT-24952, FORT-24924 Change 3006633 on 2016/06/08 by Dmitry.Rekman Linux: propagate ensure message to the CR (FORT-23030). - Without this, ensure() has a generic "SIGTRAP" error message, which is misleading for QA. #tests Tried "debug ensure" a few times, observed crash report (on the website) with the proper message #jira FORT-23030 Change 3006036 on 2016/06/08 by Rob.Cannaday Remove warning about missing "recentplayers" field. The absence of the field is gracefully handled in the client and is only absent if the list is absent on the server. #jira FORT-18687 Change 3005216 on 2016/06/07 by Bob.Tellez #UE4 Avoiding layout invalidation if you use SetEnabled to set an identical enabled state. This is the same as how SetVisibility works. Change 3004857 on 2016/06/07 by Rob.Cannaday Fix for incorrect reason displayed for inability to join party #jira FORT-13517 Change 3004811 on 2016/06/07 by Michael.Trepka Increased the number of input buses for CoreAudio 3D Mixer to support 64 audio channels. Also, added a warning to FAudioDevice::StartSources so it doesn't silently ignore sound source initialization failures. Change 3004553 on 2016/06/07 by Lukasz.Furman fixed AnySpawners activating before navmesh unlock & rebuild #jira FORT-25067 Change 3004083 on 2016/06/07 by Bob.Tellez #UE4 Fixing GenerateApplicationPath for monolithic games. Change 3003457 on 2016/06/06 by Bob.Tellez #UE4 Add a little info to a warning about failing to load a file for streaming. Change 3003256 on 2016/06/06 by Bob.Tellez #UE4 Fixed a bug where not having a crash report would cause CrashReportClient not not properly exit on Mac Change 3003146 on 2016/06/06 by jonathan.lindquist switching from a ceil and lerp technique to an if statement to provide better transform results. Change 3002048 on 2016/06/06 by Daniel.Broder Support for setting Scalar and Vector Materials by Index rather than by name on MIDs. This feature allows much better performance in cases where large numbers of parameters are being set per frame and where the indices can be cached by the calling code in an initialization step. #RB Stephan.Delmer #CodeReview Bob.Tellez #UE4 #ReleaseNote Change 3001315 on 2016/06/05 by Daniel.Broder Fixed crash that could occur when the FPhysScene* was null (the world has no PhysicsScene) in USkeletalMeshComponent::TermArticulated(). That could happen when loading a world without fully instantiating it, such as when right-clicking a world in the context browser rather than opening the world directly. #RB Stephan.Delmer Ori, I wasn't sure if the whole line (and the line below it using PScene) should be moved within the if (PhysScene) block or not, but this change seems to fix it. If they can safely be moved, that would be presumably more efficeint though (since we'd only compare vs. nullptr once). #CodeReview Ori.Cohen #UE4 #Fortnite #BugFix Change 3001001 on 2016/06/04 by Fred.Kimberley Added meta data about attributes and a post serialize function so we can recover attributes that have changed their type. Adding Fortnite specific attribute type specialization. This type enforces minimum and maximum values for attributes. Change 3000613 on 2016/06/03 by Sam.Spiro #fort online 24747 Take change from SamZ to get connection change delegates firing correctly Add a delegate to the frontend player controller to logout if the connection goes bad (when all retries have failed) #RB Ben.Zeigler Change 3000482 on 2016/06/03 by Rob.Cannaday Fix problem where newly added friends don't recognize party invitations #jira FORT-19415 From CL 2953432: Ignore presence updates for local user with different resources #jira OR-19929 #tests front end party invites Change 2998044 on 2016/06/02 by Lukasz.Furman fixed path box intersection test used to verify if hotspot is still required for updated path #jira FORT-24422 Change 2997948 on 2016/06/02 by Eric.Newman Moved ProdCom to bottom of file w/ deprecation comment, and clarified deprecation criteria. Will probably need to be removed in //UE4 first and check for any fallout from EC jobs failing Change 2997660 on 2016/06/02 by Chris.Wood Changed Linux server crash handler to force CRC log paths to match main engine log. [UE-30259] - Some server crashes are missing from crashreporter database Should allow us to have CRC logs uploaded to S3 along with main logs easily. Change 2996702 on 2016/06/01 by Bob.Tellez #UE4 You can now use Edit Asset on Level assets in the reference viewer. Change 2996683 on 2016/06/01 by Tim.Tillotson #fortnite Fix analytics comments, changed a few NULL to nullptr, and removed stale code. #JIRA FORT-23833 Change 2996548 on 2016/06/01 by Bob.Tellez #Fortnite Fixing up or deleting remaining references to homebase buildings. HBOnboarding_BuildHeroBuilding is the last reference now and it will be removed soon. Change 2996322 on 2016/06/01 by Bob.Tellez #UE4 Fix for specifying more than one ini override on the command line Change 2996306 on 2016/06/01 by Bob.Tellez #UE4 Delete unneeded and broken script to unlock files in xcode. Does not work since XCode 6.3. Change 2995634 on 2016/06/01 by Jonathan.Lindquist imrpoving the wind magnitude and noise texture Change 2995249 on 2016/05/31 by Bob.Tellez #UE4 Importing "INVALID" in FUniqueNetIdRepl no longer triggers the warning about using ImportText during cook. Change 2992135 on 2016/05/26 by Bob.Tellez #UE4 extern for GuardedMain in LaunchLinux to fix nonunity Change 2991912 on 2016/05/26 by jonathan.lindquist moved a texture sample into a new grouping Change 2991738 on 2016/05/26 by Bob.Tellez #UE4 Level SaveAs now duplicates the world before saving it. This fixes a problem where level assets had the same guids for objects saved in them, which causes LazyObjectPtr issues when they are both in memory at the same time since they can not be uniquely identified. Change 2991449 on 2016/05/26 by Lukasz.Furman AI Ftests will now delay spawning until navmesh is ready #fortnite Change 2990705 on 2016/05/25 by Chris.Gagnon New stats panel, upon stat changes there is a delta pop up. New Squads Tab. Navigation from nodes to squad slots working. Added GetAnimationCurrentTime() to UMG Animation API. #RB Fred.Kimberley, Saul.Abreu Change 2990286 on 2016/05/25 by Bob.Tellez #UE4 Fix logging error regarding max tag container replication size Change 2990285 on 2016/05/25 by Bob.Tellez #UE4 Fix for crash when using "ShowDebug Game" client side Change 2989977 on 2016/05/25 by Lukasz.Furman auto generating navigation bounds from building grid data, UnitNavMeshBounds volume is no longer required #fortnite Change 2989174 on 2016/05/24 by Bob.Tellez #UE4 Added GC reason to the log message declaring that we are doing a GC during the cook commandlet. Change 2988571 on 2016/05/24 by Jonathan.Lindquist submitting a fix for grass-like hierarchy layouts Change 2985428 on 2016/05/20 by Bob.Tellez Experimenting with making UGS CIS not rebuild UBT when incremental building. Change 2985319 on 2016/05/20 by Bob.Tellez #UE4 Removing NumActorChannelsReadyDormant stat as it is somewhat expensive to calculate. Change 2985258 on 2016/05/20 by Billy.Bramer - Add GetFloatAttributeBase and GetFloatAttributeBaseFromAbilitySystemComponent to AbilitySystemBlueprintLibrary, allows querying for a base value of an attribute Change 2985157 on 2016/05/20 by Bob.Tellez Experimenting with non-unity CIS Change 2984664 on 2016/05/19 by Bob.Tellez #UE4 Pasting multiple cells into the property matrix no longer depends on your selected tiles, only your target cell. This is to match the behavior in Excel. Pasting a single cell into multiple cells remains unchanged. Change 2984663 on 2016/05/19 by Bob.Tellez #UE4 Fixed a crash in the property matrix involving going into edit mode on rows that include widgets that are not editable. Change 2984613 on 2016/05/19 by Bob.Tellez #UE4 You can now text import gameplay tags by directly using the tag string (i.e. Evolution.Hero.Soldier). This allows pasting these strings directly into the property matrix or other property-based editors. Change 2984508 on 2016/05/19 by Billy.Bramer - Add constructors for the new struct based attribute Change 2983883 on 2016/05/19 by Lukasz.Furman disabled movement mode in EQS testing pawn to prevent it from falling at PIE start #ue4 Change 2983770 on 2016/05/19 by Bob.Tellez #UE4 Fixed a bug where "OutputToScreen" BP messages would get stuck disabled after a screenshot (using a number of different codepaths). All screenshots now preserve the state of the "suppress messages" bool. #JIRA FORT-24303 Change 2982306 on 2016/05/18 by Bob.Tellez Also experimenting with not updating version files in UGS CIS. Change 2982154 on 2016/05/18 by Lukasz.Furman changed navwalking geometry conforming to use building prop special case #jira FORT-24215 Change 2982019 on 2016/05/18 by Bob.Tellez Trying out incremental CIS builds Change 2981192 on 2016/05/17 by Bob.Tellez #UE4 No longer staging movie files for dedicated server builds. Change 2981023 on 2016/05/17 by Lukasz.Furman added new mode for NavWalking geometry conforming: prefer height closer to current one this should allow standing on top of props or walking off them in lower LOD, instead of moving at ground level - needed for survivors on low cars Change 2980578 on 2016/05/17 by Lukasz.Furman added option for disabling path replan in crowd manager, turned it off in fortnite this must be handled through path update events and corridor assignment or else hotspot detection will break #jira FORT-24116 Change 2980364 on 2016/05/17 by Lukasz.Furman unified bounds tests for applying navmesh modifiers, always expanding bounds one cell height on Z axis to cover for voxelization roundings #jira FORT-24045 Change 2980360 on 2016/05/17 by Lukasz.Furman more detailed logs for using custom navlinks #jira FORT-23990 Change 2979880 on 2016/05/16 by Bob.Tellez #UE4 Raising scalability threshold for high end machines to adjust for modern hardware. Change 2979522 on 2016/05/16 by Saul.Abreu #fortnite Added IsValid BP-exposed method for FGameplayAttribute (which is already a BP-exposed struct type), as there is no existing method of validating a gameplay attribute from blueprints. Useful for UI that represents an attribute. Change 2977690 on 2016/05/13 by Daniel.Broder Made most FBox functions FORCEINLINE to improve DebugGame performance. #Fortnite: This change (just on IsInsideOrOn()) improved DebugGame performance for one part of Wind performance in Fortnite by ~18%. #CodeReview Bob.Tellez #UE4 #ReleaseNotes Change 2977517 on 2016/05/13 by Daniel.Broder Added ForceInline to TIndexedContainerIterator<...>::operator!=(...). This change improved DebugGame performance of a for loop using ranged-based syntax by ~27%! #CodeReview Bob.Tellez #Fortnite Wind perf improvement in DebugGame builds. #UE4 #ReleaseNote Change 2974910 on 2016/05/11 by Bob.Tellez #UE4 More graceful handling of export class names in string asset references. Change 2974095 on 2016/05/11 by Bob.Tellez #UE4 Fixed a bug where the RenderTargetOutputFormat for velocity rendering when using r.BasePassOutputsVelocity=True was using the wrong output index. Change 2973663 on 2016/05/11 by John.Abercrombie [implemented by Ben.Marsh] UBT: Add a config setting to allow overriding the output directory for PCH files. To use, edit Engine\Saved\UnrealBuildTool\BuildConfiguration.xml and add: <BuildConfiguration> <PCHOutputDirectory>D:\TestOutputDir</PCHOutputDirectory> </BuildConfiguration> Change 2972603 on 2016/05/10 by Saad.Nader #Fort Added the catalyst to the requirements of an evolvable item. It will only disable the evolution button if there is a catalyst. Change 2971741 on 2016/05/09 by Bob.Tellez #UE4 Adding more context to an error message about serializing FUniqueNetIdRepl during cook. Change 2969838 on 2016/05/06 by Bob.Tellez #Fortnite Added FN PS4 to build scripts Change 2969542 on 2016/05/06 by Bob.Tellez #UE4 Fixed a crash that involved renaming SCS nodes during compile on load. #JIRA FORT-23754 Change 2969520 on 2016/05/06 by Billy.Bramer - Fix missing virtual destructor now that the initter struct has virtual members Change 2969467 on 2016/05/06 by Billy.Bramer - Change FAttributeSetInitter to only contain pure virtual functions in preparation for making it easier to provide a custom implementation per game - Change the existing example FAttributeSetInitter to be called FAttributeSetInitterDiscreteLevels, make it derive from FAttributeSetInitter (DiscreteLevels is now allocated by default for now) - Add support for the new struct-based attribute type to FAttributeSetInitterDiscreteLevels - Fix typos in the initter - Convert usages of FString in AbilitySystemGlobals to FStringAssetReference, where appropriate - Allow attribute init data to come from several curve tables instead of just one - Remove reimport bindings from attribute metadata and global curve table, as neither was in use Change 2969279 on 2016/05/06 by John.Abercrombie Behavior tree auxilary nodes, parallel tasks, active tasks, and aborting tasks shouldn't be ticked while the behavior tree is paused Change 2966311 on 2016/05/04 by Rob.Cannaday Fix PS4 Orion players being able to whisper chat with non-Orion players #jira OR-20626 #tests chat with launcher, fortnite (From //Orion/Dev-General CL 2963555) Change 2966255 on 2016/05/04 by Bob.Tellez #UE4 Added an ensure to track down the cause of FORT-23604 and to gracefully recover from what would have been a crash. #JIRA FORT-23604 Change 2966083 on 2016/05/04 by Bob.Tellez #UE4 Adjusted material quality level for "Medium" settings to medium quality. High quality is still used in High and Epic scalability levels. Change 2965669 on 2016/05/04 by Nicholas.Davies Change the restricted platform ID to PSN to prevent Fortnite > PS4 paragon whisper chat #OPP-5268 Integrate PS4 Chat block Social and OSS code to Fortnite, UT, and Launcher #RB Antony.Carter Change 2965316 on 2016/05/03 by Ben.Zeigler #jira FORT-23600 Fix issue where stalled mcp queries never finished. This causes the query to properly fail Manual merge of CL #2907874: When MCP cancels a request due to its required auth failing, the http retry system would never kick off the complete delegates. This was due to the system only adding a request to its list once ProcessRequest was called, which does not happen in the above case. The fix is to add the request to the list when it is cancelled if we did not find it. Change 2965164 on 2016/05/03 by Bob.Tellez #UE4 Fix for Crash in WmfMedia for when the player is destroyed while loading media. Thanks MaxP! Change 2963754 on 2016/05/02 by Billy.Bramer - Switch ability system from binding to OnPostWorldCreation to PreLoadMap for its cleanup functions, as OnPostWorldCreation is called repeatedly with sublevels and can cause data loss - This is a bit of a stopgap, as where and when this happens should probably be configured per game (example: a long session game like an MMO would want to trigger these on something other than a map transition possibly) Change 2962922 on 2016/05/02 by Lukasz.Furman fixed gameplay debugger in "simulate in editor" mode Change 2959860 on 2016/04/28 by David.Nikdel #OGF #McpProfile - Add Profile Write Lock support to client API NOTE: Still need to finish backend support so haven't been able to test yet but this is enough for API hookup NOTE2: You may see a log message about "write lock unexpectedly released" when you do your first command after locking. This is expected because the backend isn't sending down the write lock timeout yet. #CodeReview: Ben.Zeigler Change 2959810 on 2016/04/28 by Jonathan.Lindquist A few more saftey measures to warn the user of incorrect settings and faulty meshes. (In response a licensee's question) Change 2959336 on 2016/04/28 by Bob.Tellez #UE4 Some improvements to asset save time: Added an early-out in PackageBackup to avoid inspecting files in cases where we don't care about the resutls. Also now using GetObjectsWithOuter when passing in a package list to GetObjectsInPackages (which probably should be renamed to GetAssetsInPackage) Change 2958942 on 2016/04/28 by Jonathan.Lindquist Wrote a new portion of pivot painter 2 that unifies edge normals across multiple static meshes Change 2958644 on 2016/04/27 by Jonathan.Lindquist lowering default recursive steps Change 2956612 on 2016/04/26 by Jonathan.Lindquist A few new saftey measures Change 2956197 on 2016/04/26 by Fred.Kimberley Fix a bug where a delegate won't be fired if the base value of an attribute has been changed and the attribute is the new type and doesn't have an aggregator. Fix a bug in gameplay effect tag matching where the deprecated tag is being checked but not the current one. Change 2955386 on 2016/04/25 by Jonathan.Lindquist Fixed a ui bug related to the first time path geo generator is run Pivot painter 2 has a new feature. It duplicates each model in a hierarchy, combines them and then welds their verts. Change 2955230 on 2016/04/25 by Billy.Bramer - Add a debug gameplay tag to string blueprint function, should only be used for debugging purposes Change 2954899 on 2016/04/25 by Fred.Kimberley Added a new backing data type for gameplay attributes. The new type holds both the current and base values. Currently, this new type can coexist with numeric types for gameplay attributes. Change 2953511 on 2016/04/22 by Bob.Tellez #UE4 Bumping up texture streaming pool allowance for min spec and redistributing mid an high to match. Also reduced mip bias at min spec. Change 2953496 on 2016/04/22 by Chris.Gagnon When the console closes it now properly restores the viewports input state (both focus and capture). Change 2952930 on 2016/04/22 by Lukasz.Furman fixed behavior tree getting stuck on instantly finished gameplay tasks #jira FORT-23041 Change 2951765 on 2016/04/21 by John.Abercrombie Removed unused code when initializing attribute sets Change 2951617 on 2016/04/21 by Jonathan.Lindquist new elements to the grass shader to include wind influence also adding a test model and the latest version of canopy creator Change 2950861 on 2016/04/21 by Jonathan.Lindquist Submitting a new material for grass so that it may react to the wind New wind test maps Functions to support global wind a new "fuzzy" mat functions Adding wind to the rift portals Change 2950725 on 2016/04/20 by Bob.Tellez Fixups for non NewEC in GetLastSucceededCL Change 2950695 on 2016/04/20 by Bob.Tellez Adding a small helper function to get the last succeeded CL of a given node. Change 2950616 on 2016/04/20 by Maury.Mountain hook up the pivot (+ (0,-1,0)) section of material function that was causing offset motion from pivots Change 2950207 on 2016/04/20 by Bob.Tellez #UE4 NoTimeouts is now respected even in the initial connection timeout. This fixes a bug where a large stall when starting pie causes you to transition to the entry map. Change 2950162 on 2016/04/20 by Lukasz.Furman fixed processing of repath requests, added infinite loop protection #jira FORT-23090 Change 2949974 on 2016/04/20 by Lukasz.Furman another batch of fixes for hotspot tasks getting out of sync: abort move is now ignored if instigated by new task at goal, clearing hotspot data on dying while gameplay tasks are still accessible, ignoring move resume when controller is being destroyed Change 2949923 on 2016/04/20 by Rob.Cannaday FOnlineIdentityMcp: Cancel ClientAuthRequests and ExternalAuthRequests on shutdown #tests PIE start game / shutdown Change 2949210 on 2016/04/19 by Bob.Tellez #UE4 Removing all local players from the game instance when it is shut down. This ensures that local players are properly torn down and events related to the lifespan of the player or controller are fired when exiting the game normally. #JIRA FORT-23024 Change 2947381 on 2016/04/18 by Rob.Cannaday Change XMPP presence, pubsub, messages, multi user chat, and chat's ref counting to be thread safe #jira FORT-22861 #tests front end partying Change 2945301 on 2016/04/15 by Michael.Trepka Reset SyncStatus in FAvfMediaVideoTrack::SeekToTime to fix issues with video not updating after rewind Change 2944422 on 2016/04/14 by Michael.Trepka Fixed Mono compile errors in UAT Change 2944375 on 2016/04/14 by Fred.Kimberley Changed how we handle missing gameplay tags so we now ensure once per missing tag instead of only ensuring on the first missing gameplay tag. Change 2944040 on 2016/04/14 by Michael.Trepka Fixed a problem with CoreAudio AudioUnitGraph update caused by adding and deleting the same node in a single tick Change 2943864 on 2016/04/14 by Lukasz.Furman fixed initialization order of gameplay debugger replicators on client #jira FORT-22885 Change 2943228 on 2016/04/13 by Bob.Tellez #UE4 Moved the addition of the IsDataOnly tag out of the if (ParentClass) block. Tags should not be dynamically added like this or else they can not be discovered by the editor which relies on asking the CDO for the tags relevant to an asset type. Change 2942303 on 2016/04/13 by Daniel.Broder Added support to be able to set a CanvasRenderTarget2D NOT to clear to green whenever it's updated (so you can just draw pixels that have changed instead of always having to redraw everything. #RB Bob.Tellez #UE4 Change 2941919 on 2016/04/13 by Jonathan.Lindquist Adding a new maxscript that allows artists to procedurally generate trees. Change 2941816 on 2016/04/13 by Saul.Abreu Demoted errors regarding widget-bound properties when first compling a new created widget blueprint - otherwise an ensure occurs. Change 2941752 on 2016/04/12 by jonathan.lindquist adding a new function to optimize trees and fix a few issues Change 2941519 on 2016/04/12 by Jonathan.Lindquist submitting a new warning regarding file unit types Change 2940980 on 2016/04/12 by John.Abercrombie Turned Graphs off by default in the Visual Logger Change 2940134 on 2016/04/11 by Billy.Bramer - Add support for new overrideable function OnPostDataImport to FTableRowBase; Can be override to perform custom parsing, fix-up, etc. per struct type whenever a data table is imported or reimported - Change row struct combo box on the data table importer to be sorted alphabetically Change 2938828 on 2016/04/08 by David.Hunt #FN || Economy Rebuild Updating several code references to items and item paths that no longer exist, with Bob's help. This fixes FORT-22784 (hopefully for real) and several other build and item errors. It also indicates that the various redirector issues I have been experiencing were likely red herrings - they were C++ defaults that were showing up on items that had nothing set, as opposed to redirects that failed. #CodeReview Bob.Tellez, Ben.Zeigler, William.Ewen, Carlos.Cuello Change 2938675 on 2016/04/08 by Lukasz.Furman fixed gameplay debugger displaying paths of killed pawns #fortnite Change 2938426 on 2016/04/08 by Rob.Cannaday Implement new command line party invitation format into Fortnite #jira FORT-22685 #tests launch with command line party invite Integrate CLs 2908339 and 2917498 from Orion Change 2938367 on 2016/04/08 by Billy.Bramer - Mark the reimport data table factory with UNREALED_API for external use - Change CSVImportFactory to respect the class of existing data being reimported upon Change 2937319 on 2016/04/07 by Lukasz.Furman improved gameplay task info in gameplay debugger tool Change 2937178 on 2016/04/07 by Lukasz.Furman fixed aborting undermine tasks when player becomes reachable #jira FORT-22240, FORT-22077 Change 2937166 on 2016/04/07 by Saul.Abreu Fixed redundant typename in TPair that was causing clang compilation errors. Change 2937093 on 2016/04/07 by Saul.Abreu #fortnite Made ElementSetType protected again in the Map family. Change 2937044 on 2016/04/07 by Saul.Abreu Tweaked Set/Map family of data structures to expose the typedefs for their key, value, and pair types. Change 2936940 on 2016/04/07 by Bob.Tellez #UE4 Fixed a bug that prevented the log summary from being printed after a blueprint compile. Change 2936696 on 2016/04/07 by Bob.Tellez #UE4 Blueprint names are once again part of Blueprint compile log messages. Change 2936572 on 2016/04/07 by Lukasz.Furman added more debug logs for tracking rare NaN error in player movement #jira FORT-19426 Change 2934892 on 2016/04/06 by Lukasz.Furman fixed updating hotspot information after all tasks instigated by it are finished #jira FORT-22515 Change 2933664 on 2016/04/05 by Michael.Trepka Fixed a rare crash in USoundNodeLooping::NotifyWaveInstanceFinished Change 2933554 on 2016/04/05 by Lukasz.Furman fixed taker's portal move (priorities of gameplay tasks spawned by path following) #jira FORT-22482 Change 2933343 on 2016/04/05 by John.Abercrombie Changed FGameplayAbilityActorInfo's AnimInstance property to a SkeletalMeshComponent in case AnimInstances are ever changed on a SkeletalMeshComponent - AnimInstance can be used through an accessor Change 2933300 on 2016/04/05 by Lukasz.Furman fixed number of spawned AI in FTests using PreSpawnDelay #fortnite Change 2933171 on 2016/04/05 by Lukasz.Furman added PreSpawnDelay param to function test spawn sets #fortnite Change 2931072 on 2016/04/01 by Lukasz.Furman changed pawn actions to gameplay tasks #jira FORT-21314 Change 2930987 on 2016/04/01 by Billy.Bramer - Add method to data table to get all rows as a type - Add metadata tag for data table rows to report columns as DataTableImportOptional, at which point they will not be warned against if missing during import (this allows games to do custom post-import fix-up or synthesis of data w/o expecting it to be imported) - Use new method for getting all tags to fix FORT-20563 "Gameplay tag table import checks by numerical row name for no reason" Change 2929651 on 2016/03/31 by Nick.Cooper #Fortnite - Fixed Actor AttachmentReplication not being cleared on detachment, which would cause issues with the actor's location for clients joining in progress #jira FORT-21330 #RB ben.zeigler Change 2929360 on 2016/03/31 by Daniel.Broder Fixed bug where CanvasRenderTarget2D assets would crash on load in editor due to trying to update the asset during post-load. Thanks to Bob for what I needed to check to early-out and avoid the crash. #RB Bob.Tellez #UE4 Change 2928845 on 2016/03/31 by Nicholas.Davies Add fix for chat text not clearing #jira FORT-22049 Textbox does not clear when text is sent through chat Change 2928574 on 2016/03/30 by Ben.Zeigler Fix issue with redirectors not working properly for blueprint function libraries. When a blueprint got regenerated it patched the old export, but failed to clear the "load failed" flag, so it would fail to find it when later pointed to by a redirect Change 2928572 on 2016/03/30 by Ben.Zeigler #Jira FORT-20763 Fix issue with "Server re-loading object" warning going off for deleted actors. It now only logs, and only for things that are going to successfully load Change 2928436 on 2016/03/30 by Bob.Tellez #UE4 Added Canvas Render Target factory and asset type actions so you can create them in the content browser and search for them after they are created. Change 2928372 on 2016/03/30 by Bob.Tellez #UE4 Added verbose message about animation assets that need to be resaved due to resetting the skeleton. Change 2926805 on 2016/03/29 by Bob.Tellez #UE4 Made SetOverallScalabilityLevel virtual so game-specific features can be updated based on a single-value level. Change 2926752 on 2016/03/29 by Bob.Tellez #UE4 Using DesiredScreenHeight is now optional. Often games use ResolutionQuality as purely a way to run better on slower machines so it should be controlled entirely by scalability. Change 2926189 on 2016/03/29 by Rob.Cannaday Change storing HTTP requests as raw pointers to weak pointers with validity being checked via Pinning it #jira FORT-18947 #jira OR-17695 #tests golden path Change 2924921 on 2016/03/28 by Lukasz.Furman removed log message showing as navmesh generation error when it skips over degenerated poly #fortnite Change 2924843 on 2016/03/28 by Lukasz.Furman added more debug logs for navmesh's failed triangulate() #jira FORT-22186 Change 2924719 on 2016/03/28 by Lukasz.Furman fixed offmesh link connection issue causing path portal edges to have duplicated data and breaking hotspot detection traces #jira FORT-22132 Change 2921698 on 2016/03/24 by Lukasz.Furman fixed EQS instancing queries by debug name instead of using unique one, fixed debug name on asset duplication #fortnite Change 2920395 on 2016/03/23 by Bob.Tellez #UE4 Added a call to FBaseServiceMcp::Shutdown() in FOnlineServiceAvailabilityMcp::Shutdown. The parent class doesnt do anything today, but this may fix a bug in the future. Change 2920343 on 2016/03/23 by Ben.Zeigler In ConvertScalarUPropertyToJsonValue, move the execution of the custom callback up above the specific property types. This is needed to allow us to override the TextProperty export, and allows overriding in general. It can have a performance implication if the custom callback is very slow #RB josh.markiewicz Change 2920310 on 2016/03/23 by Bob.Tellez #UE4 FOnlineServiceAvailabilityMcp::Init was not invoking the Superclass' Init Change 2920254 on 2016/03/23 by Aaron.McLeran FORT-22090 Re-disabling reverb. Will add an ini-based disabling ability but this CL quickly re-disables to resolve volume issue on FN and (hopefully) bypass crash mentioned in FORT-22037 Change 2920249 on 2016/03/23 by Rob.Cannaday Fix for crash in FOnlinePartySystemMcp::InternalCleanUpPartyMember Don't trigger "member left" type events if we are leaving the party #jira FORT-20422 #jira FORT-21726 Change 2920178 on 2016/03/23 by Bob.Tellez #UE4 Calling the platform-specific implementation of StackWalkAndDump when invoking StackWalkAndDumpEx. This fixes a bug in Windows where the first ensure does not produce a callstack. Change 2919858 on 2016/03/23 by Bob.Tellez #UE4 Fix for ensure about accessing a CVar in UParticleModuleLight on a non-game thread using GetValueOnGameThread. I changed this to GetValueOnAnyThread. Change 2919775 on 2016/03/23 by Bob.Tellez #UE4 Restoring enforced uniqueness in FUObjectAnnotationSparseSearchable and put all manipulations of InverseAnnotationMap in critical sections. This will make RemoveAnnotation fast again. Change 2919233 on 2016/03/22 by Bob.Tellez #UE4 Removing a warning that is pretty chatty in our cooked logs. Change 2919125 on 2016/03/22 by Bob.Tellez #UE4 Added ParticleLightQuality scalability setting since lower-end machines have trouble with particle lights. They are disabled on low and medium spec machines. HQ lights are only allowed on high-end machines. Change 2918831 on 2016/03/22 by Bob.Tellez #UE4 Fixed a bug where WinInet response headers were not properly being trimmed. #JIRA FORT-22054 Change 2917722 on 2016/03/21 by Ben.Zeigler Remove FortniteServer module and move those classes to FortniteGame. The engine doesn't support classes that only exist on servers but not clients, so this fixes a lot of error spam bugs, and should improve compile times Resave assets that directly referenced FortniteServer Change 2917588 on 2016/03/21 by Bob.Tellez #UE4 Fixed shadow variable that I introduced Change 2914169 on 2016/03/17 by Ben.Zeigler Disable extra logging that was added to track down Auth issues, they look to be resolved Change 2912626 on 2016/03/16 by Bob.Tellez #UE4 Success messages should not be warnings. Change 2911171 on 2016/03/15 by Bob.Tellez #UE4 Minor fix to correctly display GetBulkDataSize in the warning in FUntypedBulkData::WaitForAsyncLoading Change 2911170 on 2016/03/15 by Billy.Bramer #jira [FORT-6139] Trap models persist after destroying supporting structure in Outpost - Root issue was caused by error within network dormancy and queued bunches: If a dormant actor's open bunch ended up queued and a close bunch came in before the bunch was processed, the actor would never be properly destroyed client side as a result of not re-establishing the channel's actor pointer - Fix issue by changing close bunches to not be fully processed until their appropriate place in the queue. While this could cause superfluous execution (i.e. actor recreated just to be immediately destroyed), it should respect gameplay programming intent in regards to RPCs Change 2911009 on 2016/03/15 by Bob.Tellez #UE4 Fixed a bug in UHierarchicalInstancedStaticMeshComponent where RemoveInstances would not rebuild the ClusterTree, causing SortedInstances to contain incorect indices in GetInstancesOverlappingBox. This is the behavior of the singular RemoveInstance so this is what should also be done in the plural RemoveInstances. #JIRA FORT-21605 Change 2910295 on 2016/03/15 by Bob.Tellez #UE4 World thumbnails no longer cull primitives. This is because the camera is very far away and if terrain pieces are culled, the level is not visible. Change 2909324 on 2016/03/14 by Bob.Tellez #UE4 Since empty headers values cause GenerateHeaderBuffer to emit ERROR_HTTP_HEADER_NOT_FOUND, they are now omitted from the header buffer in WinInet. Change 2905920 on 2016/03/11 by Lukasz.Furman fixed crowd simulation getting stuck with invalid velocity (moonwalking husks) #fortnite Change 2905612 on 2016/03/11 by Bob.Tellez #UE4 Made the minimum quadtree size configurable in ProceduralFoliageSpawner. You need to reduce the minimum size a little if you are spawning very many small foliage meshes. [CL 3027184 by Bob Tellez in Main branch]
2016-06-24 16:58:12 -04:00
if (HeaderValue.Len() > 0)
{
RequestHeaders.Add(HeaderName, HeaderValue);
}
}
Copying //UE4/Dev-Networking to Dev-Main (//UE4/Dev-Main) ========================== MAJOR FEATURES + CHANGES ========================== Change 2814968 on 2016/01/04 by John.Pollard Remove warning per connection when same warning happens at net driver level Change 2815271 on 2016/01/04 by John.Pollard Fix header uploads in replays showing wrong size #rb none #tests Compiled, confirmed correct size Change 2830613 on 2016/01/15 by John.Barrett Added better ability for unit tests to test socket-level netcode Full changes: - Added flag for auto-reconnecting on connection close - Added hook for socket level sends - Added ability to block socket-level sends and pre-PacketHandler LowLevelSend's - Added ability for net connections to force-enable packet handlers, even if presently off in the engine #rb none Change 2830617 on 2016/01/15 by John.Barrett@JC2Q-LT_UE4 Enabled NetcodeUnitTest in Linux, and other minor updates. #rb none Change 2830621 on 2016/01/15 by John.Barrett@JC2Q-LT_UE4 Added 'PacketLimitTest' and 'PacketLimitTest_Oodle' unit tests, for testing/verifying that MaxPacket limits are respected, through testing with Bunches and with raw sends passed through PacketHandlers (such as Oodle). #rb none Change 2832402 on 2016/01/18 by Bart.Bressler@bart.bressler_Dev_Networking Always use the physical platform file when writing out steam_appid.txt, because it has to live next to executable that's being run (CotF builds will output it to the wrong location). #rb josh.markiewicz #tests checked that steam_appid.txt was written to the correct place with both CotF and cooked builds Change 2833728 on 2016/01/19 by Joe.Conley@Joe.Conley_EGJWD5708_Dev-Networking-Minimal Fix for UE-20017 - "Http server headers implemented as TMaps and are overridden". Just changing TMaps to TMultiMaps. Haven't modified the behavior of GetHeader(), which will still return the first header that matches. Change 2844880 on 2016/01/26 by Joe.Conley Fix for UE-20017 Http server headers implemented as TMaps and are overridden Previously had submitted a fix that changes the request and response headers TMap into a MultiMap, but the consensus was that it would be better to leave them as TMaps, but allow appending onto the existing entry for a given request header with an "AppendToHeader" function, and to concatenate entries for the same header name in the response headers. In both cases, entries for the same header name are concatenated with ", ". Mac and iOS already had the desired behavior for responses, just added the AppendToHeader function to their request classes. HTML5 still has no implementation of response headers, filed as separate JIRA issue UE-26047. #platformnotify josh.adams Change 2859343 on 2016/02/08 by Bart.Bressler Default MaxSearchResults in FOnlineSessionSearch objects to 1 instead of 0 - otherwise, the FOnlineAsyncTaskSteamFindServerBase tasks will complete right away without searching for sessions. Also print a warning in the task if this will happen. #codereview josh.markiewicz Change 2862352 on 2016/02/10 by Bart.Bressler Fix demo.SkipTime cvar to work with negative values #rb john.pollard Change 2866624 on 2016/02/14 by John.Barrett Fix plugin commandlet crash. #rb none Change 2866627 on 2016/02/14 by John.Barrett Added NetDriver/PacketHandler ability to send/receive connectionless packets - i.e. packets not associated with a UNetConnection. Removed 'bEnabled' from PacketHandler - PacketHandler is now a default always-on part of the Engine. Added 'CountBits' to LowLevelSend, to support bit-level additions to packets from PacketHandler's, and refactored related code. #codereview John.Pollard Change 2866628 on 2016/02/14 by John.Barrett Added an HMAC (Hash-based Message Authentication Code) generating function, to the SHA-1 code - for use with performing secure net connection handshakes. #rb none Change 2866629 on 2016/02/14 by John.Barrett Added 'stateless handshake' to UE4, allowing a handshake to be performed without any open UNetConnection - making it more difficult for DoS attacks to consume memory resources. #codereview John.Pollard Change 2866630 on 2016/02/14 by John.Barrett Updated Oodle to support new stateless handshake. #rb none Change 2866631 on 2016/02/14 by John.Barrett Updated NetcodeUnitTest to work with new connectionless/stateless handshake changes. Compiles, but netcode presently needs fixing. #rb none Change 2868367 on 2016/02/16 by John.Barrett Updated NetcodeUnitTest to work with stateless handshakes (now fixed connecting). Also fixed further commandlet problems. #rb none Change 2878025 on 2016/02/23 by John.Barrett Immediately stop processing zero-size packets, to prevent CPU utilization during DDoS. Log IP of new connections, post-stateless-challenge (first time we know IP is verified). #codereview john.pollard Change 2883776 on 2016/02/26 by John.Barrett Fixed beacons to work with stateless handshake. Change 2886773 on 2016/02/29 by John.Barrett Made PacketHandler bit overhead align upwards to the next byte - this wastes more bits than necessary, but is required as a temporary fix. Change 2887801 on 2016/03/01 by John.Pollard Use correct default values when initializing shadow state for replication. Fixes issues with certain components and actors that have default values that differ from CDO. [CL 2901490 by John Pollard in Main branch]
2016-03-09 13:54:33 -05:00
void FHttpRequestWinInet::AppendToHeader(const FString& HeaderName, const FString& AdditionalHeaderValue)
{
if (!HeaderName.IsEmpty() && !AdditionalHeaderValue.IsEmpty())
{
FString* PreviousValue = RequestHeaders.Find(HeaderName);
FString NewValue;
if (PreviousValue != nullptr && !PreviousValue->IsEmpty())
{
NewValue = (*PreviousValue) + TEXT(", ");
}
NewValue += AdditionalHeaderValue;
SetHeader(HeaderName, NewValue);
}
}
bool FHttpRequestWinInet::ProcessRequest()
{
bool bStarted = false;
// Disabled http request processing
if (!FHttpModule::Get().IsHttpEnabled())
{
UE_LOG(LogHttp, Verbose, TEXT("Http disabled. Skipping request. url=%s"), *GetURL());
}
// Prevent overlapped requests using the same instance
else if (CompletionStatus == EHttpRequestStatus::Processing)
{
UE_LOG(LogHttp, Warning, TEXT("ProcessRequest failed. Still processing last request."));
}
// Make sure Internet connection has been setup
else if (!FWinInetConnection::Get().IsConnectionValid() &&
!FWinInetConnection::Get().InitConnection())
{
UE_LOG(LogHttp, Warning, TEXT("ProcessRequest failed. Could not initialize Internet connection."));
}
// Nothing to do without a valid URL
else if (RequestURL.GetURL().IsEmpty())
{
UE_LOG(LogHttp, Warning, TEXT("ProcessRequest failed. No URL was specified."));
}
// Make sure the URL is parsed correctly with a valid HTTP scheme
else if (RequestURL.GetURLComponents().nScheme != INTERNET_SCHEME_HTTP &&
RequestURL.GetURLComponents().nScheme != INTERNET_SCHEME_HTTPS)
{
UE_LOG(LogHttp, Warning, TEXT("ProcessRequest failed. URL '%s' is not a valid HTTP request. %p"),
*RequestURL.GetURL(), this);
}
else
{
// Mark as in-flight to prevent overlapped requests using the same object
CompletionStatus = EHttpRequestStatus::Processing;
// Response object to handle data that comes back after starting this request
Response = MakeShareable(new FHttpResponseWinInet(*this));
// Add to global list while being processed so that the ref counted request does not get deleted
FHttpModule::Get().GetHttpManager().AddRequest(SharedThis(this));
// keep track of time when request was started
StartRequestTime = FPlatformTime::Seconds();
// reset elapsed time.
ElapsedTime = 0.0f;
// Try to start the connection and send the Http request
bStarted = StartRequest();
}
if (!bStarted)
{
// Cleanup and call delegate
FinishedRequest();
}
// Successfully started the request
return bStarted;
}
bool FHttpRequestWinInet::StartRequest()
{
// Make sure old handles are not being reused
CleanupRequest();
UE_LOG(LogHttp, Log, TEXT("Start request. %p %s url=%s"), this, *GetVerb(), *GetURL());
if (UE_LOG_ACTIVE(LogHttp, Verbose))
{
for (TMap<FString, FString>::TConstIterator It(RequestHeaders); It; ++It)
{
if (!It.Key().Contains(TEXT("Authorization")))
{
UE_LOG(LogHttp, Verbose, TEXT("%p Header %s : %s"), this, *It.Key(), *It.Value());
}
}
}
if (FWinInetConnection::Get().IsConnectionValid())
{
// Open an internet connection to the URL endpoint
ConnectionHandle = InternetConnect(
FWinInetConnection::Get().InternetHandle,
*RequestURL.GetHost(),
RequestURL.GetPort(),
NULL,
NULL,
INTERNET_SERVICE_HTTP,
0,
(DWORD_PTR)this);
}
if (ConnectionHandle == NULL)
{
UE_LOG(LogHttp, Warning, TEXT("InternetConnect failed: %s"), *InternetTranslateError(GetLastError()));
return false;
}
// Disable IE offline mode
::BOOL bEnabled = true;
InternetSetOption(ConnectionHandle, INTERNET_OPTION_IGNORE_OFFLINE, &bEnabled, sizeof(::BOOL));
// Set connection timeout in ms
if (FHttpModule::Get().GetHttpConnectionTimeout() >= 0)
{
uint32 HttpConnectionTimeout = FHttpModule::Get().GetHttpConnectionTimeout() == 0 ? 0xFFFFFFFF : FHttpModule::Get().GetHttpConnectionTimeout() * 1000;
InternetSetOption(ConnectionHandle, INTERNET_OPTION_CONNECT_TIMEOUT, (::LPVOID)&HttpConnectionTimeout, sizeof(::DWORD));
}
// Set receive timeout in ms
if (FHttpModule::Get().GetHttpReceiveTimeout() >= 0)
{
uint32 HttpReceiveTimeout = FHttpModule::Get().GetHttpReceiveTimeout() * 1000;
InternetSetOption(ConnectionHandle, INTERNET_OPTION_RECEIVE_TIMEOUT, (::LPVOID)&HttpReceiveTimeout, sizeof(::DWORD));
}
// Set send timeout in ms
if (FHttpModule::Get().GetHttpSendTimeout() >= 0)
{
uint32 HttpSendTimeout = FHttpModule::Get().GetHttpSendTimeout() * 1000;
InternetSetOption(ConnectionHandle, INTERNET_OPTION_SEND_TIMEOUT, (::LPVOID)&HttpSendTimeout, sizeof(::DWORD));
}
// Query these options to verify
{
::DWORD OptionSize = sizeof(::DWORD);
::DWORD OptionData = 0;
InternetQueryOption(ConnectionHandle, INTERNET_OPTION_CONNECT_TIMEOUT, (::LPVOID)&OptionData, (::LPDWORD)&OptionSize);
UE_LOG(LogHttp, VeryVerbose, TEXT("INTERNET_OPTION_CONNECT_TIMEOUT: %d"), OptionData);
InternetQueryOption(ConnectionHandle, INTERNET_OPTION_RECEIVE_TIMEOUT, (::LPVOID)&OptionData, (::LPDWORD)&OptionSize);
UE_LOG(LogHttp, VeryVerbose, TEXT("INTERNET_OPTION_RECEIVE_TIMEOUT: %d"), OptionData);
InternetQueryOption(ConnectionHandle, INTERNET_OPTION_SEND_TIMEOUT, (::LPVOID)&OptionData, (::LPDWORD)&OptionSize);
UE_LOG(LogHttp, VeryVerbose, TEXT("INTERNET_OPTION_SEND_TIMEOUT: %d"), OptionData);
}
// Only custom request flag is for SSL/HTTPS requests
uint32 RequestFlags = RequestURL.GetURLComponents().nScheme == INTERNET_SCHEME_HTTPS ? INTERNET_FLAG_SECURE : 0;
// Always download from server instead of cache
// Forces the request to be resolved by the origin server, even if a cached copy exists on the proxy.
RequestFlags |= INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_PRAGMA_NOCACHE;
// Keep the connection open
RequestFlags |= INTERNET_FLAG_KEEP_CONNECTION;
// Build full path
FString PathAndExtra(RequestURL.GetPath() + RequestURL.GetExtraInfo());
// Create the request
RequestHandle = HttpOpenRequest(
ConnectionHandle,
RequestVerb.IsEmpty() ? NULL : *RequestVerb,
*PathAndExtra,
NULL,
NULL,
NULL,
RequestFlags,
(DWORD_PTR)this);
if (RequestHandle == NULL)
{
UE_LOG(LogHttp, Warning, TEXT("HttpOpenRequest failed: %s"), *InternetTranslateError(GetLastError()));
return false;
}
// Disable certificate checks
::DWORD SecurityFlags = SECURITY_FLAG_IGNORE_REVOCATION;
if (!InternetSetOption(RequestHandle, INTERNET_OPTION_SECURITY_FLAGS, (LPVOID)&SecurityFlags, sizeof(::DWORD)))
{
UE_LOG(LogHttp, Warning, TEXT("InternetSetOption failed: %s"), *InternetTranslateError(GetLastError()));
}
// Send the request with the payload if any
FString Headers = GenerateHeaderBuffer(RequestPayload.Num());
BOOL bSentRequest = HttpSendRequest(
RequestHandle,
*Headers,
Headers.Len(),
RequestPayload.Num() > 0 ? RequestPayload.GetData() : NULL,
RequestPayload.Num());
if (!bSentRequest &&
GetLastError() != ERROR_IO_PENDING)
{
UE_LOG(LogHttp, Warning, TEXT("HttpSendRequest failed: %s"), *InternetTranslateError(GetLastError()));
return false;
}
// Successfully started the request
return true;
}
void FHttpRequestWinInet::FinishedRequest()
{
// Clean up session/request handles that may have been created
CleanupRequest();
TSharedRef<IHttpRequest> Request = SharedThis(this);
// Remove from global list since processing is now complete
FHttpModule::Get().GetHttpManager().RemoveRequest(Request);
ElapsedTime = (float)(FPlatformTime::Seconds() - StartRequestTime);
if (Response.IsValid() &&
Response->bResponseSucceeded)
{
const bool bDebugServerResponse = Response->GetResponseCode() >= 500 && Response->GetResponseCode() <= 505;
if (bDebugServerResponse)
{
UE_LOG(LogHttp, Warning, TEXT("Finished request %p. response=%d %s url=%s elapsed=%.3f DownloadSize=%d"),
this, Response->GetResponseCode(), *GetVerb(), *GetURL(), ElapsedTime, Response->GetContentLength());
}
else
{
UE_LOG(LogHttp, Log, TEXT("Finished request %p. response=%d %s url=%s elapsed=%.3f DownloadSize=%d"),
this, Response->GetResponseCode(), *GetVerb(), *GetURL(), ElapsedTime, Response->GetContentLength());
}
// log info about error responses to identify failed downloads
if (UE_LOG_ACTIVE(LogHttp, Verbose) ||
bDebugServerResponse)
{
TArray<FString> AllHeaders = Response->GetAllHeaders();
for (TArray<FString>::TConstIterator It(AllHeaders); It; ++It)
{
const FString& HeaderStr = *It;
if (!HeaderStr.StartsWith(TEXT("Authorization")) && !HeaderStr.StartsWith(TEXT("Set-Cookie")))
{
if (bDebugServerResponse)
{
UE_LOG(LogHttp, Warning, TEXT("%p Response Header %s"), this, *HeaderStr);
}
else
{
UE_LOG(LogHttp, Verbose, TEXT("%p Response Header %s"), this, *HeaderStr);
}
}
}
}
// Mark last request attempt as completed successfully
CompletionStatus = EHttpRequestStatus::Succeeded;
// Call delegate with valid request/response objects
OnProcessRequestComplete().ExecuteIfBound(Request,Response,true);
}
else
{
UE_LOG(LogHttp, Log, TEXT("Finished request %p. no response %s url=%s elapsed=%.3f"),
this, *GetVerb(), *GetURL(), ElapsedTime);
// Mark last request attempt as completed but failed
Copying //UE4/Fortnite-Staging to //UE4/Main #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2806454 on 2015/12/16 by Bob.Tellez #UE4 Getting crash reporting working again on linux servers. Since -Unattended is now being passed BEFORE the target folder, the cmd line parsing code was failing so now it parses tokens and switches in a more general way. Also, diagnostics.txt had the incorrect case, since the d is supposed to be capitolized and the crash report processor is case sensitive. #rb Ben.Zeigler #codereview Dmitry.Rekman Change 2805502 on 2015/12/16 by Ben.Zeigler #UE4 Move ValidateEnumProperties into ValidateGeneratedClass, it was happening too early in the generation process so was being called at an invalid time. As a result of this ValidateEnumProperties will not be called correctly for compile on load blueprints, that issue is covered in UE-24569 #codereview mike.beach, bob.tellez Change 2805288 on 2015/12/16 by David.Nikdel #HTTP #HttpRetry - Add new Failed_ConnectionError code to EHttpRequestStatus to distinguish between connection errors and protocol errors. - Changed HTTP retry logic a little bit * If a response was received, retry on service-specific explicit HTTP codes (defaults to empty) * If a response was not received and we did not send a full request, automatically retry * If a response was not received and a request may have been sent, retry if the verb is GET or HEAD (should be idempotent) - Adjusted Curl/IOS/Mac/PS4/WinInet to try and distinguish Failed_ConnectionError where possible * Other systems will default to Failed which is ok (ConnectionError is an opportunistic categorization) * Opened a PS4 ticket to try to improve detection, but unfortunately there's no way (currently) to distinguish between send timeout, connection timeout, and receive timeout, the latter being the problematic case. - Removed the concept of global/default HTTP retry status codes. No system has enough knowledge to set those globally. * Individual requests still specify explicit "retryable" codes and McpServiceBase sets that on each request on a per-service basis #RB: Sam.Zamani #CodeReview: Sam.Zamani, Josh.Markiewicz, Alex.Fennell, Dmitry.Rekman, Sam.Spiro #Fixes: FORT-17804 Change 2803864 on 2015/12/15 by Bob.Tellez #UE4 Changed usage of !UE_SERVER to !IsRunningDedicatedServer in cases where we are preventing load attempts on UFonts. This is so running an editor build with -server works the same as running a cooked server. #rb Dmitry.Rekman #codereview Nick.Darnell Change 2803677 on 2015/12/15 by Billy.Bramer - Expose equality and inequality operators for gameplay attributes #rb Todd.Eckert Change 2802881 on 2015/12/14 by Bob.Tellez #UE4 InheritableComponentHandler no longer keeps records for components that we are no longer inheriting. #rb Phillip.Kavan, Maciej.Mroz #codereview Phillip.Kavan, Maciej.Mroz Change 2801636 on 2015/12/14 by Bob.Tellez #UE4 Returning package insert order for non-imports back to being after those of matching priorities unconditionally since this is what you want even when you are not using the asset registry to preload packages. #codereview Graeme.Thornton Change 2800400 on 2015/12/11 by Jonathan.Lindquist Submitting a new Pivot Painter Edition - now renders to textures - improved workflow - greater capabilities Change 2799579 on 2015/12/11 by John.Abercrombie [AUTOMERGE] Fixed EQS BP query wrappers getting GCed before wrapped query finishes #UE4 Fixes FORT-18649 - Patrols don't spawn consistently - The patrol blueprint was waiting (endlessly) for an EQS query to finish but because the wrapper could be GC-ed while the EQS query was running the delegate would never fire #rb me (this code was written by MieszkoZ) (removed code review for integration of Mieszko.Zielinski, Phil.Cole, Dominic.Barile) -------- Integrated using branch UE4-Fortnite-To-UE4-FortniteReleases/0.10 (reversed) of change#2799575 by John.Abercrombie on 2015/12/11 09:55:11. Change 2799018 on 2015/12/10 by Bob.Tellez #UE4 The asset registry tags stripped from cooked builds is now a blacklist by default that includes only the FiB tag. You can opt-in to using the whitelist by flipping the bUseAssetRegistryTagsWhitelistInsteadOfBlacklist flag. #rb Fred.Kimberley #codereview Peter.Knepley Change 2798926 on 2015/12/10 by Bob.Tellez #UE4 Removed some showflags from the list of "Fixed" showflags since they were actually in use at runtime in Fortnite in a scene capture. #jira FORT-18514 #codereview Martin.Mittring Change 2797758 on 2015/12/10 by Mark.Satterthwaite Defer calls to AUGraphUpdate into FCoreAudioDevice::UpdateHardware - this call will synchronise the calling thread with the CoreAudio thread/run-loop so that the CoreAudio graph is safe to modify and this may incur a significant stall. This means it is far more efficient to amortise the cost of all changes to the graph with a single call. To ensure correctness the audio format conversion components are cached and disposed of after the call to AUGraphUpdate so that any existing operations on the CoreAudio thread are completed prior to disposal. Change 2781204 on 2015/11/25 by Dmitry.Rekman Linux: use jemalloc by default if available. - Alleviates one of the reasons for player disconnect (FORT-18048), which was machines running OOM. #rb Bob.Tellez #codereview Bob.Tellez, Ben.Zeigler Change 2779398 on 2015/11/24 by Mark.Satterthwaite Switch the default graphics API on Mac back to OpenGL, but allow Metal to run with -metal (or -metalsm5 for experimental SM5 support).
2016-01-08 19:10:43 -05:00
CompletionStatus = (Response.IsValid() && Response->bRequestSent) ? EHttpRequestStatus::Failed : EHttpRequestStatus::Failed_ConnectionError;
// No response since connection failed
Response = NULL;
// Call delegate with failure
OnProcessRequestComplete().ExecuteIfBound(Request,NULL,false);
}
}
void FHttpRequestWinInet::CleanupRequest()
{
if (RequestHandle != NULL)
{
InternetCloseHandle(RequestHandle);
RequestHandle = NULL;
}
if (ConnectionHandle != NULL)
{
InternetCloseHandle(ConnectionHandle);
ConnectionHandle = NULL;
}
}
FString FHttpRequestWinInet::GenerateHeaderBuffer(uint32 ContentLength)
{
FString Result;
for (TMap<FString, FString>::TConstIterator It(RequestHeaders); It; ++It)
{
Result += It.Key() + TEXT(": ") + It.Value() + TEXT("\r\n");
}
if (ContentLength > 0)
{
Result += FString(TEXT("Content-Length: ")) + FString::FromInt(ContentLength) + TEXT("\r\n");
}
return Result;
}
void FHttpRequestWinInet::ResetRequestTimeout()
{
FPlatformAtomics::InterlockedExchange(&ElapsedTimeSinceLastServerResponse, 0);
}
FHttpRequestCompleteDelegate& FHttpRequestWinInet::OnProcessRequestComplete()
{
return RequestCompleteDelegate;
}
FHttpRequestProgressDelegate& FHttpRequestWinInet::OnRequestProgress()
{
return RequestProgressDelegate;
}
void FHttpRequestWinInet::CancelRequest()
{
UE_LOG(LogHttp, Log, TEXT("Canceling Http request. %p url=%s"),
this, *GetURL());
// force finish/cleanup of request
// note: will still call completion delegates
FinishedRequest();
}
EHttpRequestStatus::Type FHttpRequestWinInet::GetStatus()
{
return CompletionStatus;
}
const FHttpResponsePtr FHttpRequestWinInet::GetResponse() const
{
return Response;
}
void FHttpRequestWinInet::Tick(float DeltaSeconds)
{
// keep track of elapsed milliseconds
const int32 ElapsedMillisecondsThisFrame = DeltaSeconds * 1000;
FPlatformAtomics::InterlockedAdd(&ElapsedTimeSinceLastServerResponse, ElapsedMillisecondsThisFrame);
// Update response progress
if(Response.IsValid())
{
int32 ResponseBytes = Response->ProgressBytesRead.GetValue();
if(ResponseBytes > ProgressBytesSent)
{
ProgressBytesSent = ResponseBytes;
OnRequestProgress().ExecuteIfBound(SharedThis(this), RequestPayload.Num(), ResponseBytes);
}
}
// Convert to seconds for comparison to the timeout value
const float HttpTimeout = FHttpModule::Get().GetHttpTimeout();
// Log verbose once total elapsed time surpasses HttpTimeout
const double TotalElapsed = FPlatformTime::Seconds() - StartRequestTime;
if (HttpTimeout > 0 &&
TotalElapsed > HttpTimeout &&
!bDebugVerbose)
{
UE_LOG(LogHttp, Warning, TEXT("Http request taking too long! Elapsed %.3f. Enabling verbose logs %p url=%s"),
TotalElapsed, this, *GetURL());
bDebugVerbose = true;
}
// Timeout if no server response for HttpTimeout
const float SecondsSinceLastResponse = ElapsedTimeSinceLastServerResponse / 1000.f;
if (HttpTimeout > 0 &&
SecondsSinceLastResponse >= HttpTimeout)
{
UE_LOG(LogHttp, Warning, TEXT("Timeout processing Http request. %p url=%s"),
this, *GetURL());
// finish it off since it is timeout
FinishedRequest();
}
// No longer waiting for a response and done processing it
else if (CompletionStatus == EHttpRequestStatus::Processing &&
Response.IsValid() &&
Response->bIsReady &&
TotalElapsed >= FHttpModule::Get().GetHttpDelayTime())
{
FinishedRequest();
}
}
float FHttpRequestWinInet::GetElapsedTime()
{
return ElapsedTime;
}
// FHttpResponseWinInet
FHttpResponseWinInet::FHttpResponseWinInet(FHttpRequestWinInet& InRequest)
: Request(InRequest)
, RequestURL(InRequest.RequestURL)
, AsyncBytesRead(0)
, TotalBytesRead(0)
, ResponseCode(EHttpResponseCodes::Unknown)
, ContentLength(0)
, bIsReady(0)
, bResponseSucceeded(0)
Copying //UE4/Fortnite-Staging to //UE4/Main #lockdown nick.penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2806454 on 2015/12/16 by Bob.Tellez #UE4 Getting crash reporting working again on linux servers. Since -Unattended is now being passed BEFORE the target folder, the cmd line parsing code was failing so now it parses tokens and switches in a more general way. Also, diagnostics.txt had the incorrect case, since the d is supposed to be capitolized and the crash report processor is case sensitive. #rb Ben.Zeigler #codereview Dmitry.Rekman Change 2805502 on 2015/12/16 by Ben.Zeigler #UE4 Move ValidateEnumProperties into ValidateGeneratedClass, it was happening too early in the generation process so was being called at an invalid time. As a result of this ValidateEnumProperties will not be called correctly for compile on load blueprints, that issue is covered in UE-24569 #codereview mike.beach, bob.tellez Change 2805288 on 2015/12/16 by David.Nikdel #HTTP #HttpRetry - Add new Failed_ConnectionError code to EHttpRequestStatus to distinguish between connection errors and protocol errors. - Changed HTTP retry logic a little bit * If a response was received, retry on service-specific explicit HTTP codes (defaults to empty) * If a response was not received and we did not send a full request, automatically retry * If a response was not received and a request may have been sent, retry if the verb is GET or HEAD (should be idempotent) - Adjusted Curl/IOS/Mac/PS4/WinInet to try and distinguish Failed_ConnectionError where possible * Other systems will default to Failed which is ok (ConnectionError is an opportunistic categorization) * Opened a PS4 ticket to try to improve detection, but unfortunately there's no way (currently) to distinguish between send timeout, connection timeout, and receive timeout, the latter being the problematic case. - Removed the concept of global/default HTTP retry status codes. No system has enough knowledge to set those globally. * Individual requests still specify explicit "retryable" codes and McpServiceBase sets that on each request on a per-service basis #RB: Sam.Zamani #CodeReview: Sam.Zamani, Josh.Markiewicz, Alex.Fennell, Dmitry.Rekman, Sam.Spiro #Fixes: FORT-17804 Change 2803864 on 2015/12/15 by Bob.Tellez #UE4 Changed usage of !UE_SERVER to !IsRunningDedicatedServer in cases where we are preventing load attempts on UFonts. This is so running an editor build with -server works the same as running a cooked server. #rb Dmitry.Rekman #codereview Nick.Darnell Change 2803677 on 2015/12/15 by Billy.Bramer - Expose equality and inequality operators for gameplay attributes #rb Todd.Eckert Change 2802881 on 2015/12/14 by Bob.Tellez #UE4 InheritableComponentHandler no longer keeps records for components that we are no longer inheriting. #rb Phillip.Kavan, Maciej.Mroz #codereview Phillip.Kavan, Maciej.Mroz Change 2801636 on 2015/12/14 by Bob.Tellez #UE4 Returning package insert order for non-imports back to being after those of matching priorities unconditionally since this is what you want even when you are not using the asset registry to preload packages. #codereview Graeme.Thornton Change 2800400 on 2015/12/11 by Jonathan.Lindquist Submitting a new Pivot Painter Edition - now renders to textures - improved workflow - greater capabilities Change 2799579 on 2015/12/11 by John.Abercrombie [AUTOMERGE] Fixed EQS BP query wrappers getting GCed before wrapped query finishes #UE4 Fixes FORT-18649 - Patrols don't spawn consistently - The patrol blueprint was waiting (endlessly) for an EQS query to finish but because the wrapper could be GC-ed while the EQS query was running the delegate would never fire #rb me (this code was written by MieszkoZ) (removed code review for integration of Mieszko.Zielinski, Phil.Cole, Dominic.Barile) -------- Integrated using branch UE4-Fortnite-To-UE4-FortniteReleases/0.10 (reversed) of change#2799575 by John.Abercrombie on 2015/12/11 09:55:11. Change 2799018 on 2015/12/10 by Bob.Tellez #UE4 The asset registry tags stripped from cooked builds is now a blacklist by default that includes only the FiB tag. You can opt-in to using the whitelist by flipping the bUseAssetRegistryTagsWhitelistInsteadOfBlacklist flag. #rb Fred.Kimberley #codereview Peter.Knepley Change 2798926 on 2015/12/10 by Bob.Tellez #UE4 Removed some showflags from the list of "Fixed" showflags since they were actually in use at runtime in Fortnite in a scene capture. #jira FORT-18514 #codereview Martin.Mittring Change 2797758 on 2015/12/10 by Mark.Satterthwaite Defer calls to AUGraphUpdate into FCoreAudioDevice::UpdateHardware - this call will synchronise the calling thread with the CoreAudio thread/run-loop so that the CoreAudio graph is safe to modify and this may incur a significant stall. This means it is far more efficient to amortise the cost of all changes to the graph with a single call. To ensure correctness the audio format conversion components are cached and disposed of after the call to AUGraphUpdate so that any existing operations on the CoreAudio thread are completed prior to disposal. Change 2781204 on 2015/11/25 by Dmitry.Rekman Linux: use jemalloc by default if available. - Alleviates one of the reasons for player disconnect (FORT-18048), which was machines running OOM. #rb Bob.Tellez #codereview Bob.Tellez, Ben.Zeigler Change 2779398 on 2015/11/24 by Mark.Satterthwaite Switch the default graphics API on Mac back to OpenGL, but allow Metal to run with -metal (or -metalsm5 for experimental SM5 support).
2016-01-08 19:10:43 -05:00
, bRequestSent(0)
, MaxReadBufferSize(FHttpModule::Get().GetMaxReadBufferSize())
{
}
FHttpResponseWinInet::~FHttpResponseWinInet()
{
}
FString FHttpResponseWinInet::GetURL()
{
return RequestURL.GetURL();
}
FString FHttpResponseWinInet::GetURLParameter(const FString& ParameterName)
{
const FString* Result = RequestURL.GetParameter(ParameterName);
return Result != NULL ? *Result : FString();
}
FString FHttpResponseWinInet::GetHeader(const FString& HeaderName)
{
FString Result(TEXT(""));
if (!bIsReady)
{
UE_LOG(LogHttp, Warning, TEXT("Can't get cached header [%s]. Response still processing. %p"),
*HeaderName, &Request);
}
else
{
FString* Header = ResponseHeaders.Find(HeaderName);
if (Header != NULL)
{
return *Header;
}
}
return Result;
}
TArray<FString> FHttpResponseWinInet::GetAllHeaders()
{
TArray<FString> Result;
if (!bIsReady)
{
UE_LOG(LogHttp, Warning, TEXT("Can't get cached headers. Response still processing. %p"),&Request);
}
else
{
for (TMap<FString, FString>::TConstIterator It(ResponseHeaders); It; ++It)
{
Result.Add(It.Key() + TEXT(": ") + It.Value());
}
}
return Result;
}
FString FHttpResponseWinInet::GetContentType()
{
return GetHeader(TEXT("Content-Type"));
}
int32 FHttpResponseWinInet::GetContentLength()
{
return ContentLength;
}
const TArray<BYTE>& FHttpResponseWinInet::GetContent()
{
if (!bIsReady)
{
UE_LOG(LogHttp, Warning, TEXT("Payload is incomplete. Response still processing. %p"),&Request);
}
return ResponsePayload;
}
int32 FHttpResponseWinInet::GetResponseCode()
{
return ResponseCode;
}
FString FHttpResponseWinInet::GetContentAsString()
{
TArray<uint8> ZeroTerminatedPayload(GetContent());
ZeroTerminatedPayload.Add(0);
return UTF8_TO_TCHAR(ZeroTerminatedPayload.GetData());
}
void FHttpResponseWinInet::ProcessResponse()
{
// Keep track of total read from last async callback
TotalBytesRead += AsyncBytesRead;
// We might be calling back into this from another asynchronous read, so continue where we left off.
// if there is no content length, we're probably receiving chunked data.
ContentLength = QueryContentLength();
// Set buffer size based on content length or hard code if chunked response
int32 BufferSize = 0;
// For non-chunked responses, allocate one extra uint8 to check if we are sent extra content
if (ContentLength > 0)
{
if (TotalBytesRead == 0)
{
BufferSize = ContentLength + 1;
// Size read buffer
ResponsePayload.SetNum(BufferSize);
}
}
else
{
// For chunked responses, add data using a fixed size buffer at a time.
BufferSize = TotalBytesRead + MaxReadBufferSize;
// Size read buffer
ResponsePayload.SetNum(BufferSize);
}
bool bDebugLog = Request.bDebugVerbose;
bool bFailed = false;
int32 LoopCount = 0;
do
{
const int32 NumBytesToRead = FMath::Min<int32>(ResponsePayload.Num() - TotalBytesRead, MaxReadBufferSize);
// Read directly into the response payload
const BOOL bReadFile = InternetReadFile(
Request.RequestHandle,
&ResponsePayload[TotalBytesRead],
NumBytesToRead,
(LPDWORD)&AsyncBytesRead);
const int32 ErrorCode = GetLastError();
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("InternetReadFile result=%d error=%d (%u bytes read) (%u bytes total read) (%u bytes to read). LoopCount=%d %p"),
bReadFile, ErrorCode, AsyncBytesRead, TotalBytesRead, NumBytesToRead, LoopCount, &Request);
if (!bReadFile)
{
if (ErrorCode == ERROR_IO_PENDING)
{
// Chunked responses could cause InternetReadFile to return IO_PENDING, in which
// case the largely undocumented behavior is to return and wait for the callback function
// to be called again later when you receive another REQUEST_COMPLETE signal.
// You are supposed to keep doing this until InternetReadFile returns 0 with a successful return value.
DEBUG_LOG_HTTP(bDebugLog, VeryVerbose, TEXT("InternetReadFile is completing asynchronously, so waiting for callback again. %p"),
&Request);
}
else if (ErrorCode != ERROR_SUCCESS)
{
DEBUG_LOG_HTTP(bDebugLog, Log, TEXT("InternetReadFile failed (%u bytes read). Returning what we've read so far: error=%d %s. %p"),
AsyncBytesRead, ErrorCode, *InternetTranslateError(ErrorCode), &Request);
}
// Allow processing to continue
return;
}
else
{
// Keep track of total read so far
TotalBytesRead += AsyncBytesRead;
// resize the buffer if we don't know our content length, otherwise don't let the buffer grow larger than content length.
if (TotalBytesRead >= ResponsePayload.Num())
{
if (ContentLength > 0)
{
DEBUG_LOG_HTTP(bDebugLog, Log, TEXT("Response payload (%d bytes read so far) is larger than the content-length (%d). Resizing buffer to accommodate. %p"),
TotalBytesRead, ContentLength, &Request);
}
ResponsePayload.AddZeroed(MaxReadBufferSize);
}
}
LoopCount++;
// Update progress bytes
ProgressBytesRead.Set( TotalBytesRead );
Request.ResetRequestTimeout();
} while (AsyncBytesRead > 0);
if (ContentLength != 0 &&
TotalBytesRead != ContentLength)
{
DEBUG_LOG_HTTP(bDebugLog, Warning, TEXT("Response payload was %d bytes, content-length indicated (%d) bytes. %p"),
TotalBytesRead, ContentLength, &Request);
}
DEBUG_LOG_HTTP(bDebugLog, Verbose, TEXT("TotalBytesRead = %d. %p"), TotalBytesRead, &Request);
// Shrink array to only the valid data
ResponsePayload.SetNum(TotalBytesRead);
// Query for header data and cache it
ProcessResponseHeaders();
// Query for response code and cache it
ProcessResponseCode();
// Cache content length now that response is done
ContentLength = QueryContentLength();
// Mark as valid processed response
FPlatformAtomics::InterlockedExchange(&bResponseSucceeded, 1);
// Done processing
FPlatformAtomics::InterlockedExchange(&bIsReady, 1);
// Update progress bytes
ProgressBytesRead.Set( TotalBytesRead );
}
void FHttpResponseWinInet::ProcessResponseHeaders()
{
::DWORD HeaderSize = 0;
TArray<FString> Result;
if (!HttpQueryInfo(Request.RequestHandle, HTTP_QUERY_RAW_HEADERS_CRLF, NULL, &HeaderSize, NULL))
{
uint32 ErrorCode = GetLastError();
if (ErrorCode != ERROR_INSUFFICIENT_BUFFER)
{
UE_LOG(LogHttp, Warning, TEXT("HttpQueryInfo to get header length for all headers failed: %s. %p"),
*InternetTranslateError(GetLastError()), &Request);
}
if (HeaderSize == 0)
{
UE_LOG(LogHttp, Warning, TEXT("HttpQueryInfo for all headers returned zero header size. %p"), this);
}
TArray<TCHAR> HeaderBuffer;
HeaderBuffer.AddUninitialized(HeaderSize/sizeof(TCHAR));
if (!HttpQueryInfo(Request.RequestHandle, HTTP_QUERY_RAW_HEADERS_CRLF, HeaderBuffer.GetData(), &HeaderSize, NULL))
{
UE_LOG(LogHttp, Warning, TEXT("HttpQueryInfo for all headers failed: %s. %p"),
*InternetTranslateError(GetLastError()), &Request);
}
// parse all the key/value pairs
const TCHAR* HeaderPtr = HeaderBuffer.GetData();
// don't count the terminating NULL character as one to search.
const TCHAR* EndPtr = HeaderPtr + HeaderBuffer.Num()-1;
while (HeaderPtr < EndPtr)
{
const TCHAR* DelimiterPtr = FCString::Strstr(HeaderPtr, TEXT("\r\n"));
if (DelimiterPtr == NULL)
{
DelimiterPtr = EndPtr;
}
FString HeaderLine(DelimiterPtr-HeaderPtr, HeaderPtr);
FString HeaderKey,HeaderValue;
if (HeaderLine.Split(TEXT(":"), &HeaderKey, &HeaderValue, ESearchCase::CaseSensitive))
{
Copying //UE4/Fortnite-Staging to //UE4/Dev-Main (Source: //UE4/Fortnite-Staging @ 3026859) #rb none #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3016173 on 2016/06/16 by Lukasz.Furman fixed path updates in nested move tasks #jira FORT-25742 Change 3015722 on 2016/06/15 by Bob.Tellez #UE4 Avoiding a crash in FOnlinePartySystemMcp::PublishPartyInfoToPresence #JIRA OR-14102 Change 3015626 on 2016/06/15 by Bob.Tellez #UE4 Experimental fix for hitches involving spinlocks in windows. #JIRA FORT-25253 Change 3015473 on 2016/06/15 by Bob.Tellez #UE4 Compiling CrashReportClient in VS2013 instead of 2015 until we can figure out the appropriate way to install the redist on end-user machines. #JIRA FORT-25748 Change 3014721 on 2016/06/15 by Bob.Tellez #UE4 Returning false in cases where we want to skip replication of GameplayAbilities structures in NetDeltaSerialize. This fixes a bug where actors trying to become net dormant were not allowed because they were continuously reporting that they had data to replicate. #JIRA FORT-25689 Change 3014323 on 2016/06/15 by Rob.Cannaday When kicked from lobby beacon, restore the persistent party after leaving the previous persistent party #jira FORT-25407 #tests front end parties, being kicked from outpost lobby Change 3013712 on 2016/06/14 by Bob.Tellez #UE4 Fix DrawNetDriverDebug crash during map transitions Change 3013418 on 2016/06/14 by Mark.Satterthwaite Don't release Metal buffers directly into the buffer pool, instead defer this until the command-buffer is known to have finished. This prevents the CPU from trying to modify the buffer while the GPU is still reading it if the GPU has fallen so far behind the CPU and therefore eliminates one possible cause of invalid access on the GPU. #jira FORT-24510 Change 3013394 on 2016/06/14 by Mark.Satterthwaite Report Metal command-buffer failures in MetalQuery in the same way as MetalCommandList and make them fatal as well. This ensures that the game doesn't try to continue if the commands failed as that is unsafe. #jira FORT-24808 Change 3012977 on 2016/06/14 by Fred.Kimberley Add a blueprint exposed function to evaluate an attribute from a given base value. Change 3012755 on 2016/06/14 by Bob.Tellez #UE4 ExclusiveInternalFlags is now respected when passing in a null ObjectPackage in StaticFindObjectFastInternalThreadSafe #JIRA FORT-113 Change 3011948 on 2016/06/13 by Mark.Satterthwaite Workaround a Fortnite crash on launch for Mac OpenGL - one or more shaders are using the bit-cast operators (asuint(), asfloat()) that aren't available with GLSL version 150. In order to use them the GLSL version must be 330 which means switching the version tag at runtime. There will be Mac GPUs on 10.10.5 which don't correctly implement these instructions so this really isn't a fix - that would be to change shaders to not use SM5-level instructions. Change 3011659 on 2016/06/13 by Bob.Tellez #UE4 Better handling of checked state in SGameplayTagWidget::IsTagChecked. Checking direct child tags was not sufficient and also not needed since HasTag allows you to follow parent tags when checking for an explicit tag. Change 3011647 on 2016/06/13 by Rob.Cannaday Fix for multiple account login not kicking previous logins Client was not parsing response from backend. Client was expecting content-type to be "application/json" (using FString::Equals). Backend was returning "application/json;charset=UTF-8". Changed usage from FString::Equals to FString::StartsWith #jira FORT-25452 #tests multiple account login, frontend only Change 3011436 on 2016/06/13 by Nick.Cooper #UE4 - Added bRelativeToInitialFOV option to UCameraAnim, defaulting to true. If turned off, camera anims will use the camera's current FOV as the initial FOV for the animation #jira FORT-23606 Change 3010411 on 2016/06/12 by Bob.Tellez #UE4 Fix for a possible case where a reference to an async loading package that would contain a level gets replicated before the level it contains is fully serialized, causing network loading code client side to attempt to load the package even though it is not allowed to load maps. #jira FORT-113, FORT-22222 Change 3009885 on 2016/06/10 by Billy.Bramer #jira FORT-25361 [FORT-25361] Health and shield values are incorrect when slotting survivors with bonuses - Fix some resultant bugs from swapping attributes to be struct-based: - Fix issue wherein the initial creation of the client-side aggregator could be initialized with the computed final value from the server, resulting in incorrect client-side math - Fix issue where subsequent changes to the aggregator's base value on the client would be lost Change 3009514 on 2016/06/10 by Bob.Tellez #UE4 Remove final usage of the task graph in WmfMediaPlayer to dodge shutdown crashes. Change 3009197 on 2016/06/10 by Michael.Trepka Disabled reverb on Mac again. It's too expensive and doesn't fix FORT-22090 anyway Change 3008392 on 2016/06/09 by Ben.Zeigler #jira FORT-25244 Change it so application error codes like 400/404 do not cause the mcp to think it is disconnected from the backend. Only 408, 501, 502, and 504 now result in ServiceUnavailable. Change 3008106 on 2016/06/09 by Lukasz.Furman fixed cutting corners near navmesh obstacles in detour crowd's string pulling #jira FORT-24981 Change 3008039 on 2016/06/09 by Bob.Tellez #UE4 Fixed conversion of TAssetPtr to UObject* properties for the case where the referenced object is not already loaded. Change 3007864 on 2016/06/09 by Fred.Kimberley Updates to supporting attributes as structs. Adding functionality that makes them easier to use and override in projects. Change 3007682 on 2016/06/09 by Michael.Trepka Re-enabled reverb on Mac Change 3006971 on 2016/06/08 by Saul.Abreu #fortnite #jira FORT-25169 Added node costs types, cost amounts, and remaining balance for each cost type to the NodePurchase analytics event. Change 3006933 on 2016/06/08 by Chris.Gagnon Fixed up all the Power levle widget use cases. #Jira FORT-23472, FORT-24132, FORT-24144, FORT-24952, FORT-24924 Change 3006633 on 2016/06/08 by Dmitry.Rekman Linux: propagate ensure message to the CR (FORT-23030). - Without this, ensure() has a generic "SIGTRAP" error message, which is misleading for QA. #tests Tried "debug ensure" a few times, observed crash report (on the website) with the proper message #jira FORT-23030 Change 3006036 on 2016/06/08 by Rob.Cannaday Remove warning about missing "recentplayers" field. The absence of the field is gracefully handled in the client and is only absent if the list is absent on the server. #jira FORT-18687 Change 3005216 on 2016/06/07 by Bob.Tellez #UE4 Avoiding layout invalidation if you use SetEnabled to set an identical enabled state. This is the same as how SetVisibility works. Change 3004857 on 2016/06/07 by Rob.Cannaday Fix for incorrect reason displayed for inability to join party #jira FORT-13517 Change 3004811 on 2016/06/07 by Michael.Trepka Increased the number of input buses for CoreAudio 3D Mixer to support 64 audio channels. Also, added a warning to FAudioDevice::StartSources so it doesn't silently ignore sound source initialization failures. Change 3004553 on 2016/06/07 by Lukasz.Furman fixed AnySpawners activating before navmesh unlock & rebuild #jira FORT-25067 Change 3004083 on 2016/06/07 by Bob.Tellez #UE4 Fixing GenerateApplicationPath for monolithic games. Change 3003457 on 2016/06/06 by Bob.Tellez #UE4 Add a little info to a warning about failing to load a file for streaming. Change 3003256 on 2016/06/06 by Bob.Tellez #UE4 Fixed a bug where not having a crash report would cause CrashReportClient not not properly exit on Mac Change 3003146 on 2016/06/06 by jonathan.lindquist switching from a ceil and lerp technique to an if statement to provide better transform results. Change 3002048 on 2016/06/06 by Daniel.Broder Support for setting Scalar and Vector Materials by Index rather than by name on MIDs. This feature allows much better performance in cases where large numbers of parameters are being set per frame and where the indices can be cached by the calling code in an initialization step. #RB Stephan.Delmer #CodeReview Bob.Tellez #UE4 #ReleaseNote Change 3001315 on 2016/06/05 by Daniel.Broder Fixed crash that could occur when the FPhysScene* was null (the world has no PhysicsScene) in USkeletalMeshComponent::TermArticulated(). That could happen when loading a world without fully instantiating it, such as when right-clicking a world in the context browser rather than opening the world directly. #RB Stephan.Delmer Ori, I wasn't sure if the whole line (and the line below it using PScene) should be moved within the if (PhysScene) block or not, but this change seems to fix it. If they can safely be moved, that would be presumably more efficeint though (since we'd only compare vs. nullptr once). #CodeReview Ori.Cohen #UE4 #Fortnite #BugFix Change 3001001 on 2016/06/04 by Fred.Kimberley Added meta data about attributes and a post serialize function so we can recover attributes that have changed their type. Adding Fortnite specific attribute type specialization. This type enforces minimum and maximum values for attributes. Change 3000613 on 2016/06/03 by Sam.Spiro #fort online 24747 Take change from SamZ to get connection change delegates firing correctly Add a delegate to the frontend player controller to logout if the connection goes bad (when all retries have failed) #RB Ben.Zeigler Change 3000482 on 2016/06/03 by Rob.Cannaday Fix problem where newly added friends don't recognize party invitations #jira FORT-19415 From CL 2953432: Ignore presence updates for local user with different resources #jira OR-19929 #tests front end party invites Change 2998044 on 2016/06/02 by Lukasz.Furman fixed path box intersection test used to verify if hotspot is still required for updated path #jira FORT-24422 Change 2997948 on 2016/06/02 by Eric.Newman Moved ProdCom to bottom of file w/ deprecation comment, and clarified deprecation criteria. Will probably need to be removed in //UE4 first and check for any fallout from EC jobs failing Change 2997660 on 2016/06/02 by Chris.Wood Changed Linux server crash handler to force CRC log paths to match main engine log. [UE-30259] - Some server crashes are missing from crashreporter database Should allow us to have CRC logs uploaded to S3 along with main logs easily. Change 2996702 on 2016/06/01 by Bob.Tellez #UE4 You can now use Edit Asset on Level assets in the reference viewer. Change 2996683 on 2016/06/01 by Tim.Tillotson #fortnite Fix analytics comments, changed a few NULL to nullptr, and removed stale code. #JIRA FORT-23833 Change 2996548 on 2016/06/01 by Bob.Tellez #Fortnite Fixing up or deleting remaining references to homebase buildings. HBOnboarding_BuildHeroBuilding is the last reference now and it will be removed soon. Change 2996322 on 2016/06/01 by Bob.Tellez #UE4 Fix for specifying more than one ini override on the command line Change 2996306 on 2016/06/01 by Bob.Tellez #UE4 Delete unneeded and broken script to unlock files in xcode. Does not work since XCode 6.3. Change 2995634 on 2016/06/01 by Jonathan.Lindquist imrpoving the wind magnitude and noise texture Change 2995249 on 2016/05/31 by Bob.Tellez #UE4 Importing "INVALID" in FUniqueNetIdRepl no longer triggers the warning about using ImportText during cook. Change 2992135 on 2016/05/26 by Bob.Tellez #UE4 extern for GuardedMain in LaunchLinux to fix nonunity Change 2991912 on 2016/05/26 by jonathan.lindquist moved a texture sample into a new grouping Change 2991738 on 2016/05/26 by Bob.Tellez #UE4 Level SaveAs now duplicates the world before saving it. This fixes a problem where level assets had the same guids for objects saved in them, which causes LazyObjectPtr issues when they are both in memory at the same time since they can not be uniquely identified. Change 2991449 on 2016/05/26 by Lukasz.Furman AI Ftests will now delay spawning until navmesh is ready #fortnite Change 2990705 on 2016/05/25 by Chris.Gagnon New stats panel, upon stat changes there is a delta pop up. New Squads Tab. Navigation from nodes to squad slots working. Added GetAnimationCurrentTime() to UMG Animation API. #RB Fred.Kimberley, Saul.Abreu Change 2990286 on 2016/05/25 by Bob.Tellez #UE4 Fix logging error regarding max tag container replication size Change 2990285 on 2016/05/25 by Bob.Tellez #UE4 Fix for crash when using "ShowDebug Game" client side Change 2989977 on 2016/05/25 by Lukasz.Furman auto generating navigation bounds from building grid data, UnitNavMeshBounds volume is no longer required #fortnite Change 2989174 on 2016/05/24 by Bob.Tellez #UE4 Added GC reason to the log message declaring that we are doing a GC during the cook commandlet. Change 2988571 on 2016/05/24 by Jonathan.Lindquist submitting a fix for grass-like hierarchy layouts Change 2985428 on 2016/05/20 by Bob.Tellez Experimenting with making UGS CIS not rebuild UBT when incremental building. Change 2985319 on 2016/05/20 by Bob.Tellez #UE4 Removing NumActorChannelsReadyDormant stat as it is somewhat expensive to calculate. Change 2985258 on 2016/05/20 by Billy.Bramer - Add GetFloatAttributeBase and GetFloatAttributeBaseFromAbilitySystemComponent to AbilitySystemBlueprintLibrary, allows querying for a base value of an attribute Change 2985157 on 2016/05/20 by Bob.Tellez Experimenting with non-unity CIS Change 2984664 on 2016/05/19 by Bob.Tellez #UE4 Pasting multiple cells into the property matrix no longer depends on your selected tiles, only your target cell. This is to match the behavior in Excel. Pasting a single cell into multiple cells remains unchanged. Change 2984663 on 2016/05/19 by Bob.Tellez #UE4 Fixed a crash in the property matrix involving going into edit mode on rows that include widgets that are not editable. Change 2984613 on 2016/05/19 by Bob.Tellez #UE4 You can now text import gameplay tags by directly using the tag string (i.e. Evolution.Hero.Soldier). This allows pasting these strings directly into the property matrix or other property-based editors. Change 2984508 on 2016/05/19 by Billy.Bramer - Add constructors for the new struct based attribute Change 2983883 on 2016/05/19 by Lukasz.Furman disabled movement mode in EQS testing pawn to prevent it from falling at PIE start #ue4 Change 2983770 on 2016/05/19 by Bob.Tellez #UE4 Fixed a bug where "OutputToScreen" BP messages would get stuck disabled after a screenshot (using a number of different codepaths). All screenshots now preserve the state of the "suppress messages" bool. #JIRA FORT-24303 Change 2982306 on 2016/05/18 by Bob.Tellez Also experimenting with not updating version files in UGS CIS. Change 2982154 on 2016/05/18 by Lukasz.Furman changed navwalking geometry conforming to use building prop special case #jira FORT-24215 Change 2982019 on 2016/05/18 by Bob.Tellez Trying out incremental CIS builds Change 2981192 on 2016/05/17 by Bob.Tellez #UE4 No longer staging movie files for dedicated server builds. Change 2981023 on 2016/05/17 by Lukasz.Furman added new mode for NavWalking geometry conforming: prefer height closer to current one this should allow standing on top of props or walking off them in lower LOD, instead of moving at ground level - needed for survivors on low cars Change 2980578 on 2016/05/17 by Lukasz.Furman added option for disabling path replan in crowd manager, turned it off in fortnite this must be handled through path update events and corridor assignment or else hotspot detection will break #jira FORT-24116 Change 2980364 on 2016/05/17 by Lukasz.Furman unified bounds tests for applying navmesh modifiers, always expanding bounds one cell height on Z axis to cover for voxelization roundings #jira FORT-24045 Change 2980360 on 2016/05/17 by Lukasz.Furman more detailed logs for using custom navlinks #jira FORT-23990 Change 2979880 on 2016/05/16 by Bob.Tellez #UE4 Raising scalability threshold for high end machines to adjust for modern hardware. Change 2979522 on 2016/05/16 by Saul.Abreu #fortnite Added IsValid BP-exposed method for FGameplayAttribute (which is already a BP-exposed struct type), as there is no existing method of validating a gameplay attribute from blueprints. Useful for UI that represents an attribute. Change 2977690 on 2016/05/13 by Daniel.Broder Made most FBox functions FORCEINLINE to improve DebugGame performance. #Fortnite: This change (just on IsInsideOrOn()) improved DebugGame performance for one part of Wind performance in Fortnite by ~18%. #CodeReview Bob.Tellez #UE4 #ReleaseNotes Change 2977517 on 2016/05/13 by Daniel.Broder Added ForceInline to TIndexedContainerIterator<...>::operator!=(...). This change improved DebugGame performance of a for loop using ranged-based syntax by ~27%! #CodeReview Bob.Tellez #Fortnite Wind perf improvement in DebugGame builds. #UE4 #ReleaseNote Change 2974910 on 2016/05/11 by Bob.Tellez #UE4 More graceful handling of export class names in string asset references. Change 2974095 on 2016/05/11 by Bob.Tellez #UE4 Fixed a bug where the RenderTargetOutputFormat for velocity rendering when using r.BasePassOutputsVelocity=True was using the wrong output index. Change 2973663 on 2016/05/11 by John.Abercrombie [implemented by Ben.Marsh] UBT: Add a config setting to allow overriding the output directory for PCH files. To use, edit Engine\Saved\UnrealBuildTool\BuildConfiguration.xml and add: <BuildConfiguration> <PCHOutputDirectory>D:\TestOutputDir</PCHOutputDirectory> </BuildConfiguration> Change 2972603 on 2016/05/10 by Saad.Nader #Fort Added the catalyst to the requirements of an evolvable item. It will only disable the evolution button if there is a catalyst. Change 2971741 on 2016/05/09 by Bob.Tellez #UE4 Adding more context to an error message about serializing FUniqueNetIdRepl during cook. Change 2969838 on 2016/05/06 by Bob.Tellez #Fortnite Added FN PS4 to build scripts Change 2969542 on 2016/05/06 by Bob.Tellez #UE4 Fixed a crash that involved renaming SCS nodes during compile on load. #JIRA FORT-23754 Change 2969520 on 2016/05/06 by Billy.Bramer - Fix missing virtual destructor now that the initter struct has virtual members Change 2969467 on 2016/05/06 by Billy.Bramer - Change FAttributeSetInitter to only contain pure virtual functions in preparation for making it easier to provide a custom implementation per game - Change the existing example FAttributeSetInitter to be called FAttributeSetInitterDiscreteLevels, make it derive from FAttributeSetInitter (DiscreteLevels is now allocated by default for now) - Add support for the new struct-based attribute type to FAttributeSetInitterDiscreteLevels - Fix typos in the initter - Convert usages of FString in AbilitySystemGlobals to FStringAssetReference, where appropriate - Allow attribute init data to come from several curve tables instead of just one - Remove reimport bindings from attribute metadata and global curve table, as neither was in use Change 2969279 on 2016/05/06 by John.Abercrombie Behavior tree auxilary nodes, parallel tasks, active tasks, and aborting tasks shouldn't be ticked while the behavior tree is paused Change 2966311 on 2016/05/04 by Rob.Cannaday Fix PS4 Orion players being able to whisper chat with non-Orion players #jira OR-20626 #tests chat with launcher, fortnite (From //Orion/Dev-General CL 2963555) Change 2966255 on 2016/05/04 by Bob.Tellez #UE4 Added an ensure to track down the cause of FORT-23604 and to gracefully recover from what would have been a crash. #JIRA FORT-23604 Change 2966083 on 2016/05/04 by Bob.Tellez #UE4 Adjusted material quality level for "Medium" settings to medium quality. High quality is still used in High and Epic scalability levels. Change 2965669 on 2016/05/04 by Nicholas.Davies Change the restricted platform ID to PSN to prevent Fortnite > PS4 paragon whisper chat #OPP-5268 Integrate PS4 Chat block Social and OSS code to Fortnite, UT, and Launcher #RB Antony.Carter Change 2965316 on 2016/05/03 by Ben.Zeigler #jira FORT-23600 Fix issue where stalled mcp queries never finished. This causes the query to properly fail Manual merge of CL #2907874: When MCP cancels a request due to its required auth failing, the http retry system would never kick off the complete delegates. This was due to the system only adding a request to its list once ProcessRequest was called, which does not happen in the above case. The fix is to add the request to the list when it is cancelled if we did not find it. Change 2965164 on 2016/05/03 by Bob.Tellez #UE4 Fix for Crash in WmfMedia for when the player is destroyed while loading media. Thanks MaxP! Change 2963754 on 2016/05/02 by Billy.Bramer - Switch ability system from binding to OnPostWorldCreation to PreLoadMap for its cleanup functions, as OnPostWorldCreation is called repeatedly with sublevels and can cause data loss - This is a bit of a stopgap, as where and when this happens should probably be configured per game (example: a long session game like an MMO would want to trigger these on something other than a map transition possibly) Change 2962922 on 2016/05/02 by Lukasz.Furman fixed gameplay debugger in "simulate in editor" mode Change 2959860 on 2016/04/28 by David.Nikdel #OGF #McpProfile - Add Profile Write Lock support to client API NOTE: Still need to finish backend support so haven't been able to test yet but this is enough for API hookup NOTE2: You may see a log message about "write lock unexpectedly released" when you do your first command after locking. This is expected because the backend isn't sending down the write lock timeout yet. #CodeReview: Ben.Zeigler Change 2959810 on 2016/04/28 by Jonathan.Lindquist A few more saftey measures to warn the user of incorrect settings and faulty meshes. (In response a licensee's question) Change 2959336 on 2016/04/28 by Bob.Tellez #UE4 Some improvements to asset save time: Added an early-out in PackageBackup to avoid inspecting files in cases where we don't care about the resutls. Also now using GetObjectsWithOuter when passing in a package list to GetObjectsInPackages (which probably should be renamed to GetAssetsInPackage) Change 2958942 on 2016/04/28 by Jonathan.Lindquist Wrote a new portion of pivot painter 2 that unifies edge normals across multiple static meshes Change 2958644 on 2016/04/27 by Jonathan.Lindquist lowering default recursive steps Change 2956612 on 2016/04/26 by Jonathan.Lindquist A few new saftey measures Change 2956197 on 2016/04/26 by Fred.Kimberley Fix a bug where a delegate won't be fired if the base value of an attribute has been changed and the attribute is the new type and doesn't have an aggregator. Fix a bug in gameplay effect tag matching where the deprecated tag is being checked but not the current one. Change 2955386 on 2016/04/25 by Jonathan.Lindquist Fixed a ui bug related to the first time path geo generator is run Pivot painter 2 has a new feature. It duplicates each model in a hierarchy, combines them and then welds their verts. Change 2955230 on 2016/04/25 by Billy.Bramer - Add a debug gameplay tag to string blueprint function, should only be used for debugging purposes Change 2954899 on 2016/04/25 by Fred.Kimberley Added a new backing data type for gameplay attributes. The new type holds both the current and base values. Currently, this new type can coexist with numeric types for gameplay attributes. Change 2953511 on 2016/04/22 by Bob.Tellez #UE4 Bumping up texture streaming pool allowance for min spec and redistributing mid an high to match. Also reduced mip bias at min spec. Change 2953496 on 2016/04/22 by Chris.Gagnon When the console closes it now properly restores the viewports input state (both focus and capture). Change 2952930 on 2016/04/22 by Lukasz.Furman fixed behavior tree getting stuck on instantly finished gameplay tasks #jira FORT-23041 Change 2951765 on 2016/04/21 by John.Abercrombie Removed unused code when initializing attribute sets Change 2951617 on 2016/04/21 by Jonathan.Lindquist new elements to the grass shader to include wind influence also adding a test model and the latest version of canopy creator Change 2950861 on 2016/04/21 by Jonathan.Lindquist Submitting a new material for grass so that it may react to the wind New wind test maps Functions to support global wind a new "fuzzy" mat functions Adding wind to the rift portals Change 2950725 on 2016/04/20 by Bob.Tellez Fixups for non NewEC in GetLastSucceededCL Change 2950695 on 2016/04/20 by Bob.Tellez Adding a small helper function to get the last succeeded CL of a given node. Change 2950616 on 2016/04/20 by Maury.Mountain hook up the pivot (+ (0,-1,0)) section of material function that was causing offset motion from pivots Change 2950207 on 2016/04/20 by Bob.Tellez #UE4 NoTimeouts is now respected even in the initial connection timeout. This fixes a bug where a large stall when starting pie causes you to transition to the entry map. Change 2950162 on 2016/04/20 by Lukasz.Furman fixed processing of repath requests, added infinite loop protection #jira FORT-23090 Change 2949974 on 2016/04/20 by Lukasz.Furman another batch of fixes for hotspot tasks getting out of sync: abort move is now ignored if instigated by new task at goal, clearing hotspot data on dying while gameplay tasks are still accessible, ignoring move resume when controller is being destroyed Change 2949923 on 2016/04/20 by Rob.Cannaday FOnlineIdentityMcp: Cancel ClientAuthRequests and ExternalAuthRequests on shutdown #tests PIE start game / shutdown Change 2949210 on 2016/04/19 by Bob.Tellez #UE4 Removing all local players from the game instance when it is shut down. This ensures that local players are properly torn down and events related to the lifespan of the player or controller are fired when exiting the game normally. #JIRA FORT-23024 Change 2947381 on 2016/04/18 by Rob.Cannaday Change XMPP presence, pubsub, messages, multi user chat, and chat's ref counting to be thread safe #jira FORT-22861 #tests front end partying Change 2945301 on 2016/04/15 by Michael.Trepka Reset SyncStatus in FAvfMediaVideoTrack::SeekToTime to fix issues with video not updating after rewind Change 2944422 on 2016/04/14 by Michael.Trepka Fixed Mono compile errors in UAT Change 2944375 on 2016/04/14 by Fred.Kimberley Changed how we handle missing gameplay tags so we now ensure once per missing tag instead of only ensuring on the first missing gameplay tag. Change 2944040 on 2016/04/14 by Michael.Trepka Fixed a problem with CoreAudio AudioUnitGraph update caused by adding and deleting the same node in a single tick Change 2943864 on 2016/04/14 by Lukasz.Furman fixed initialization order of gameplay debugger replicators on client #jira FORT-22885 Change 2943228 on 2016/04/13 by Bob.Tellez #UE4 Moved the addition of the IsDataOnly tag out of the if (ParentClass) block. Tags should not be dynamically added like this or else they can not be discovered by the editor which relies on asking the CDO for the tags relevant to an asset type. Change 2942303 on 2016/04/13 by Daniel.Broder Added support to be able to set a CanvasRenderTarget2D NOT to clear to green whenever it's updated (so you can just draw pixels that have changed instead of always having to redraw everything. #RB Bob.Tellez #UE4 Change 2941919 on 2016/04/13 by Jonathan.Lindquist Adding a new maxscript that allows artists to procedurally generate trees. Change 2941816 on 2016/04/13 by Saul.Abreu Demoted errors regarding widget-bound properties when first compling a new created widget blueprint - otherwise an ensure occurs. Change 2941752 on 2016/04/12 by jonathan.lindquist adding a new function to optimize trees and fix a few issues Change 2941519 on 2016/04/12 by Jonathan.Lindquist submitting a new warning regarding file unit types Change 2940980 on 2016/04/12 by John.Abercrombie Turned Graphs off by default in the Visual Logger Change 2940134 on 2016/04/11 by Billy.Bramer - Add support for new overrideable function OnPostDataImport to FTableRowBase; Can be override to perform custom parsing, fix-up, etc. per struct type whenever a data table is imported or reimported - Change row struct combo box on the data table importer to be sorted alphabetically Change 2938828 on 2016/04/08 by David.Hunt #FN || Economy Rebuild Updating several code references to items and item paths that no longer exist, with Bob's help. This fixes FORT-22784 (hopefully for real) and several other build and item errors. It also indicates that the various redirector issues I have been experiencing were likely red herrings - they were C++ defaults that were showing up on items that had nothing set, as opposed to redirects that failed. #CodeReview Bob.Tellez, Ben.Zeigler, William.Ewen, Carlos.Cuello Change 2938675 on 2016/04/08 by Lukasz.Furman fixed gameplay debugger displaying paths of killed pawns #fortnite Change 2938426 on 2016/04/08 by Rob.Cannaday Implement new command line party invitation format into Fortnite #jira FORT-22685 #tests launch with command line party invite Integrate CLs 2908339 and 2917498 from Orion Change 2938367 on 2016/04/08 by Billy.Bramer - Mark the reimport data table factory with UNREALED_API for external use - Change CSVImportFactory to respect the class of existing data being reimported upon Change 2937319 on 2016/04/07 by Lukasz.Furman improved gameplay task info in gameplay debugger tool Change 2937178 on 2016/04/07 by Lukasz.Furman fixed aborting undermine tasks when player becomes reachable #jira FORT-22240, FORT-22077 Change 2937166 on 2016/04/07 by Saul.Abreu Fixed redundant typename in TPair that was causing clang compilation errors. Change 2937093 on 2016/04/07 by Saul.Abreu #fortnite Made ElementSetType protected again in the Map family. Change 2937044 on 2016/04/07 by Saul.Abreu Tweaked Set/Map family of data structures to expose the typedefs for their key, value, and pair types. Change 2936940 on 2016/04/07 by Bob.Tellez #UE4 Fixed a bug that prevented the log summary from being printed after a blueprint compile. Change 2936696 on 2016/04/07 by Bob.Tellez #UE4 Blueprint names are once again part of Blueprint compile log messages. Change 2936572 on 2016/04/07 by Lukasz.Furman added more debug logs for tracking rare NaN error in player movement #jira FORT-19426 Change 2934892 on 2016/04/06 by Lukasz.Furman fixed updating hotspot information after all tasks instigated by it are finished #jira FORT-22515 Change 2933664 on 2016/04/05 by Michael.Trepka Fixed a rare crash in USoundNodeLooping::NotifyWaveInstanceFinished Change 2933554 on 2016/04/05 by Lukasz.Furman fixed taker's portal move (priorities of gameplay tasks spawned by path following) #jira FORT-22482 Change 2933343 on 2016/04/05 by John.Abercrombie Changed FGameplayAbilityActorInfo's AnimInstance property to a SkeletalMeshComponent in case AnimInstances are ever changed on a SkeletalMeshComponent - AnimInstance can be used through an accessor Change 2933300 on 2016/04/05 by Lukasz.Furman fixed number of spawned AI in FTests using PreSpawnDelay #fortnite Change 2933171 on 2016/04/05 by Lukasz.Furman added PreSpawnDelay param to function test spawn sets #fortnite Change 2931072 on 2016/04/01 by Lukasz.Furman changed pawn actions to gameplay tasks #jira FORT-21314 Change 2930987 on 2016/04/01 by Billy.Bramer - Add method to data table to get all rows as a type - Add metadata tag for data table rows to report columns as DataTableImportOptional, at which point they will not be warned against if missing during import (this allows games to do custom post-import fix-up or synthesis of data w/o expecting it to be imported) - Use new method for getting all tags to fix FORT-20563 "Gameplay tag table import checks by numerical row name for no reason" Change 2929651 on 2016/03/31 by Nick.Cooper #Fortnite - Fixed Actor AttachmentReplication not being cleared on detachment, which would cause issues with the actor's location for clients joining in progress #jira FORT-21330 #RB ben.zeigler Change 2929360 on 2016/03/31 by Daniel.Broder Fixed bug where CanvasRenderTarget2D assets would crash on load in editor due to trying to update the asset during post-load. Thanks to Bob for what I needed to check to early-out and avoid the crash. #RB Bob.Tellez #UE4 Change 2928845 on 2016/03/31 by Nicholas.Davies Add fix for chat text not clearing #jira FORT-22049 Textbox does not clear when text is sent through chat Change 2928574 on 2016/03/30 by Ben.Zeigler Fix issue with redirectors not working properly for blueprint function libraries. When a blueprint got regenerated it patched the old export, but failed to clear the "load failed" flag, so it would fail to find it when later pointed to by a redirect Change 2928572 on 2016/03/30 by Ben.Zeigler #Jira FORT-20763 Fix issue with "Server re-loading object" warning going off for deleted actors. It now only logs, and only for things that are going to successfully load Change 2928436 on 2016/03/30 by Bob.Tellez #UE4 Added Canvas Render Target factory and asset type actions so you can create them in the content browser and search for them after they are created. Change 2928372 on 2016/03/30 by Bob.Tellez #UE4 Added verbose message about animation assets that need to be resaved due to resetting the skeleton. Change 2926805 on 2016/03/29 by Bob.Tellez #UE4 Made SetOverallScalabilityLevel virtual so game-specific features can be updated based on a single-value level. Change 2926752 on 2016/03/29 by Bob.Tellez #UE4 Using DesiredScreenHeight is now optional. Often games use ResolutionQuality as purely a way to run better on slower machines so it should be controlled entirely by scalability. Change 2926189 on 2016/03/29 by Rob.Cannaday Change storing HTTP requests as raw pointers to weak pointers with validity being checked via Pinning it #jira FORT-18947 #jira OR-17695 #tests golden path Change 2924921 on 2016/03/28 by Lukasz.Furman removed log message showing as navmesh generation error when it skips over degenerated poly #fortnite Change 2924843 on 2016/03/28 by Lukasz.Furman added more debug logs for navmesh's failed triangulate() #jira FORT-22186 Change 2924719 on 2016/03/28 by Lukasz.Furman fixed offmesh link connection issue causing path portal edges to have duplicated data and breaking hotspot detection traces #jira FORT-22132 Change 2921698 on 2016/03/24 by Lukasz.Furman fixed EQS instancing queries by debug name instead of using unique one, fixed debug name on asset duplication #fortnite Change 2920395 on 2016/03/23 by Bob.Tellez #UE4 Added a call to FBaseServiceMcp::Shutdown() in FOnlineServiceAvailabilityMcp::Shutdown. The parent class doesnt do anything today, but this may fix a bug in the future. Change 2920343 on 2016/03/23 by Ben.Zeigler In ConvertScalarUPropertyToJsonValue, move the execution of the custom callback up above the specific property types. This is needed to allow us to override the TextProperty export, and allows overriding in general. It can have a performance implication if the custom callback is very slow #RB josh.markiewicz Change 2920310 on 2016/03/23 by Bob.Tellez #UE4 FOnlineServiceAvailabilityMcp::Init was not invoking the Superclass' Init Change 2920254 on 2016/03/23 by Aaron.McLeran FORT-22090 Re-disabling reverb. Will add an ini-based disabling ability but this CL quickly re-disables to resolve volume issue on FN and (hopefully) bypass crash mentioned in FORT-22037 Change 2920249 on 2016/03/23 by Rob.Cannaday Fix for crash in FOnlinePartySystemMcp::InternalCleanUpPartyMember Don't trigger "member left" type events if we are leaving the party #jira FORT-20422 #jira FORT-21726 Change 2920178 on 2016/03/23 by Bob.Tellez #UE4 Calling the platform-specific implementation of StackWalkAndDump when invoking StackWalkAndDumpEx. This fixes a bug in Windows where the first ensure does not produce a callstack. Change 2919858 on 2016/03/23 by Bob.Tellez #UE4 Fix for ensure about accessing a CVar in UParticleModuleLight on a non-game thread using GetValueOnGameThread. I changed this to GetValueOnAnyThread. Change 2919775 on 2016/03/23 by Bob.Tellez #UE4 Restoring enforced uniqueness in FUObjectAnnotationSparseSearchable and put all manipulations of InverseAnnotationMap in critical sections. This will make RemoveAnnotation fast again. Change 2919233 on 2016/03/22 by Bob.Tellez #UE4 Removing a warning that is pretty chatty in our cooked logs. Change 2919125 on 2016/03/22 by Bob.Tellez #UE4 Added ParticleLightQuality scalability setting since lower-end machines have trouble with particle lights. They are disabled on low and medium spec machines. HQ lights are only allowed on high-end machines. Change 2918831 on 2016/03/22 by Bob.Tellez #UE4 Fixed a bug where WinInet response headers were not properly being trimmed. #JIRA FORT-22054 Change 2917722 on 2016/03/21 by Ben.Zeigler Remove FortniteServer module and move those classes to FortniteGame. The engine doesn't support classes that only exist on servers but not clients, so this fixes a lot of error spam bugs, and should improve compile times Resave assets that directly referenced FortniteServer Change 2917588 on 2016/03/21 by Bob.Tellez #UE4 Fixed shadow variable that I introduced Change 2914169 on 2016/03/17 by Ben.Zeigler Disable extra logging that was added to track down Auth issues, they look to be resolved Change 2912626 on 2016/03/16 by Bob.Tellez #UE4 Success messages should not be warnings. Change 2911171 on 2016/03/15 by Bob.Tellez #UE4 Minor fix to correctly display GetBulkDataSize in the warning in FUntypedBulkData::WaitForAsyncLoading Change 2911170 on 2016/03/15 by Billy.Bramer #jira [FORT-6139] Trap models persist after destroying supporting structure in Outpost - Root issue was caused by error within network dormancy and queued bunches: If a dormant actor's open bunch ended up queued and a close bunch came in before the bunch was processed, the actor would never be properly destroyed client side as a result of not re-establishing the channel's actor pointer - Fix issue by changing close bunches to not be fully processed until their appropriate place in the queue. While this could cause superfluous execution (i.e. actor recreated just to be immediately destroyed), it should respect gameplay programming intent in regards to RPCs Change 2911009 on 2016/03/15 by Bob.Tellez #UE4 Fixed a bug in UHierarchicalInstancedStaticMeshComponent where RemoveInstances would not rebuild the ClusterTree, causing SortedInstances to contain incorect indices in GetInstancesOverlappingBox. This is the behavior of the singular RemoveInstance so this is what should also be done in the plural RemoveInstances. #JIRA FORT-21605 Change 2910295 on 2016/03/15 by Bob.Tellez #UE4 World thumbnails no longer cull primitives. This is because the camera is very far away and if terrain pieces are culled, the level is not visible. Change 2909324 on 2016/03/14 by Bob.Tellez #UE4 Since empty headers values cause GenerateHeaderBuffer to emit ERROR_HTTP_HEADER_NOT_FOUND, they are now omitted from the header buffer in WinInet. Change 2905920 on 2016/03/11 by Lukasz.Furman fixed crowd simulation getting stuck with invalid velocity (moonwalking husks) #fortnite Change 2905612 on 2016/03/11 by Bob.Tellez #UE4 Made the minimum quadtree size configurable in ProceduralFoliageSpawner. You need to reduce the minimum size a little if you are spawning very many small foliage meshes. [CL 3027184 by Bob Tellez in Main branch]
2016-06-24 16:58:12 -04:00
HeaderKey = HeaderKey.Trim().TrimTrailing();
HeaderValue = HeaderValue.Trim().TrimTrailing();
Copying //UE4/Dev-Networking to Dev-Main (//UE4/Dev-Main) ========================== MAJOR FEATURES + CHANGES ========================== Change 2814968 on 2016/01/04 by John.Pollard Remove warning per connection when same warning happens at net driver level Change 2815271 on 2016/01/04 by John.Pollard Fix header uploads in replays showing wrong size #rb none #tests Compiled, confirmed correct size Change 2830613 on 2016/01/15 by John.Barrett Added better ability for unit tests to test socket-level netcode Full changes: - Added flag for auto-reconnecting on connection close - Added hook for socket level sends - Added ability to block socket-level sends and pre-PacketHandler LowLevelSend's - Added ability for net connections to force-enable packet handlers, even if presently off in the engine #rb none Change 2830617 on 2016/01/15 by John.Barrett@JC2Q-LT_UE4 Enabled NetcodeUnitTest in Linux, and other minor updates. #rb none Change 2830621 on 2016/01/15 by John.Barrett@JC2Q-LT_UE4 Added 'PacketLimitTest' and 'PacketLimitTest_Oodle' unit tests, for testing/verifying that MaxPacket limits are respected, through testing with Bunches and with raw sends passed through PacketHandlers (such as Oodle). #rb none Change 2832402 on 2016/01/18 by Bart.Bressler@bart.bressler_Dev_Networking Always use the physical platform file when writing out steam_appid.txt, because it has to live next to executable that's being run (CotF builds will output it to the wrong location). #rb josh.markiewicz #tests checked that steam_appid.txt was written to the correct place with both CotF and cooked builds Change 2833728 on 2016/01/19 by Joe.Conley@Joe.Conley_EGJWD5708_Dev-Networking-Minimal Fix for UE-20017 - "Http server headers implemented as TMaps and are overridden". Just changing TMaps to TMultiMaps. Haven't modified the behavior of GetHeader(), which will still return the first header that matches. Change 2844880 on 2016/01/26 by Joe.Conley Fix for UE-20017 Http server headers implemented as TMaps and are overridden Previously had submitted a fix that changes the request and response headers TMap into a MultiMap, but the consensus was that it would be better to leave them as TMaps, but allow appending onto the existing entry for a given request header with an "AppendToHeader" function, and to concatenate entries for the same header name in the response headers. In both cases, entries for the same header name are concatenated with ", ". Mac and iOS already had the desired behavior for responses, just added the AppendToHeader function to their request classes. HTML5 still has no implementation of response headers, filed as separate JIRA issue UE-26047. #platformnotify josh.adams Change 2859343 on 2016/02/08 by Bart.Bressler Default MaxSearchResults in FOnlineSessionSearch objects to 1 instead of 0 - otherwise, the FOnlineAsyncTaskSteamFindServerBase tasks will complete right away without searching for sessions. Also print a warning in the task if this will happen. #codereview josh.markiewicz Change 2862352 on 2016/02/10 by Bart.Bressler Fix demo.SkipTime cvar to work with negative values #rb john.pollard Change 2866624 on 2016/02/14 by John.Barrett Fix plugin commandlet crash. #rb none Change 2866627 on 2016/02/14 by John.Barrett Added NetDriver/PacketHandler ability to send/receive connectionless packets - i.e. packets not associated with a UNetConnection. Removed 'bEnabled' from PacketHandler - PacketHandler is now a default always-on part of the Engine. Added 'CountBits' to LowLevelSend, to support bit-level additions to packets from PacketHandler's, and refactored related code. #codereview John.Pollard Change 2866628 on 2016/02/14 by John.Barrett Added an HMAC (Hash-based Message Authentication Code) generating function, to the SHA-1 code - for use with performing secure net connection handshakes. #rb none Change 2866629 on 2016/02/14 by John.Barrett Added 'stateless handshake' to UE4, allowing a handshake to be performed without any open UNetConnection - making it more difficult for DoS attacks to consume memory resources. #codereview John.Pollard Change 2866630 on 2016/02/14 by John.Barrett Updated Oodle to support new stateless handshake. #rb none Change 2866631 on 2016/02/14 by John.Barrett Updated NetcodeUnitTest to work with new connectionless/stateless handshake changes. Compiles, but netcode presently needs fixing. #rb none Change 2868367 on 2016/02/16 by John.Barrett Updated NetcodeUnitTest to work with stateless handshakes (now fixed connecting). Also fixed further commandlet problems. #rb none Change 2878025 on 2016/02/23 by John.Barrett Immediately stop processing zero-size packets, to prevent CPU utilization during DDoS. Log IP of new connections, post-stateless-challenge (first time we know IP is verified). #codereview john.pollard Change 2883776 on 2016/02/26 by John.Barrett Fixed beacons to work with stateless handshake. Change 2886773 on 2016/02/29 by John.Barrett Made PacketHandler bit overhead align upwards to the next byte - this wastes more bits than necessary, but is required as a temporary fix. Change 2887801 on 2016/03/01 by John.Pollard Use correct default values when initializing shadow state for replication. Fixes issues with certain components and actors that have default values that differ from CDO. [CL 2901490 by John Pollard in Main branch]
2016-03-09 13:54:33 -05:00
if (!HeaderKey.IsEmpty() && !HeaderValue.IsEmpty())
{
Copying //UE4/Dev-Networking to Dev-Main (//UE4/Dev-Main) ========================== MAJOR FEATURES + CHANGES ========================== Change 2814968 on 2016/01/04 by John.Pollard Remove warning per connection when same warning happens at net driver level Change 2815271 on 2016/01/04 by John.Pollard Fix header uploads in replays showing wrong size #rb none #tests Compiled, confirmed correct size Change 2830613 on 2016/01/15 by John.Barrett Added better ability for unit tests to test socket-level netcode Full changes: - Added flag for auto-reconnecting on connection close - Added hook for socket level sends - Added ability to block socket-level sends and pre-PacketHandler LowLevelSend's - Added ability for net connections to force-enable packet handlers, even if presently off in the engine #rb none Change 2830617 on 2016/01/15 by John.Barrett@JC2Q-LT_UE4 Enabled NetcodeUnitTest in Linux, and other minor updates. #rb none Change 2830621 on 2016/01/15 by John.Barrett@JC2Q-LT_UE4 Added 'PacketLimitTest' and 'PacketLimitTest_Oodle' unit tests, for testing/verifying that MaxPacket limits are respected, through testing with Bunches and with raw sends passed through PacketHandlers (such as Oodle). #rb none Change 2832402 on 2016/01/18 by Bart.Bressler@bart.bressler_Dev_Networking Always use the physical platform file when writing out steam_appid.txt, because it has to live next to executable that's being run (CotF builds will output it to the wrong location). #rb josh.markiewicz #tests checked that steam_appid.txt was written to the correct place with both CotF and cooked builds Change 2833728 on 2016/01/19 by Joe.Conley@Joe.Conley_EGJWD5708_Dev-Networking-Minimal Fix for UE-20017 - "Http server headers implemented as TMaps and are overridden". Just changing TMaps to TMultiMaps. Haven't modified the behavior of GetHeader(), which will still return the first header that matches. Change 2844880 on 2016/01/26 by Joe.Conley Fix for UE-20017 Http server headers implemented as TMaps and are overridden Previously had submitted a fix that changes the request and response headers TMap into a MultiMap, but the consensus was that it would be better to leave them as TMaps, but allow appending onto the existing entry for a given request header with an "AppendToHeader" function, and to concatenate entries for the same header name in the response headers. In both cases, entries for the same header name are concatenated with ", ". Mac and iOS already had the desired behavior for responses, just added the AppendToHeader function to their request classes. HTML5 still has no implementation of response headers, filed as separate JIRA issue UE-26047. #platformnotify josh.adams Change 2859343 on 2016/02/08 by Bart.Bressler Default MaxSearchResults in FOnlineSessionSearch objects to 1 instead of 0 - otherwise, the FOnlineAsyncTaskSteamFindServerBase tasks will complete right away without searching for sessions. Also print a warning in the task if this will happen. #codereview josh.markiewicz Change 2862352 on 2016/02/10 by Bart.Bressler Fix demo.SkipTime cvar to work with negative values #rb john.pollard Change 2866624 on 2016/02/14 by John.Barrett Fix plugin commandlet crash. #rb none Change 2866627 on 2016/02/14 by John.Barrett Added NetDriver/PacketHandler ability to send/receive connectionless packets - i.e. packets not associated with a UNetConnection. Removed 'bEnabled' from PacketHandler - PacketHandler is now a default always-on part of the Engine. Added 'CountBits' to LowLevelSend, to support bit-level additions to packets from PacketHandler's, and refactored related code. #codereview John.Pollard Change 2866628 on 2016/02/14 by John.Barrett Added an HMAC (Hash-based Message Authentication Code) generating function, to the SHA-1 code - for use with performing secure net connection handshakes. #rb none Change 2866629 on 2016/02/14 by John.Barrett Added 'stateless handshake' to UE4, allowing a handshake to be performed without any open UNetConnection - making it more difficult for DoS attacks to consume memory resources. #codereview John.Pollard Change 2866630 on 2016/02/14 by John.Barrett Updated Oodle to support new stateless handshake. #rb none Change 2866631 on 2016/02/14 by John.Barrett Updated NetcodeUnitTest to work with new connectionless/stateless handshake changes. Compiles, but netcode presently needs fixing. #rb none Change 2868367 on 2016/02/16 by John.Barrett Updated NetcodeUnitTest to work with stateless handshakes (now fixed connecting). Also fixed further commandlet problems. #rb none Change 2878025 on 2016/02/23 by John.Barrett Immediately stop processing zero-size packets, to prevent CPU utilization during DDoS. Log IP of new connections, post-stateless-challenge (first time we know IP is verified). #codereview john.pollard Change 2883776 on 2016/02/26 by John.Barrett Fixed beacons to work with stateless handshake. Change 2886773 on 2016/02/29 by John.Barrett Made PacketHandler bit overhead align upwards to the next byte - this wastes more bits than necessary, but is required as a temporary fix. Change 2887801 on 2016/03/01 by John.Pollard Use correct default values when initializing shadow state for replication. Fixes issues with certain components and actors that have default values that differ from CDO. [CL 2901490 by John Pollard in Main branch]
2016-03-09 13:54:33 -05:00
FString* PreviousValue = ResponseHeaders.Find(HeaderKey);
FString NewValue;
if (PreviousValue != nullptr && !PreviousValue->IsEmpty())
{
NewValue = (*PreviousValue) + TEXT(", ");
}
Copying //UE4/Orion-Staging to //UE4/Main (Source //Orion/Dev-General @ 2927258) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2927181 on 2016/03/29 by Dmitry.Rekman (Optionally) exclude idle time from server FPS charts. - Time spent waiting for the next frame in order to hit capped FPS can be optionally excluded by using t.FPSChart.ExcludeIdleTime (set to 1 for servers). - Server FPS charts analytics events and log output will include the information if idle time was excluded. - Also: added a log line each time we detect a server hitch for easier pin-pointing them in the log. #rb Paul.Moore #codereview Paul.Moore, Michael.Noland #tests Ran Linux server and Windows client on compatible content. Change 2927084 on 2016/03/29 by Ben.Marsh BuildGraph: Don't allow triggers to run until all their order dependencies are complete. Just because a downstream node doesn't have a dependency on an upstream node via temp storage doesn't mean it can run immediately. #rb none #tests none Change 2927060 on 2016/03/29 by Michael.Noland Renamed GPU analytics event from GPU to DesktopGPU to reflect that it is the default desktop adapter and not the one we initialized (which is GPUAdapter) Updated text/log based FPS chart events to print out GPUAdapter instead (with DesktopGPU in parens if they differ, e.g., in an optimus setup) #rb marcus.wassmer #tests Ran and did some fps charts Change 2927048 on 2016/03/29 by Michael.Noland HLOD: Removed an unused cvar r.HLODEnabled (everything is done thru r.HLOD) #tests Compiled and ran Paragon #rb marcus.wassmer Change 2926920 on 2016/03/29 by Ben.Marsh BuildGraph: Update schema with Rename task. Change 2926911 on 2016/03/29 by Ben.Marsh BuildGraph: Add a task which can rename files matching a given wildcard. Syntax is: <Rename Files="*.txt" To="*.md"> or <Rename Files="Engine/Build/..." From="*.txt" To="*.md"/> #rb none #tests none Change 2926908 on 2016/03/29 by Andrew.Grant Fix for CDO properties of renamed blueprints not being applied #rb none #tests loaded Origin map (renamed from Playgo3) and verified properties are applied. Change 2926799 on 2016/03/29 by Jason.Bestimt #ORION_DG - Merge MAIN (23) @ CL# 2926780 #RB:none #Tests:none Change 2926663 on 2016/03/29 by david.nikdel #ROBOMERGE-OBO: jason.bestimt #ROBOMERGE-SOURCE: CL 2926660 in //Orion/Release-0.23/... via CL 2926662 #ROBOMERGE-BOT: ORION (Main -> Dev-General) #ORION_23 - Potential fix for Cook failures "Fix shelved in 2926635, tested in Dev-Blueprints. Could not run any GEditor related logic safely in ShutdownModule because of the same destruction issue orders that caused the bug in the first place. I will chat with Editor team about nulling out GEditor the same way we null out GUnrealEd." #RB:none #Tests: none [CodeReviewed]: andrew.grant, dan.oconnor Change 2926510 on 2016/03/29 by Andrew.Grant Potential fix for OR-18207 - editor becomes unresponsive (audio deadlock) #rb none #tests compiled Change 2926495 on 2016/03/29 by Rob.Cannaday Change storing HTTP requests as raw pointers to weak pointers with validity being checked via Pinning it #jira FORT-18947 #jira OR-17695 #tests golden path #rb eric.newman Change 2926427 on 2016/03/29 by Josh.Markiewicz #UE4 - fixed typo #rb none #tests none Change 2926250 on 2016/03/29 by Martin.Mittring fixed OR-18489 HERO: IGGY: RMB on E ability causes blinding hair effect #rb:Chris.Bunner #codereview:Brian.Karis Change 2926224 on 2016/03/29 by Daniel.Lamb Fix for potenital threading issue with Console manager removing vars which could cause double free. #rb Robert.Manuszewski #test Orion cook Change 2926174 on 2016/03/29 by Gareth.Martin Cloned fix for bUseMaterialPositionOffsetInStaticLighting crashing across from //UE4/Dev-Landscape/ to unblock people #rb #tests editor Change 2925968 on 2016/03/29 by David.Nikdel #MCP #OSS - Read RedirectUrl from ini #RB: Eric.Newman #TESTS: compiled in another branch (merge over) #ROBOMERGE: Main [CL 2929424 by Andrew Grant in Main branch]
2016-03-31 15:18:30 -04:00
NewValue += HeaderValue.Trim();
Copying //UE4/Dev-Networking to Dev-Main (//UE4/Dev-Main) ========================== MAJOR FEATURES + CHANGES ========================== Change 2814968 on 2016/01/04 by John.Pollard Remove warning per connection when same warning happens at net driver level Change 2815271 on 2016/01/04 by John.Pollard Fix header uploads in replays showing wrong size #rb none #tests Compiled, confirmed correct size Change 2830613 on 2016/01/15 by John.Barrett Added better ability for unit tests to test socket-level netcode Full changes: - Added flag for auto-reconnecting on connection close - Added hook for socket level sends - Added ability to block socket-level sends and pre-PacketHandler LowLevelSend's - Added ability for net connections to force-enable packet handlers, even if presently off in the engine #rb none Change 2830617 on 2016/01/15 by John.Barrett@JC2Q-LT_UE4 Enabled NetcodeUnitTest in Linux, and other minor updates. #rb none Change 2830621 on 2016/01/15 by John.Barrett@JC2Q-LT_UE4 Added 'PacketLimitTest' and 'PacketLimitTest_Oodle' unit tests, for testing/verifying that MaxPacket limits are respected, through testing with Bunches and with raw sends passed through PacketHandlers (such as Oodle). #rb none Change 2832402 on 2016/01/18 by Bart.Bressler@bart.bressler_Dev_Networking Always use the physical platform file when writing out steam_appid.txt, because it has to live next to executable that's being run (CotF builds will output it to the wrong location). #rb josh.markiewicz #tests checked that steam_appid.txt was written to the correct place with both CotF and cooked builds Change 2833728 on 2016/01/19 by Joe.Conley@Joe.Conley_EGJWD5708_Dev-Networking-Minimal Fix for UE-20017 - "Http server headers implemented as TMaps and are overridden". Just changing TMaps to TMultiMaps. Haven't modified the behavior of GetHeader(), which will still return the first header that matches. Change 2844880 on 2016/01/26 by Joe.Conley Fix for UE-20017 Http server headers implemented as TMaps and are overridden Previously had submitted a fix that changes the request and response headers TMap into a MultiMap, but the consensus was that it would be better to leave them as TMaps, but allow appending onto the existing entry for a given request header with an "AppendToHeader" function, and to concatenate entries for the same header name in the response headers. In both cases, entries for the same header name are concatenated with ", ". Mac and iOS already had the desired behavior for responses, just added the AppendToHeader function to their request classes. HTML5 still has no implementation of response headers, filed as separate JIRA issue UE-26047. #platformnotify josh.adams Change 2859343 on 2016/02/08 by Bart.Bressler Default MaxSearchResults in FOnlineSessionSearch objects to 1 instead of 0 - otherwise, the FOnlineAsyncTaskSteamFindServerBase tasks will complete right away without searching for sessions. Also print a warning in the task if this will happen. #codereview josh.markiewicz Change 2862352 on 2016/02/10 by Bart.Bressler Fix demo.SkipTime cvar to work with negative values #rb john.pollard Change 2866624 on 2016/02/14 by John.Barrett Fix plugin commandlet crash. #rb none Change 2866627 on 2016/02/14 by John.Barrett Added NetDriver/PacketHandler ability to send/receive connectionless packets - i.e. packets not associated with a UNetConnection. Removed 'bEnabled' from PacketHandler - PacketHandler is now a default always-on part of the Engine. Added 'CountBits' to LowLevelSend, to support bit-level additions to packets from PacketHandler's, and refactored related code. #codereview John.Pollard Change 2866628 on 2016/02/14 by John.Barrett Added an HMAC (Hash-based Message Authentication Code) generating function, to the SHA-1 code - for use with performing secure net connection handshakes. #rb none Change 2866629 on 2016/02/14 by John.Barrett Added 'stateless handshake' to UE4, allowing a handshake to be performed without any open UNetConnection - making it more difficult for DoS attacks to consume memory resources. #codereview John.Pollard Change 2866630 on 2016/02/14 by John.Barrett Updated Oodle to support new stateless handshake. #rb none Change 2866631 on 2016/02/14 by John.Barrett Updated NetcodeUnitTest to work with new connectionless/stateless handshake changes. Compiles, but netcode presently needs fixing. #rb none Change 2868367 on 2016/02/16 by John.Barrett Updated NetcodeUnitTest to work with stateless handshakes (now fixed connecting). Also fixed further commandlet problems. #rb none Change 2878025 on 2016/02/23 by John.Barrett Immediately stop processing zero-size packets, to prevent CPU utilization during DDoS. Log IP of new connections, post-stateless-challenge (first time we know IP is verified). #codereview john.pollard Change 2883776 on 2016/02/26 by John.Barrett Fixed beacons to work with stateless handshake. Change 2886773 on 2016/02/29 by John.Barrett Made PacketHandler bit overhead align upwards to the next byte - this wastes more bits than necessary, but is required as a temporary fix. Change 2887801 on 2016/03/01 by John.Pollard Use correct default values when initializing shadow state for replication. Fixes issues with certain components and actors that have default values that differ from CDO. [CL 2901490 by John Pollard in Main branch]
2016-03-09 13:54:33 -05:00
ResponseHeaders.Add(HeaderKey, NewValue);
}
}
HeaderPtr = DelimiterPtr + 2;
}
}
else
{
UE_LOG(LogHttp, Warning, TEXT("HttpQueryInfo for all headers failed when trying to determine the size for the header buffer. %p"),
&Request);
}
}
void FHttpResponseWinInet::ProcessResponseCode()
{
// get the response code
ResponseCode = EHttpResponseCodes::Unknown;
::DWORD CodeSize = sizeof(ResponseCode);
if (!HttpQueryInfo(Request.RequestHandle, HTTP_QUERY_STATUS_CODE | HTTP_QUERY_FLAG_NUMBER, &ResponseCode, &CodeSize, NULL))
{
UE_LOG(LogHttp, Warning, TEXT("HttpQueryInfo for response code failed: %s. %p"),
*InternetTranslateError(GetLastError()), &Request);
}
}
FString FHttpResponseWinInet::QueryHeaderString(uint32 HttpQueryInfoLevel, const FString& HeaderName) const
{
// try to use stack allocation where possible.
::DWORD HeaderSize = 0;
TCHAR HeaderValue[128];
TArray<TCHAR> HeaderValueLong;
TCHAR* HeaderValueReal = HeaderValue;
if (!HttpQueryInfo(Request.RequestHandle, HttpQueryInfoLevel, const_cast<TCHAR*>(*HeaderName), &HeaderSize, NULL))
{
uint32 ErrorCode = GetLastError();
if (ErrorCode == ERROR_HTTP_HEADER_NOT_FOUND)
{
return FString();
}
else if (ErrorCode == ERROR_INSUFFICIENT_BUFFER)
{
// make sure we have enough room to supply the HeaderName and Value. If not, dynamically allocate.
uint32 HeaderSizeChars = HeaderSize / sizeof(TCHAR) + 1;
uint32 HeaderNameChars = HeaderName.Len() == 0 ? 0 : HeaderName.Len() + 1;
if (HeaderSizeChars > ARRAYSIZE(HeaderValue) || HeaderNameChars > ARRAYSIZE(HeaderValue))
{
// we have to create a dynamic allocation to hold the result.
UE_LOG(LogHttp, Verbose, TEXT("Having to resize default buffer for retrieving header %s. Name length: %u. Value length: %u. %p"),
*HeaderName, HeaderNameChars, HeaderSizeChars, &Request);
uint32 NewBufferSizeChars = FMath::Max(HeaderSizeChars, HeaderNameChars);
// Have to copy the HeaderName into the buffer as well for the API to work.
if (HeaderName.Len() > 0)
{
HeaderValueLong = HeaderName.GetCharArray();
}
// Set the size of the array to hold the entire value.
HeaderValueLong.SetNum(NewBufferSizeChars);
HeaderSize = NewBufferSizeChars * sizeof(TCHAR);
HeaderValueReal = HeaderValueLong.GetData();
}
else
{
// Use the stack allocated space if we have the room.
FMemory::Memcpy(HeaderValue, *HeaderName, HeaderName.Len()*sizeof(TCHAR));
HeaderValue[HeaderName.Len()] = 0;
}
if (!HttpQueryInfo(Request.RequestHandle, HttpQueryInfoLevel, HeaderValueReal, &HeaderSize, NULL))
{
UE_LOG(LogHttp, Warning, TEXT("HttpQueryInfo failed trying to get Header Value for Name %s: %s. %p"),
*HeaderName, *InternetTranslateError(GetLastError()), &Request);
return FString();
}
}
}
return FString(HeaderValueReal);
}
int32 FHttpResponseWinInet::QueryContentLength() const
{
int32 Result = 0;
FString ContentLengthStr(QueryHeaderString(HTTP_QUERY_CONTENT_LENGTH, FString()));
if (ContentLengthStr.Len() > 0)
{
Result = FCString::Strtoi(*ContentLengthStr, NULL, 10);
}
return Result;
}
// FURLWinInet
FURLWinInet::FURLWinInet()
{
ClearCachedData();
}
FURLWinInet::FURLWinInet( const FString& InURL ) :RequestURL(InURL)
{
ClearCachedData();
}
FURLWinInet::FURLWinInet( const FURLWinInet& InURL ) :RequestURL(InURL.RequestURL)
{
ClearCachedData();
}
FURLWinInet& FURLWinInet::operator=( const FURLWinInet& InURL )
{
if (this != &InURL)
{
RequestURL = InURL.RequestURL;
ClearCachedData();
}
return *this;
}
const FString& FURLWinInet::GetURL() const
{
return RequestURL;
}
FString FURLWinInet::GetHost() const
{
if (URLPtr == NULL) CrackUrlParameters();
if (URLPtr != NULL)
{
return FString(URLParts.dwHostNameLength, URLParts.lpszHostName);
}
return FString();
}
WORD FURLWinInet::GetPort() const
{
if (URLPtr == NULL) CrackUrlParameters();
if (URLPtr != NULL)
{
return URLParts.nPort;
}
return 0;
}
FString FURLWinInet::GetPath() const
{
if (URLPtr == NULL) CrackUrlParameters();
if (URLPtr != NULL)
{
return FString(URLParts.dwUrlPathLength, URLParts.lpszUrlPath);
}
return FString();
}
FString FURLWinInet::GetExtraInfo() const
{
if (URLPtr == NULL) CrackUrlParameters();
if (URLPtr != NULL)
{
return FString(URLParts.dwExtraInfoLength, URLParts.lpszExtraInfo);
}
return FString();
}
const URL_COMPONENTS& FURLWinInet::GetURLComponents() const
{
if (URLPtr == NULL) CrackUrlParameters();
return URLParts;
}
const FString* FURLWinInet::GetParameter( const FString& ParameterName ) const
{
if (URLPtr == NULL) CrackUrlParameters();
return URLParameters.Find(ParameterName);
}
void FURLWinInet::ClearCachedData() const
{
URLPtr = NULL;
URLParameters.Reset();
FMemory::Memzero(URLParts);
}
void FURLWinInet::CrackUrlParameters() const
{
// used to make sure we can't early exit from this function without cleaning up.
struct FClearCachedDataGuard
{
FClearCachedDataGuard(const FURLWinInet& InURL)
: bClearCachedData(true),
CachedURL(InURL)
{}
~FClearCachedDataGuard()
{
if (bClearCachedData)
{
CachedURL.ClearCachedData();
}
}
bool bClearCachedData;
const FURLWinInet& CachedURL;
};
FClearCachedDataGuard CachedDataGuard(*this);
// don't crack anything if the request is empty
if (RequestURL.IsEmpty())
{
return;
}
URLPtr = *RequestURL;
// crack open the URL into its component parts
URLParts.dwStructSize = sizeof(URLParts);
URLParts.dwHostNameLength = 1;
URLParts.dwUrlPathLength = 1;
URLParts.dwExtraInfoLength = 1;
if (!InternetCrackUrl(URLPtr, 0, 0, &URLParts))
{
UE_LOG(LogHttp, Warning, TEXT("Failed to crack URL parameters for URL:%s"), *RequestURL);
return;
}
// make sure we didn't fail.
FString Result;
if (URLParts.dwExtraInfoLength > 1)
{
if (URLParts.lpszExtraInfo[0] == TEXT('?'))
{
const TCHAR* ParamPtr = URLParts.lpszExtraInfo+1;
const TCHAR* ParamEnd = URLParts.lpszExtraInfo+URLParts.dwExtraInfoLength;
while (ParamPtr < ParamEnd)
{
const TCHAR* DelimiterPtr = FCString::Strchr(ParamPtr, TEXT('&'));
if (DelimiterPtr == NULL)
{
DelimiterPtr = ParamEnd;
}
const TCHAR* EqualPtr = FCString::Strchr(ParamPtr, TEXT('='));
if (EqualPtr != NULL && EqualPtr < DelimiterPtr)
{
// This will handle the case of Key=&Key2=Value... by allocating a zero-length string with the math below
URLParameters.Add(FString(EqualPtr-ParamPtr, ParamPtr), FString(DelimiterPtr-EqualPtr-1, EqualPtr+1));
}
else
{
URLParameters.Add(FString(DelimiterPtr-ParamPtr, ParamPtr), FString());
}
ParamPtr = DelimiterPtr + 1;
}
}
else
{
UE_LOG(LogHttp, Warning, TEXT("URL '%s' extra info did not start with a '?', so can't parse headers."), *RequestURL);
}
}
CachedDataGuard.bClearCachedData = false;
}