Skip to content

Replaced originalRequest on filters with new HttpMessageInfo object #243

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

Merged
merged 3 commits into from
May 25, 2015

Conversation

jekh
Copy link
Collaborator

@jekh jekh commented May 24, 2015

This PR replaces the originalRequest parameter on the RequestFilter and ResponseFilter with a new object, HttpMessageInfo. The new object provides access to the originalRequest, as well as an isHttps() method, the full URL (of the original request), and the client's ChannelHandlerContext.

The main motivator for this change was a recognition that we will want to expose additional data to the filters in the future. If we add them as interface parameters, the interface will become unmanageable, and every change will break all existing code. By placing these additional message parameters into an object, we can continue to add fields over time without breaking existing code.

Major thanks to @NozomiIto for bringing this issue to light in issue #238!

@jekh jekh added this to the 2.1.0-beta-1 milestone May 24, 2015
jekh added a commit that referenced this pull request May 25, 2015
Replaced originalRequest on filters with new HttpMessageInfo object
@jekh jekh merged commit 79fb0b5 into lightbody:master May 25, 2015
@jekh jekh deleted the refactor-additional-filter-data branch June 29, 2015 16:44
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.

1 participant