{"action":"created","issue":{"url":"https://api.github.com/repos/i18next/i18next-express-middleware/issues/124","repository_url":"https://api.github.com/repos/i18next/i18next-express-middleware","labels_url":"https://api.github.com/repos/i18next/i18next-express-middleware/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/i18next/i18next-express-middleware/issues/124/comments","events_url":"https://api.github.com/repos/i18next/i18next-express-middleware/issues/124/events","html_url":"https://github.com/i18next/i18next-express-middleware/issues/124","id":215690007,"number":124,"title":"Bug while detecting language from path","user":{"login":"varunest","id":3609843,"avatar_url":"https://avatars0.githubusercontent.com/u/3609843?v=3","gravatar_id":"","url":"https://api.github.com/users/varunest","html_url":"https://github.com/varunest","followers_url":"https://api.github.com/users/varunest/followers","following_url":"https://api.github.com/users/varunest/following{/other_user}","gists_url":"https://api.github.com/users/varunest/gists{/gist_id}","starred_url":"https://api.github.com/users/varunest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varunest/subscriptions","organizations_url":"https://api.github.com/users/varunest/orgs","repos_url":"https://api.github.com/users/varunest/repos","events_url":"https://api.github.com/users/varunest/events{/privacy}","received_events_url":"https://api.github.com/users/varunest/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-21T10:25:43Z","updated_at":"2017-03-21T10:33:20Z","closed_at":null,"body":"For a url like \"example.com/es\" the detector is working fine. But if query params are added to the url then the detector fails, ex. \"example.com/es?key=value\". In this case it takes **es?key=value** as a language. \r\n\r\nI backtraced and found that issue is happening because in **path.js** we have this line : \r\n\r\n`var parts = req.originalUrl.split('/');\r\n`\r\nthis should be \r\n\r\n`var parts = req.path.split('/');`\r\n\r\nCan we please cross check and release a version with the fix. Thanks."},"comment":{"url":"https://api.github.com/repos/i18next/i18next-express-middleware/issues/comments/288037670","html_url":"https://github.com/i18next/i18next-express-middleware/issues/124#issuecomment-288037670","issue_url":"https://api.github.com/repos/i18next/i18next-express-middleware/issues/124","id":288037670,"user":{"login":"jamuhl","id":977772,"avatar_url":"https://avatars0.githubusercontent.com/u/977772?v=3","gravatar_id":"","url":"https://api.github.com/users/jamuhl","html_url":"https://github.com/jamuhl","followers_url":"https://api.github.com/users/jamuhl/followers","following_url":"https://api.github.com/users/jamuhl/following{/other_user}","gists_url":"https://api.github.com/users/jamuhl/gists{/gist_id}","starred_url":"https://api.github.com/users/jamuhl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamuhl/subscriptions","organizations_url":"https://api.github.com/users/jamuhl/orgs","repos_url":"https://api.github.com/users/jamuhl/repos","events_url":"https://api.github.com/users/jamuhl/events{/privacy}","received_events_url":"https://api.github.com/users/jamuhl/received_events","type":"User","site_admin":false},"created_at":"2017-03-21T10:33:20Z","updated_at":"2017-03-21T10:33:20Z","body":"req.path is not reliable according to http://stackoverflow.com/questions/12525928/how-to-get-request-path-with-express-req-object\r\n\r\nbest option might be to split on `?` first and take that part[0] to split by `/`? what do you think?"}}
{"actor":{"display_login":"jamuhl"}}