-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for GET requests and code update for UE 5.4 #6
base: develop
Are you sure you want to change the base?
Conversation
bool FPsWebServerHandlerImpl::handlePost(CivetServer* Server, mg_connection* RequestConnection) | ||
{ | ||
// Unique request id | ||
const FGuid RequestId = FGuid::NewGuid(); | ||
|
||
const auto Handler = OwnerHandler.Load(); | ||
if (!Handler || Handler->IsPendingKill()) | ||
if (!Handler || Handler == nullptr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to use !IsValid(Handler)
as a replacement for !Handler || Handler->IsPendingKill()
. These are basically the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, it hadn't occurred to me for some reason
@@ -166,7 +197,7 @@ FString FPsWebServerHandlerImpl::GetResponseData(const FGuid& RequestId, bool bT | |||
Context.CancellationSource.Cancel(); | |||
|
|||
const auto Handler = OwnerHandler.Load(); | |||
if (Handler && !Handler->IsPendingKill()) | |||
if (Handler && Handler == nullptr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to use IsValid(Handler)
as a replacement for Handler && !Handler->IsPendingKill()
.
@@ -27,6 +27,9 @@ class FPsWebServerHandlerImpl : public CivetHandler, public TSharedFromThis<FPsW | |||
public: | |||
FPsWebServerHandlerImpl(); | |||
|
|||
/** Handle POST requests */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** Handle GET requests */
Changes made in this pull-request include:
UObjectBaseUtility::IsPendingKill()
is deprecated)