{"action":"opened","number":91,"pull_request":{"state":"open","created_at":"2011-11-22T05:55:59Z","review_comments":0,"updated_at":"2011-11-22T05:55:59Z","patch_url":"https://github.com/extend/cowboy/pull/91.patch","changed_files":1,"_links":{"review_comments":{"href":"https://api.github.com/repos/extend/cowboy/pulls/91/comments"},"comments":{"href":"https://api.github.com/repos/extend/cowboy/issues/91/comments"},"html":{"href":"https://github.com/extend/cowboy/pull/91"},"self":{"href":"https://api.github.com/repos/extend/cowboy/pulls/91"}},"comments":0,"user":{"gravatar_id":"93bf78ec1a55493a4afbeee9b64105c7","id":48568,"url":"https://api.github.com/users/csrl","login":"csrl","avatar_url":"https://secure.gravatar.com/avatar/93bf78ec1a55493a4afbeee9b64105c7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"issue_url":"https://github.com/extend/cowboy/issues/91","merged":false,"deletions":1,"body":"It is necessary to be able to handle URI paths ending in '/'.  Currently, the cowboy implementation explicitly strips this ability for some reason. In cowboy_dispatcher:do_split_path/2, it calls binary:split/3 with the 'trim' option.  Removing the 'trim' option fixes this problem, allowing to return an empty <<>> binary at the end of the path when the path ends in '/'.\r\n\r\nWith this change, one can correctly route paths that work like:\r\n\r\n<<\"/\">> => [<<>>]\r\n<<\"/resource\">> => [<<\"resource\">>]\r\n<<\"/resource/\">> => [<<\"resource\">>,<<>>]\r\n<<\"/resource/sub\">> => [<<\"resource\">>,<<\"sub\">>]","commits":1,"mergeable":null,"id":517497,"base":{"repo":{"pushed_at":"2011-11-10T12:01:16Z","created_at":"2011-03-09T19:55:52Z","clone_url":"https://github.com/extend/cowboy.git","private":false,"updated_at":"2011-11-22T05:42:55Z","name":"cowboy","svn_url":"https://svn.github.com/extend/cowboy","watchers":273,"master_branch":null,"language":"Erlang","forks":40,"owner":{"gravatar_id":"b15dafff5c2f1646fc5622af56c038fc","id":435507,"url":"https://api.github.com/users/extend","login":"extend","avatar_url":"https://secure.gravatar.com/avatar/b15dafff5c2f1646fc5622af56c038fc?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png"},"id":1460612,"homepage":"","description":"Small, fast, modular HTTP server and socket acceptor pool.","git_url":"git://github.com/extend/cowboy.git","html_url":"https://github.com/extend/cowboy","open_issues":22,"url":"https://api.github.com/repos/extend/cowboy","size":704,"fork":false,"ssh_url":"git@github.com:extend/cowboy.git"},"user":{"gravatar_id":"b15dafff5c2f1646fc5622af56c038fc","id":435507,"url":"https://api.github.com/users/extend","login":"extend","avatar_url":"https://secure.gravatar.com/avatar/b15dafff5c2f1646fc5622af56c038fc?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png"},"sha":"a5b47fda8de7972c9affb4f4d1320fb666c67a92","ref":"master","label":"extend:master"},"additions":1,"merged_by":null,"number":91,"title":"The path handling doesn't differentiate between /resource and /resource/","head":{"repo":{"pushed_at":"2011-11-22T05:43:57Z","created_at":"2011-11-22T05:42:55Z","clone_url":"https://github.com/csrl/cowboy.git","private":false,"updated_at":"2011-11-22T05:43:59Z","name":"cowboy","svn_url":"https://svn.github.com/csrl/cowboy","watchers":1,"master_branch":null,"language":"Erlang","forks":0,"owner":{"gravatar_id":"93bf78ec1a55493a4afbeee9b64105c7","id":48568,"url":"https://api.github.com/users/csrl","login":"csrl","avatar_url":"https://secure.gravatar.com/avatar/93bf78ec1a55493a4afbeee9b64105c7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"id":2825588,"homepage":"","description":"Small, fast, modular HTTP server and socket acceptor pool.","git_url":"git://github.com/csrl/cowboy.git","html_url":"https://github.com/csrl/cowboy","open_issues":0,"url":"https://api.github.com/repos/csrl/cowboy","size":132,"fork":true,"ssh_url":"git@github.com:csrl/cowboy.git"},"user":{"gravatar_id":"93bf78ec1a55493a4afbeee9b64105c7","id":48568,"url":"https://api.github.com/users/csrl","login":"csrl","avatar_url":"https://secure.gravatar.com/avatar/93bf78ec1a55493a4afbeee9b64105c7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"sha":"c3f3affa0da8a371c17cbc2cdd7bf83facbde44c","ref":"master","label":"csrl:master"},"html_url":"https://github.com/extend/cowboy/pull/91","closed_at":null,"url":"https://api.github.com/repos/extend/cowboy/pulls/91","diff_url":"https://github.com/extend/cowboy/pull/91.diff","merged_at":null}}