Skip to content
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

1.7.13 http listeners #631

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open

1.7.13 http listeners #631

wants to merge 40 commits into from

Conversation

oliverhausler
Copy link

@oliverhausler oliverhausler commented Dec 20, 2018

Added HttpListener

  • With this change, netty-socket-io can be used for regular http requests on the same port, based on the path and without affecting socket.io.

image

image

I removed config.setAllowCustomRequests() as we can derive that setting from the number of HttpListeners being set (no listeners -> no custom requests).

Http requests are currently not wired through the AuthorizationListener, only socket.io requests. We may need to manage this or add a second AuthorizationListener. Not sure.

Code also needs to be documented, but I would want to get a first feedback, and if you want to merge this at all.

Improved AuthorizationListener

  • In case of a redirect or error, the AuthorizationListener can now respond with a complete response, which gives control over response status, body and headers. A socket.io request can be terminated early or redirected, or a specific error status can be returned to the caller, without establishing the socket.io socket at all (which would be quite expensive).
  • The AuthorizationListener can seed the client store. Instead creating an empty store after authorization, setClientData() will put data into the client store, which can later be retrieved as client.get().

PR is based on 1.7.13 (last stable version).

Oliver Hausler added 30 commits November 24, 2018 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant