mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-23 20:36:58 +02:00
net: accept a NULL user agent in sceHttpCreateTemplate (Cyberpunk 2077)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "common/abi.h"
|
||||
#include "libs/network.h"
|
||||
#include "loader/symbolDatabase.h"
|
||||
|
||||
#include <array>
|
||||
@@ -162,6 +163,17 @@ void TestBuildHonoursOption(HttpUriParse parse, HttpUriBuild build) {
|
||||
CHECK(BuildWith(build, element, 0) == url);
|
||||
}
|
||||
|
||||
// Cyberpunk 2077 (PPSA03974) creates a template with a NULL user agent.
|
||||
void TestTemplateWithoutUserAgent() {
|
||||
using namespace Libs::Network;
|
||||
Initialize();
|
||||
const int pool = Net::NetPoolCreate("http", 0x10000, 0);
|
||||
const int ssl = Ssl::SslInit(0x10000);
|
||||
const int http = Http::HttpInit(pool, ssl, 0x10000);
|
||||
CHECK(Http::HttpCreateTemplate(http, nullptr, 2, 1) > 0);
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int main() {
|
||||
@@ -176,5 +188,6 @@ int main() {
|
||||
TestAbsentQuery(parse);
|
||||
TestEmptyUri(parse);
|
||||
TestPresentQuery(parse);
|
||||
TestTemplateWithoutUserAgent();
|
||||
return failures == 0 ? 0 : 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user