-
Notifications
You must be signed in to change notification settings - Fork 953
coolwsd: feat: implement internal proxy handler #13754
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
Draft
Rash419
wants to merge
24
commits into
main
Choose a base branch
from
private/rashesh/coolwsd-internal-proxy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f754c7c to
585d3f5
Compare
8908638 to
9a0a160
Compare
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: I4a9722d1471c4fb611124e23bcfe56256d7567c2
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: I9d5012e227b4f25d7109836a9501762d4c6c9a68
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: I18f42a987404ae5af79730f9f55b7c43e55fe058
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: Icb109aed6c9af2db880beb28574ab3a1ce6cbbc5
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: Ifda245f3df603021e754a97a8ec5fee4d628b8cc
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: Ibfdb4f1e5815661afa2740cb7b9874dc2b281801
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: I9c9ec757022d9df02bb45d0c79bd1db5c416e293
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: Ib747c65632f1b30821a0b77a28ee48ae15754800
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: I2ba626aa2b3e2d3db7ef918f081f715b92567fb2
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: I87d81814f1f959af822df1098a6ac9ad657c69d2
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: I99a398b3285d42f8f9661066ad9976b53983d591
- socket was inserted to proxy poll before handler was set which can a timing where data can be forwarded to old handler as socket was inserted before handler was set. Signed-off-by: Rashesh Padia <[email protected]> Change-Id: I88c095d695681b5c7a273209d845d34be74857ab
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: Iad129cddedc20bca79f0b91e1c14a64ee05067c1
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: Id5ef754b858647126cde2d4327cd5d823f506866
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: I4b930b276d99c2bbd6c32fad28db1c56d442ca3b
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: I9ff16ee40929385628508916af83ee11b7913a27
Ensure client socket is inserted into ProxyPoll and error responses are scheduled there, so the socket is polled and data gets flushed. Signed-off-by: Rashesh Padia <[email protected]> Change-Id: I621c9358629f83e8b07c3cd542b43c483b9a9937
connection might fail after socket creation Signed-off-by: Rashesh Padia <[email protected]> Change-Id: Ie0caee72d5febb2972d32aee62f132777109833d
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: If5b3d09cfc3aab1a2b8b406b0e8d88b082597233
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: I612c1f56fbfa67c3275130f89e8adf59d1088d55
- UnitFlowControl already test the same functionality with backpressure which make UnitInternalProxy test redundant Signed-off-by: Rashesh Padia <[email protected]> Change-Id: Ib718fa8a51c59e8cef0b6cd500047616e42f010c
UnitInternalProxy.cpp uses CaptureHandler to capture the data received on clientsocket Signed-off-by: Rashesh Padia <[email protected]> Change-Id: I11248335f05a5c036a07c0b270c187bb0d243dd3
```
./wsd/ProxyPoll.hpp:23:26: error: instance allocated on the stack, create it with std::shared_ptr [coplugin:refcounting]
23 | static ProxyPoll poll;
| ^~~~
wsd/ProxyPoll.cpp:115:10: error: Only SocketPoll can have std::shared_ptr<Socket> as a member. Everything else should have std::weak_ptr<Socket> [coplugin:socketPoll]
115 | [clientSocket, proxiedRequest = std::move(proxiedRequest), targetHandler](
| ^~~~~~~~~~~~
wsd/ProxyPoll.cpp:130:18: error: Only SocketPoll can have std::shared_ptr<Socket> as a member. Everything else should have std::weak_ptr<Socket> [coplugin:socketPoll]
130 | [targetSocket, clientSocket, proxiedRequest]()
| ^~~~~~~~~~~~
wsd/ProxyPoll.cpp:130:32: error: Only SocketPoll can have std::shared_ptr<Socket> as a member. Everything else should have std::weak_ptr<Socket> [coplugin:socketPoll]
130 | [targetSocket, clientSocket, proxiedRequest]()
| ^~~~~~~~~~~~
4 errors generated.
make[2]: *** [Makefile:4231: wsd/admin_fuzzer-ProxyPoll.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from wsd/ClientRequestDispatcher.cpp:40:
./wsd/ProxyPoll.hpp:23:26: error: instance allocated on the stack, create it with std::shared_ptr [coplugin:refcounting]
23 | static ProxyPoll poll;
| ^~~~
wsd/ClientRequestDispatcher.cpp:2571:40: error: Only SocketPoll can have std::shared_ptr<Socket> as a member. Everything else should have std::weak_ptr<Socket> [coplugin:socketPoll]
2571 | [this, controllerURL, wopiSrc, socket,
| ^~~~~~
2 errors generated.
```
Signed-off-by: Rashesh Padia <[email protected]>
Change-Id: I517a5af2ab1b610493e039d4dc04833bfdb5c3f7
9a0a160 to
5a7020f
Compare
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: I9b6767ea1520307ad7f537e833af51f461d7bf50
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change-Id: I4a9722d1471c4fb611124e23bcfe56256d7567c2