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

PluginContext.constructors.Request(request, data) does not replicate headers #612

Closed
scottinet opened this issue Jan 5, 2017 · 0 comments · Fixed by #613
Closed

PluginContext.constructors.Request(request, data) does not replicate headers #612

scottinet opened this issue Jan 5, 2017 · 0 comments · Fixed by #613
Assignees
Labels

Comments

@scottinet
Copy link
Contributor

When building a new Request object for plugins, using PluginContext.constructors.Request, we should copy almost all informations from the provided Request.

This is to help plugin developers, as it has been found confusing for them to understand why the new Request object is almost empty, since they provide the source request.

Additional information to replicate in the new request object:

  • request.input.args: contains protocol headers, which should be replicated to the new request object. Same goes for request specific arguments, which will be overridded anyway by plugin developers if needed
  • request.input.resource: plugin developer will always override these if needed, and it seems normal that the new request point to the same resources than the provided one
@scottinet scottinet added the bug label Jan 5, 2017
@scottinet scottinet self-assigned this Jan 5, 2017
scottinet added a commit that referenced this issue Jan 5, 2017
benoitvidis added a commit that referenced this issue Jan 11, 2017
[MASTER] Hotfix #612: Request objects created by PluginContext do not replicate informations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant