-
-
Notifications
You must be signed in to change notification settings - Fork 284
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
feat(linux): add headers to URL scheme request #721
Conversation
There's a race condition could cause page freeze right now. |
I finally found the cause. So it seems the binding from |
@lucasfernog These methods require webkit2gtk 2.36. I think I probably need to add a feature flag for it. How do you think tauri should do? Also a flag to use it? |
@wusyong can we detect the webkit2gtk version at runtime and not call the API if the version is below 2.36? I think that would be the safest approach. |
Yes we can. I'll try this approach then. |
Add a config flag is_2_36 to detect if the webkit2gtk can call advanced methods. Now we can add http headers and method in request, status code in response.
remove 2d canvas acceleration config since it's deprecated and it doesn't really accelerate either.
wry/src/webview/webkitgtk/web_context.rs Line 255 in 16a7086
It looks like this doesn't support POST with bodies, say for example JSON in the POST request body. Is there a reason why the body is being set to the empty vector? Does WebKitURISchemeRequest have no way of getting the body? I tried this in an app sending POST's with JSON and the custom scheme handler can't see those. I'm happy to dig into this and try to get to a pull request if there's interest from the tauri side. |
@chairmanwow WebKitURISchemeRequest doesn't expose it yet. That's why there's still issue #666 for it. If you are interested in this, I suppose you can open a PR in Webkit directly to add it. |
Yikes, understood. Thanks for the effort and for clarifying the why for me. |
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information