{"action":"opened","number":149,"pull_request":{"url":"https://api.github.com/repos/labstack/echo/pulls/149","id":40412843,"html_url":"https://github.com/labstack/echo/pull/149","diff_url":"https://github.com/labstack/echo/pull/149.diff","patch_url":"https://github.com/labstack/echo/pull/149.patch","issue_url":"https://api.github.com/repos/labstack/echo/issues/149","number":149,"state":"open","locked":false,"title":"Relax content-type matching","user":{"login":"CaptainCodeman","id":304910,"avatar_url":"https://avatars.githubusercontent.com/u/304910?v=3","gravatar_id":"","url":"https://api.github.com/users/CaptainCodeman","html_url":"https://github.com/CaptainCodeman","followers_url":"https://api.github.com/users/CaptainCodeman/followers","following_url":"https://api.github.com/users/CaptainCodeman/following{/other_user}","gists_url":"https://api.github.com/users/CaptainCodeman/gists{/gist_id}","starred_url":"https://api.github.com/users/CaptainCodeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaptainCodeman/subscriptions","organizations_url":"https://api.github.com/users/CaptainCodeman/orgs","repos_url":"https://api.github.com/users/CaptainCodeman/repos","events_url":"https://api.github.com/users/CaptainCodeman/events{/privacy}","received_events_url":"https://api.github.com/users/CaptainCodeman/received_events","type":"User","site_admin":false},"body":"This relaxes the Content-Type header matching in the context.Bind method.\r\n\r\nAngular 1.x sets the header to `application/json;charset=utf-8` (note the lack of any space after the `;`) so checking that the string `application/json; charset=utf-8` starts with that header fails which prevents Angular `$resource` or `$http` etc... being used without extra client work.\r\n\r\nI think the match should be the other way round - check if the header starts with simpler `application/json` string instead and ignore anything else.\r\n\r\nI added the `applicationJSON` const because `ApplicationJSON` is used for other things as well. It's not a very good name and should probably be called `ApplicationJSONPrefix` or something similar but probably shouldn't be exported. I'm sure there is some official Content-Type parsing / matching rule somewhere though so we should probably follow that.","created_at":"2015-07-21T00:47:51Z","updated_at":"2015-07-21T00:47:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/labstack/echo/pulls/149/commits","review_comments_url":"https://api.github.com/repos/labstack/echo/pulls/149/comments","review_comment_url":"https://api.github.com/repos/labstack/echo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/labstack/echo/issues/149/comments","statuses_url":"https://api.github.com/repos/labstack/echo/statuses/09ebcbcc5ca71161faacca9f52c25cc5bf38fc4c","head":{"label":"CaptainCodeman:bind-content-type","ref":"bind-content-type","sha":"09ebcbcc5ca71161faacca9f52c25cc5bf38fc4c","user":{"login":"CaptainCodeman","id":304910,"avatar_url":"https://avatars.githubusercontent.com/u/304910?v=3","gravatar_id":"","url":"https://api.github.com/users/CaptainCodeman","html_url":"https://github.com/CaptainCodeman","followers_url":"https://api.github.com/users/CaptainCodeman/followers","following_url":"https://api.github.com/users/CaptainCodeman/following{/other_user}","gists_url":"https://api.github.com/users/CaptainCodeman/gists{/gist_id}","starred_url":"https://api.github.com/users/CaptainCodeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaptainCodeman/subscriptions","organizations_url":"https://api.github.com/users/CaptainCodeman/orgs","repos_url":"https://api.github.com/users/CaptainCodeman/repos","events_url":"https://api.github.com/users/CaptainCodeman/events{/privacy}","received_events_url":"https://api.github.com/users/CaptainCodeman/received_events","type":"User","site_admin":false},"repo":{"id":36410649,"name":"echo","full_name":"CaptainCodeman/echo","owner":{"login":"CaptainCodeman","id":304910,"avatar_url":"https://avatars.githubusercontent.com/u/304910?v=3","gravatar_id":"","url":"https://api.github.com/users/CaptainCodeman","html_url":"https://github.com/CaptainCodeman","followers_url":"https://api.github.com/users/CaptainCodeman/followers","following_url":"https://api.github.com/users/CaptainCodeman/following{/other_user}","gists_url":"https://api.github.com/users/CaptainCodeman/gists{/gist_id}","starred_url":"https://api.github.com/users/CaptainCodeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaptainCodeman/subscriptions","organizations_url":"https://api.github.com/users/CaptainCodeman/orgs","repos_url":"https://api.github.com/users/CaptainCodeman/repos","events_url":"https://api.github.com/users/CaptainCodeman/events{/privacy}","received_events_url":"https://api.github.com/users/CaptainCodeman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CaptainCodeman/echo","description":"Fast :rocket: HTTP router and micro web framework","fork":true,"url":"https://api.github.com/repos/CaptainCodeman/echo","forks_url":"https://api.github.com/repos/CaptainCodeman/echo/forks","keys_url":"https://api.github.com/repos/CaptainCodeman/echo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CaptainCodeman/echo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CaptainCodeman/echo/teams","hooks_url":"https://api.github.com/repos/CaptainCodeman/echo/hooks","issue_events_url":"https://api.github.com/repos/CaptainCodeman/echo/issues/events{/number}","events_url":"https://api.github.com/repos/CaptainCodeman/echo/events","assignees_url":"https://api.github.com/repos/CaptainCodeman/echo/assignees{/user}","branches_url":"https://api.github.com/repos/CaptainCodeman/echo/branches{/branch}","tags_url":"https://api.github.com/repos/CaptainCodeman/echo/tags","blobs_url":"https://api.github.com/repos/CaptainCodeman/echo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CaptainCodeman/echo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CaptainCodeman/echo/git/refs{/sha}","trees_url":"https://api.github.com/repos/CaptainCodeman/echo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CaptainCodeman/echo/statuses/{sha}","languages_url":"https://api.github.com/repos/CaptainCodeman/echo/languages","stargazers_url":"https://api.github.com/repos/CaptainCodeman/echo/stargazers","contributors_url":"https://api.github.com/repos/CaptainCodeman/echo/contributors","subscribers_url":"https://api.github.com/repos/CaptainCodeman/echo/subscribers","subscription_url":"https://api.github.com/repos/CaptainCodeman/echo/subscription","commits_url":"https://api.github.com/repos/CaptainCodeman/echo/commits{/sha}","git_commits_url":"https://api.github.com/repos/CaptainCodeman/echo/git/commits{/sha}","comments_url":"https://api.github.com/repos/CaptainCodeman/echo/comments{/number}","issue_comment_url":"https://api.github.com/repos/CaptainCodeman/echo/issues/comments{/number}","contents_url":"https://api.github.com/repos/CaptainCodeman/echo/contents/{+path}","compare_url":"https://api.github.com/repos/CaptainCodeman/echo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CaptainCodeman/echo/merges","archive_url":"https://api.github.com/repos/CaptainCodeman/echo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CaptainCodeman/echo/downloads","issues_url":"https://api.github.com/repos/CaptainCodeman/echo/issues{/number}","pulls_url":"https://api.github.com/repos/CaptainCodeman/echo/pulls{/number}","milestones_url":"https://api.github.com/repos/CaptainCodeman/echo/milestones{/number}","notifications_url":"https://api.github.com/repos/CaptainCodeman/echo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CaptainCodeman/echo/labels{/name}","releases_url":"https://api.github.com/repos/CaptainCodeman/echo/releases{/id}","created_at":"2015-05-28T02:50:04Z","updated_at":"2015-07-14T21:14:54Z","pushed_at":"2015-07-21T00:30:44Z","git_url":"git://github.com/CaptainCodeman/echo.git","ssh_url":"git@github.com:CaptainCodeman/echo.git","clone_url":"https://github.com/CaptainCodeman/echo.git","svn_url":"https://github.com/CaptainCodeman/echo","homepage":"http://labstack.github.io/echo","size":912,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"labstack:master","ref":"master","sha":"6da918876fd85c3cc4cba6603223f35d2521ef36","user":{"login":"labstack","id":2624634,"avatar_url":"https://avatars.githubusercontent.com/u/2624634?v=3","gravatar_id":"","url":"https://api.github.com/users/labstack","html_url":"https://github.com/labstack","followers_url":"https://api.github.com/users/labstack/followers","following_url":"https://api.github.com/users/labstack/following{/other_user}","gists_url":"https://api.github.com/users/labstack/gists{/gist_id}","starred_url":"https://api.github.com/users/labstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/labstack/subscriptions","organizations_url":"https://api.github.com/users/labstack/orgs","repos_url":"https://api.github.com/users/labstack/repos","events_url":"https://api.github.com/users/labstack/events{/privacy}","received_events_url":"https://api.github.com/users/labstack/received_events","type":"Organization","site_admin":false},"repo":{"id":31504491,"name":"echo","full_name":"labstack/echo","owner":{"login":"labstack","id":2624634,"avatar_url":"https://avatars.githubusercontent.com/u/2624634?v=3","gravatar_id":"","url":"https://api.github.com/users/labstack","html_url":"https://github.com/labstack","followers_url":"https://api.github.com/users/labstack/followers","following_url":"https://api.github.com/users/labstack/following{/other_user}","gists_url":"https://api.github.com/users/labstack/gists{/gist_id}","starred_url":"https://api.github.com/users/labstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/labstack/subscriptions","organizations_url":"https://api.github.com/users/labstack/orgs","repos_url":"https://api.github.com/users/labstack/repos","events_url":"https://api.github.com/users/labstack/events{/privacy}","received_events_url":"https://api.github.com/users/labstack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/labstack/echo","description":"Echo is  a fast :rocket: and unfancy micro web framework for Golang.","fork":false,"url":"https://api.github.com/repos/labstack/echo","forks_url":"https://api.github.com/repos/labstack/echo/forks","keys_url":"https://api.github.com/repos/labstack/echo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/labstack/echo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/labstack/echo/teams","hooks_url":"https://api.github.com/repos/labstack/echo/hooks","issue_events_url":"https://api.github.com/repos/labstack/echo/issues/events{/number}","events_url":"https://api.github.com/repos/labstack/echo/events","assignees_url":"https://api.github.com/repos/labstack/echo/assignees{/user}","branches_url":"https://api.github.com/repos/labstack/echo/branches{/branch}","tags_url":"https://api.github.com/repos/labstack/echo/tags","blobs_url":"https://api.github.com/repos/labstack/echo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/labstack/echo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/labstack/echo/git/refs{/sha}","trees_url":"https://api.github.com/repos/labstack/echo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/labstack/echo/statuses/{sha}","languages_url":"https://api.github.com/repos/labstack/echo/languages","stargazers_url":"https://api.github.com/repos/labstack/echo/stargazers","contributors_url":"https://api.github.com/repos/labstack/echo/contributors","subscribers_url":"https://api.github.com/repos/labstack/echo/subscribers","subscription_url":"https://api.github.com/repos/labstack/echo/subscription","commits_url":"https://api.github.com/repos/labstack/echo/commits{/sha}","git_commits_url":"https://api.github.com/repos/labstack/echo/git/commits{/sha}","comments_url":"https://api.github.com/repos/labstack/echo/comments{/number}","issue_comment_url":"https://api.github.com/repos/labstack/echo/issues/comments{/number}","contents_url":"https://api.github.com/repos/labstack/echo/contents/{+path}","compare_url":"https://api.github.com/repos/labstack/echo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/labstack/echo/merges","archive_url":"https://api.github.com/repos/labstack/echo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/labstack/echo/downloads","issues_url":"https://api.github.com/repos/labstack/echo/issues{/number}","pulls_url":"https://api.github.com/repos/labstack/echo/pulls{/number}","milestones_url":"https://api.github.com/repos/labstack/echo/milestones{/number}","notifications_url":"https://api.github.com/repos/labstack/echo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/labstack/echo/labels{/name}","releases_url":"https://api.github.com/repos/labstack/echo/releases{/id}","created_at":"2015-03-01T17:43:01Z","updated_at":"2015-07-20T20:52:06Z","pushed_at":"2015-07-19T17:32:41Z","git_url":"git://github.com/labstack/echo.git","ssh_url":"git@github.com:labstack/echo.git","clone_url":"https://github.com/labstack/echo.git","svn_url":"https://github.com/labstack/echo","homepage":"http://echo.labstack.com","size":1992,"stargazers_count":2030,"watchers_count":2030,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":95,"mirror_url":null,"open_issues_count":13,"forks":95,"open_issues":13,"watchers":2030,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/labstack/echo/pulls/149"},"html":{"href":"https://github.com/labstack/echo/pull/149"},"issue":{"href":"https://api.github.com/repos/labstack/echo/issues/149"},"comments":{"href":"https://api.github.com/repos/labstack/echo/issues/149/comments"},"review_comments":{"href":"https://api.github.com/repos/labstack/echo/pulls/149/comments"},"review_comment":{"href":"https://api.github.com/repos/labstack/echo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/labstack/echo/pulls/149/commits"},"statuses":{"href":"https://api.github.com/repos/labstack/echo/statuses/09ebcbcc5ca71161faacca9f52c25cc5bf38fc4c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":5,"deletions":3,"changed_files":2}}