11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ciif (!common.hasCrypto) { common.skip('missing crypto'); } 41cb0ef41Sopenharmony_ciconst assert = require('assert'); 51cb0ef41Sopenharmony_ciconst http2 = require('http2'); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ciconst server = http2.createServer(common.mustCall((request, response) => { 81cb0ef41Sopenharmony_ci response.sendDate = false; 91cb0ef41Sopenharmony_ci response.writeHead(200); 101cb0ef41Sopenharmony_ci response.end(); 111cb0ef41Sopenharmony_ci})); 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_ciserver.listen(0, common.mustCall(() => { 141cb0ef41Sopenharmony_ci const session = http2.connect(`http://localhost:${server.address().port}`); 151cb0ef41Sopenharmony_ci const req = session.request(); 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_ci req.on('response', common.mustCall((headers, flags) => { 181cb0ef41Sopenharmony_ci assert.strictEqual('Date' in headers, false); 191cb0ef41Sopenharmony_ci assert.strictEqual('date' in headers, false); 201cb0ef41Sopenharmony_ci })); 211cb0ef41Sopenharmony_ci 221cb0ef41Sopenharmony_ci req.on('end', common.mustCall(() => { 231cb0ef41Sopenharmony_ci session.close(); 241cb0ef41Sopenharmony_ci server.close(); 251cb0ef41Sopenharmony_ci })); 261cb0ef41Sopenharmony_ci})); 27