Skip to content

server onRequest handler no longer requires a socket in the request#9332

Merged
cjcenizal merged 1 commit intoelastic:masterfrom
meganwalker-ibm:master
Dec 10, 2016
Merged

server onRequest handler no longer requires a socket in the request#9332
cjcenizal merged 1 commit intoelastic:masterfrom
meganwalker-ibm:master

Conversation

@meganwalker-ibm
Copy link
Copy Markdown
Contributor

Per #9302 A request sent through a HapiJS .inject() doesn't have
a socket associated with the request, which causes a failure.

NB: I haven't included new tests with this, as I can't workout how best to test it without adding two additional routes to src/server/http/index.js which seems incredibly heavy weight. I'm open to suggestions on how best to add a test to this though.

@elasticmachine
Copy link
Copy Markdown
Contributor

Can one of the admins verify this patch?

@meganwalker-ibm
Copy link
Copy Markdown
Contributor Author

Figure I should note that I'd appreciate it if this can be backported through to whatever the next 5.0.x release will be when it's merged.

@meganwalker-ibm
Copy link
Copy Markdown
Contributor Author

@spalger Mind doing the review for this PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think your description would make a great comment here, to explain the context:

// A request sent through a HapiJS .inject() doesn't have a socket associated with the request,
// which causes a failure.
if (!req.raw.req.socket || req.raw.req.socket.encrypted) {

@cjcenizal
Copy link
Copy Markdown
Contributor

jenkins, test this

Per elastic#9302 A request sent through a HapiJS .inject() doesn't have
a socket associated with the request, which causes a failure.
@meganwalker-ibm
Copy link
Copy Markdown
Contributor Author

I've added a comment as requested, as well as rebased on to master to pull in the latest commits :)

Copy link
Copy Markdown
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks @meganwalker-ibm

@cjcenizal
Copy link
Copy Markdown
Contributor

jenkins, test this

@cjcenizal cjcenizal merged commit 10c2136 into elastic:master Dec 10, 2016
elastic-jasper added a commit that referenced this pull request Dec 10, 2016
Backports PR #9332

**Commit 1:**
server onRequest handler no longer requires a socket in the request

Per #9302 A request sent through a HapiJS .inject() doesn't have
a socket associated with the request, which causes a failure.

* Original sha: a5452f7
* Authored by Megan Walker <megan.walker@uk.ibm.com> on 2016-12-01T15:29:12Z
cjcenizal pushed a commit that referenced this pull request Dec 10, 2016
…9438)

Backports PR #9332

**Commit 1:**
server onRequest handler no longer requires a socket in the request

Per #9302 A request sent through a HapiJS .inject() doesn't have
a socket associated with the request, which causes a failure.

* Original sha: a5452f7
* Authored by Megan Walker <megan.walker@uk.ibm.com> on 2016-12-01T15:29:12Z
@cjcenizal cjcenizal added the bug Fixes for quality problems that affect the customer experience label Dec 10, 2016
@cjcenizal
Copy link
Copy Markdown
Contributor

Thanks for the PR @meganwalker-ibm !

@epixa epixa added the Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// label Dec 12, 2016
danwhitacre pushed a commit to danwhitacre/kibana that referenced this pull request Feb 6, 2017
…lastic#9332)

Per elastic#9302 A request sent through a HapiJS .inject() doesn't have
a socket associated with the request, which causes a failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Fixes for quality problems that affect the customer experience Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// v5.2.0 v6.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants