Skip to content

Commit

Permalink
fix(runtime/webview): fix 'NSData' to 'bytes::Buffer' conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed Jan 9, 2025
1 parent b34477c commit c962bb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/runtime/app/app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace ssc::runtime::app {
gtk_init_check(0, nullptr);
#elif SOCKET_RUNTIME_PLATFORM_MACOS
this->delegate = [SSCApplicationDelegate new];
this->delegate.app = this;
this->delegate.app = App::sharedApplication();
NSApplication.sharedApplication.delegate = this->delegate;
#elif SOCKET_RUNTIME_PLATFORM_WINDOWS
OleInitialize(nullptr);
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/webview/scheme_handlers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ namespace ssc::runtime::webview {
SchemeHandlers::Request::Builder& SchemeHandlers::Request::Builder::setBody (size_t size, const unsigned char* bytes) {
if (this->request->method == "POST" || this->request->method == "PUT" || this->request->method == "PATCH") {
if (size > 0 && bytes != nullptr) {
this->request->body.set(bytes, 0, size);
this->request->body = bytes::Buffer::from(bytes, size);
}
}
return *this;
Expand Down

0 comments on commit c962bb4

Please sign in to comment.