0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-17 23:45:29 -05:00

fix: adding Content-Type to response in GET /-/all (#1697) (#1728)

This commit is contained in:
Kevin Yockey 2020-03-03 12:16:53 -08:00 committed by GitHub
parent f85cbf3c6c
commit 3aaa04829a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -1,3 +1,5 @@
import { HEADERS } from "../../../lib/constants";
/** /**
* @prettier * @prettier
*/ */
@ -11,6 +13,7 @@ export default function(route, auth, storage): void {
let firstPackage = true; let firstPackage = true;
res.status(200); res.status(200);
res.set(HEADERS.CONTENT_TYPE, HEADERS.JSON_CHARSET)
/* /*
* Offical NPM registry (registry.npmjs.org) no longer return whole database, * Offical NPM registry (registry.npmjs.org) no longer return whole database,

View file

@ -621,7 +621,7 @@ describe('endpoint unit test', () => {
.get('/-/all/since?stale=update_after&startkey=' + cacheTime) .get('/-/all/since?stale=update_after&startkey=' + cacheTime)
// .set('accept-encoding', HEADERS.JSON) // .set('accept-encoding', HEADERS.JSON)
// .set(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON) // .set(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON)
// .expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET) .expect(HEADERS.CONTENT_TYPE, HEADERS.JSON_CHARSET)
.expect(HTTP_STATUS.OK) .expect(HTTP_STATUS.OK)
.end(function(err) { .end(function(err) {
if (err) { if (err) {