Skip to content

Commit

Permalink
fix: replace content-type: application/json with `content-type: app…
Browse files Browse the repository at this point in the history
…lication/json: charset=utf-8`
  • Loading branch information
gr2m committed Sep 24, 2021
1 parent a864e67 commit b8963a0
Show file tree
Hide file tree
Showing 27 changed files with 2,215 additions and 2,215 deletions.
6 changes: 3 additions & 3 deletions lib/normalize/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ async function normalize(scenarioState, fixture) {

// normalize content-type value
if (fixture.reqheaders["content-type"]) {
fixture.reqheaders["content-type"] = fixture.reqheaders[
"content-type"
].replace(";charset=utf-8", "; charset=utf-8");
fixture.reqheaders["content-type"] = fixture.reqheaders["content-type"]
.replace(";charset=utf-8", "; charset=utf-8")
.replace("application/json", "application/json; charset=utf-8");
}

const responses = Array.isArray(fixture.response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
"active_lock_reason": null,
"body": null,
"closed_by": null,
"timeline_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-add-labels-to-issue-20210924171244478-xyxwy/issues/1/timeline",
"timeline_url": "https://api.github.com/repos/octokit-fixture-org/tmp-scenario-add-labels-to-issue-20210924233425649-h1xb3/issues/1/timeline",
"performed_via_github_app": null
},
"reqheaders": {
"accept": "application/vnd.github.v3+json",
"content-type": "application/json",
"content-type": "application/json; charset=utf-8",
"authorization": "token 0000000000000000000000000000000000000001",
"content-length": 33,
"host": "api.github.com"
Expand Down Expand Up @@ -125,7 +125,7 @@
],
"reqheaders": {
"accept": "application/vnd.github.v3+json",
"content-type": "application/json",
"content-type": "application/json; charset=utf-8",
"authorization": "token 0000000000000000000000000000000000000001",
"content-length": 30,
"host": "api.github.com"
Expand Down
196 changes: 98 additions & 98 deletions scenarios/api.github.com/add-labels-to-issue/raw-fixture.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
},
"reqheaders": {
"accept": "application/vnd.github.v3+json",
"content-type": "application/json",
"content-type": "application/json; charset=utf-8",
"authorization": "token 0000000000000000000000000000000000000001",
"content-length": 111,
"host": "api.github.com"
Expand Down Expand Up @@ -213,7 +213,7 @@
},
"reqheaders": {
"accept": "application/vnd.github.v3+json",
"content-type": "application/json",
"content-type": "application/json; charset=utf-8",
"authorization": "token 0000000000000000000000000000000000000001",
"content-length": 329,
"host": "api.github.com"
Expand Down
250 changes: 125 additions & 125 deletions scenarios/api.github.com/branch-protection/raw-fixture.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"reqheaders": {
"accept": "application/vnd.github.v3+json",
"content-type": "application/json",
"content-type": "application/json; charset=utf-8",
"authorization": "token 0000000000000000000000000000000000000001",
"content-length": 58,
"host": "api.github.com"
Expand Down
168 changes: 84 additions & 84 deletions scenarios/api.github.com/create-file/raw-fixture.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"reqheaders": {
"accept": "application/vnd.github.v3+json",
"content-type": "application/json",
"content-type": "application/json; charset=utf-8",
"authorization": "token 0000000000000000000000000000000000000001",
"content-length": 119,
"host": "api.github.com"
Expand Down Expand Up @@ -122,7 +122,7 @@
},
"reqheaders": {
"accept": "application/vnd.github.v3+json",
"content-type": "application/json",
"content-type": "application/json; charset=utf-8",
"authorization": "token 0000000000000000000000000000000000000001",
"content-length": 119,
"host": "api.github.com"
Expand Down
378 changes: 189 additions & 189 deletions scenarios/api.github.com/create-status/raw-fixture.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scenarios/api.github.com/errors/normalized-fixture.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"reqheaders": {
"accept": "application/vnd.github.v3+json",
"content-type": "application/json",
"content-type": "application/json; charset=utf-8",
"authorization": "token 0000000000000000000000000000000000000001",
"content-length": 32,
"host": "api.github.com"
Expand Down
138 changes: 69 additions & 69 deletions scenarios/api.github.com/errors/raw-fixture.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions scenarios/api.github.com/git-refs/normalized-fixture.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
},
"reqheaders": {
"accept": "application/vnd.github.v3+json",
"content-type": "application/json",
"content-type": "application/json; charset=utf-8",
"authorization": "token 0000000000000000000000000000000000000001",
"content-length": 74,
"host": "api.github.com"
Expand Down Expand Up @@ -123,7 +123,7 @@
},
"reqheaders": {
"accept": "application/vnd.github.v3+json",
"content-type": "application/json",
"content-type": "application/json; charset=utf-8",
"authorization": "token 0000000000000000000000000000000000000001",
"content-length": 50,
"host": "api.github.com"
Expand Down
334 changes: 167 additions & 167 deletions scenarios/api.github.com/git-refs/raw-fixture.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions scenarios/api.github.com/labels/normalized-fixture.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
},
"reqheaders": {
"accept": "application/vnd.github.v3+json",
"content-type": "application/json",
"content-type": "application/json; charset=utf-8",
"authorization": "token 0000000000000000000000000000000000000001",
"content-length": 38,
"host": "api.github.com"
Expand Down Expand Up @@ -235,7 +235,7 @@
},
"reqheaders": {
"accept": "application/vnd.github.v3+json",
"content-type": "application/json",
"content-type": "application/json; charset=utf-8",
"authorization": "token 0000000000000000000000000000000000000001",
"content-length": 50,
"host": "api.github.com"
Expand Down
Loading

0 comments on commit b8963a0

Please sign in to comment.