{"action":"closed","number":41,"pull_request":{"url":"https://api.github.com/repos/mapbox/node-tilejson/pulls/41","id":43395347,"node_id":"MDExOlB1bGxSZXF1ZXN0NDMzOTUzNDc=","html_url":"https://github.com/mapbox/node-tilejson/pull/41","diff_url":"https://github.com/mapbox/node-tilejson/pull/41.diff","patch_url":"https://github.com/mapbox/node-tilejson/pull/41.patch","issue_url":"https://api.github.com/repos/mapbox/node-tilejson/issues/41","number":41,"state":"closed","locked":false,"title":"Enable 3rd party vector tile sources","user":{"login":"BergWerkGIS","id":4549888,"node_id":"MDQ6VXNlcjQ1NDk4ODg=","avatar_url":"https://avatars1.githubusercontent.com/u/4549888?v=4","gravatar_id":"","url":"https://api.github.com/users/BergWerkGIS","html_url":"https://github.com/BergWerkGIS","followers_url":"https://api.github.com/users/BergWerkGIS/followers","following_url":"https://api.github.com/users/BergWerkGIS/following{/other_user}","gists_url":"https://api.github.com/users/BergWerkGIS/gists{/gist_id}","starred_url":"https://api.github.com/users/BergWerkGIS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BergWerkGIS/subscriptions","organizations_url":"https://api.github.com/users/BergWerkGIS/orgs","repos_url":"https://api.github.com/users/BergWerkGIS/repos","events_url":"https://api.github.com/users/BergWerkGIS/events{/privacy}","received_events_url":"https://api.github.com/users/BergWerkGIS/received_events","type":"User","site_admin":false},"body":"@yhahn do you have time to review/test/merge, or tell me, whom else I should ask?\n@springmeyer FYI\n\n**It's a _hack_, any suggestions for a clean solution are welcome**\n#### Current State\n- about to release next Mapbox Studio version\n- with the adoption of vector tiles 3rd party vector tile services will be more common and the need to style them with MBS, too.\n- MBS does not sent `Accept-Encoding:gzip`, because mapbox servers always send gzipped vector tiles\n- `tile* modules` expect gzipped vector tiles\n- 3rd party servers compress their response, depending on the presence of `Accept-Encoding`\n  - e.g.: wikimedia: https://github.com/mapbox/mapbox-studio/issues/1268#issuecomment-134004721\n- as MBS sends requests without `Accept-Encoding:gzip`, servers respond with uncompressed content\n- this uncompressed response breaks `tile*` modules\n- just adding `Accept-Encoding:gzip` to requestjs header options, makes the 3rd party vector tiles work, but breaks other stuff, as uncompressed content is expected.\n- adding `gzip:true` to requestjs options makes the other stuff work, because requestjs decompresses on the fly, but breaks the 3rd party vector tiles as they are also decompressed before being passed to the tile\\* modules.\n#### Obvious problem\n\nIf 3rd party tile services use a different extension than `.pbf` or `.mvt`\n#### Hacky Solution\n- always send `Accept-Encoding:gzip` header to get gzipped responses\n- let requestjs decompress (or not) on a pre request basis (`gzip:[true|false]`).  currently I'm checking, if \n  - there is `.pbf` or `.mvt` in the url => do nothing: `gzip:false`\n  - if not => uncompress: `gzip:true`\n#### Manual tests\n\nI tried\n- Mapbox Styles: streets, satellite, comic, ...\n- custom styles with custom source hosted by Mapbox\n- custom styles with 3rd party tile services: Mapzen and Wikimedia\n\nDidn't ru into any problems\n","created_at":"2015-08-26T12:21:57Z","updated_at":"2018-12-03T02:02:30Z","closed_at":"2018-12-03T02:02:30Z","merged_at":null,"merge_commit_sha":"71bf9db98dfb6f6f5fc068399f321219e29a15ce","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mapbox/node-tilejson/pulls/41/commits","review_comments_url":"https://api.github.com/repos/mapbox/node-tilejson/pulls/41/comments","review_comment_url":"https://api.github.com/repos/mapbox/node-tilejson/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapbox/node-tilejson/issues/41/comments","statuses_url":"https://api.github.com/repos/mapbox/node-tilejson/statuses/3b07c97f3e263232b9bc833b0403bb4b801eef05","head":{"label":"mapbox:request-mbs","ref":"request-mbs","sha":"3b07c97f3e263232b9bc833b0403bb4b801eef05","user":{"login":"mapbox","id":600935,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwMDkzNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/600935?v=4","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"repo":{"id":1959972,"node_id":"MDEwOlJlcG9zaXRvcnkxOTU5OTcy","name":"node-tilejson","full_name":"mapbox/node-tilejson","private":false,"owner":{"login":"mapbox","id":600935,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwMDkzNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/600935?v=4","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mapbox/node-tilejson","description":"Tile source backend for online tile sources","fork":false,"url":"https://api.github.com/repos/mapbox/node-tilejson","forks_url":"https://api.github.com/repos/mapbox/node-tilejson/forks","keys_url":"https://api.github.com/repos/mapbox/node-tilejson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/node-tilejson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/node-tilejson/teams","hooks_url":"https://api.github.com/repos/mapbox/node-tilejson/hooks","issue_events_url":"https://api.github.com/repos/mapbox/node-tilejson/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/node-tilejson/events","assignees_url":"https://api.github.com/repos/mapbox/node-tilejson/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/node-tilejson/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/node-tilejson/tags","blobs_url":"https://api.github.com/repos/mapbox/node-tilejson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/node-tilejson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/node-tilejson/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/node-tilejson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/node-tilejson/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/node-tilejson/languages","stargazers_url":"https://api.github.com/repos/mapbox/node-tilejson/stargazers","contributors_url":"https://api.github.com/repos/mapbox/node-tilejson/contributors","subscribers_url":"https://api.github.com/repos/mapbox/node-tilejson/subscribers","subscription_url":"https://api.github.com/repos/mapbox/node-tilejson/subscription","commits_url":"https://api.github.com/repos/mapbox/node-tilejson/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/node-tilejson/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/node-tilejson/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/node-tilejson/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/node-tilejson/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/node-tilejson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/node-tilejson/merges","archive_url":"https://api.github.com/repos/mapbox/node-tilejson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/node-tilejson/downloads","issues_url":"https://api.github.com/repos/mapbox/node-tilejson/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/node-tilejson/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/node-tilejson/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/node-tilejson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/node-tilejson/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/node-tilejson/releases{/id}","deployments_url":"https://api.github.com/repos/mapbox/node-tilejson/deployments","created_at":"2011-06-27T12:14:08Z","updated_at":"2017-09-25T14:23:17Z","pushed_at":"2017-07-16T11:04:07Z","git_url":"git://github.com/mapbox/node-tilejson.git","ssh_url":"git@github.com:mapbox/node-tilejson.git","clone_url":"https://github.com/mapbox/node-tilejson.git","svn_url":"https://github.com/mapbox/node-tilejson","homepage":"","size":146,"stargazers_count":26,"watchers_count":26,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":21,"open_issues":5,"watchers":26,"default_branch":"master"}},"base":{"label":"mapbox:request","ref":"request","sha":"80790ec0e462f2fe8ed6fd7398284c18da6748c8","user":{"login":"mapbox","id":600935,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwMDkzNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/600935?v=4","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"repo":{"id":1959972,"node_id":"MDEwOlJlcG9zaXRvcnkxOTU5OTcy","name":"node-tilejson","full_name":"mapbox/node-tilejson","private":false,"owner":{"login":"mapbox","id":600935,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwMDkzNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/600935?v=4","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mapbox/node-tilejson","description":"Tile source backend for online tile sources","fork":false,"url":"https://api.github.com/repos/mapbox/node-tilejson","forks_url":"https://api.github.com/repos/mapbox/node-tilejson/forks","keys_url":"https://api.github.com/repos/mapbox/node-tilejson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/node-tilejson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/node-tilejson/teams","hooks_url":"https://api.github.com/repos/mapbox/node-tilejson/hooks","issue_events_url":"https://api.github.com/repos/mapbox/node-tilejson/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/node-tilejson/events","assignees_url":"https://api.github.com/repos/mapbox/node-tilejson/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/node-tilejson/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/node-tilejson/tags","blobs_url":"https://api.github.com/repos/mapbox/node-tilejson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/node-tilejson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/node-tilejson/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/node-tilejson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/node-tilejson/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/node-tilejson/languages","stargazers_url":"https://api.github.com/repos/mapbox/node-tilejson/stargazers","contributors_url":"https://api.github.com/repos/mapbox/node-tilejson/contributors","subscribers_url":"https://api.github.com/repos/mapbox/node-tilejson/subscribers","subscription_url":"https://api.github.com/repos/mapbox/node-tilejson/subscription","commits_url":"https://api.github.com/repos/mapbox/node-tilejson/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/node-tilejson/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/node-tilejson/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/node-tilejson/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/node-tilejson/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/node-tilejson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/node-tilejson/merges","archive_url":"https://api.github.com/repos/mapbox/node-tilejson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/node-tilejson/downloads","issues_url":"https://api.github.com/repos/mapbox/node-tilejson/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/node-tilejson/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/node-tilejson/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/node-tilejson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/node-tilejson/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/node-tilejson/releases{/id}","deployments_url":"https://api.github.com/repos/mapbox/node-tilejson/deployments","created_at":"2011-06-27T12:14:08Z","updated_at":"2017-09-25T14:23:17Z","pushed_at":"2017-07-16T11:04:07Z","git_url":"git://github.com/mapbox/node-tilejson.git","ssh_url":"git@github.com:mapbox/node-tilejson.git","clone_url":"https://github.com/mapbox/node-tilejson.git","svn_url":"https://github.com/mapbox/node-tilejson","homepage":"","size":146,"stargazers_count":26,"watchers_count":26,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":21,"open_issues":5,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapbox/node-tilejson/pulls/41"},"html":{"href":"https://github.com/mapbox/node-tilejson/pull/41"},"issue":{"href":"https://api.github.com/repos/mapbox/node-tilejson/issues/41"},"comments":{"href":"https://api.github.com/repos/mapbox/node-tilejson/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/mapbox/node-tilejson/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/mapbox/node-tilejson/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapbox/node-tilejson/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/mapbox/node-tilejson/statuses/3b07c97f3e263232b9bc833b0403bb4b801eef05"}},"author_association":"MEMBER","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":6,"review_comments":1,"maintainer_can_modify":false,"commits":2,"additions":20,"deletions":1,"changed_files":2}}
{"actor":{"display_login":"springmeyer"}}