forked from badges/shields
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redirect an old png badge with a number as a color; test on [static] (b…
…adges#3412) Fixes badges#3260 Problem happens when a value of a color in an old PNG static badge is a number: http://localhost:8080/my-label/my-message.png?color=1. In this case `color` in `queryParams` is a number. https://github.com/badges/shields/blob/0a0b5b3f031178851c9d295b9967d81ede052723/core/server/server.js#L203-L212 Surprisingly service test listed below is passing currently on master - value `1` is represented in `queryParams` as a String (only in test). `services/static-badge/static-badge.tester.js` ```js t.create('Old static badge with a number as a color') .get('/foo/bar.png?color=1', { followRedirect: false }) .expectStatus(301) .expectHeader('Location', '/badge/foo-bar-1.png') ``` Moreover I added some code + description allowing to debug server.
- Loading branch information
1 parent
7afb26e
commit 2836014
Showing
5 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "attach", | ||
"name": "Node: Nodemon", | ||
"processId": "${command:PickProcess}", | ||
"restart": true, | ||
"protocol": "inspector" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters