fix: use chrome headers in net.request for everything except cookie (#36666)
This commit is contained in:
parent
8c837fda4f
commit
8f23b1527b
4 changed files with 23 additions and 28 deletions
|
@ -623,6 +623,19 @@ describe('net module', () => {
|
|||
expect(response.headers['set-cookie']).to.have.same.members(cookie);
|
||||
});
|
||||
|
||||
it('should be able to receive content-type', async () => {
|
||||
const contentType = 'mime/test; charset=test';
|
||||
const serverUrl = await respondOnce.toSingleURL((request, response) => {
|
||||
response.statusCode = 200;
|
||||
response.statusMessage = 'OK';
|
||||
response.setHeader('content-type', contentType);
|
||||
response.end();
|
||||
});
|
||||
const urlRequest = net.request(serverUrl);
|
||||
const response = await getResponse(urlRequest);
|
||||
expect(response.headers['content-type']).to.equal(contentType);
|
||||
});
|
||||
|
||||
it('should not use the sessions cookie store by default', async () => {
|
||||
const serverUrl = await respondOnce.toSingleURL((request, response) => {
|
||||
response.statusCode = 200;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue