{"action":"created","issue":{"url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/165","labels_url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/165/comments","events_url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/165/events","html_url":"https://github.com/glennjones/hapi-swagger/issues/165","id":113355789,"number":165,"title":"Uncaught error: Cannot read property 'protocol' of null in case of multiple connections","user":{"login":"aboutvale","id":11482345,"avatar_url":"https://avatars.githubusercontent.com/u/11482345?v=3","gravatar_id":"","url":"https://api.github.com/users/aboutvale","html_url":"https://github.com/aboutvale","followers_url":"https://api.github.com/users/aboutvale/followers","following_url":"https://api.github.com/users/aboutvale/following{/other_user}","gists_url":"https://api.github.com/users/aboutvale/gists{/gist_id}","starred_url":"https://api.github.com/users/aboutvale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboutvale/subscriptions","organizations_url":"https://api.github.com/users/aboutvale/orgs","repos_url":"https://api.github.com/users/aboutvale/repos","events_url":"https://api.github.com/users/aboutvale/events{/privacy}","received_events_url":"https://api.github.com/users/aboutvale/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-26T13:34:37Z","updated_at":"2015-10-31T16:59:08Z","closed_at":"2015-10-31T16:59:08Z","body":"If the server has multiple connections when I open `/documentation` I got:\r\n`TypeError: Uncaught error: Cannot read property 'protocol' of null`\r\n`at handler (/src/node_modules/hapi-swagger/lib/index.js:163:34)`\r\nThis seems caused by accessing to `request.server.info.protocol` when the object `info` is not defined. \r\nBasically when there are multiple connections, Hapi (>9 I guess) stores server info in `server.connections` instead of `server.info`.\r\nHence it seems not reliable to use `request.server.info` without check if the object is defined.\r\nI've forked the project, I'm gonna try to fix and then submit a pull request."},"comment":{"url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/comments/152750416","html_url":"https://github.com/glennjones/hapi-swagger/issues/165#issuecomment-152750416","issue_url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/165","id":152750416,"user":{"login":"glennjones","id":175288,"avatar_url":"https://avatars.githubusercontent.com/u/175288?v=3","gravatar_id":"","url":"https://api.github.com/users/glennjones","html_url":"https://github.com/glennjones","followers_url":"https://api.github.com/users/glennjones/followers","following_url":"https://api.github.com/users/glennjones/following{/other_user}","gists_url":"https://api.github.com/users/glennjones/gists{/gist_id}","starred_url":"https://api.github.com/users/glennjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennjones/subscriptions","organizations_url":"https://api.github.com/users/glennjones/orgs","repos_url":"https://api.github.com/users/glennjones/repos","events_url":"https://api.github.com/users/glennjones/events{/privacy}","received_events_url":"https://api.github.com/users/glennjones/received_events","type":"User","site_admin":false},"created_at":"2015-10-31T16:59:08Z","updated_at":"2015-10-31T16:59:08Z","body":"Hi Valentino, thanks for taking the time to raise the issue and submit a pull request. Your commit to correct the issue is now in v2.2.2 on npm"}}