11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ci 41cb0ef41Sopenharmony_ci// This test ensures that the http-parser can handle UTF-8 characters 51cb0ef41Sopenharmony_ci// in the http header. 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ciconst http = require('http'); 81cb0ef41Sopenharmony_ciconst assert = require('assert'); 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ciconst server = http.createServer(common.mustCall((req, res) => { 111cb0ef41Sopenharmony_ci res.end('ok'); 121cb0ef41Sopenharmony_ci})); 131cb0ef41Sopenharmony_ciserver.listen(0, () => { 141cb0ef41Sopenharmony_ci http.get({ 151cb0ef41Sopenharmony_ci port: server.address().port, 161cb0ef41Sopenharmony_ci headers: { 'Test': 'Düsseldorf' } 171cb0ef41Sopenharmony_ci }, common.mustCall((res) => { 181cb0ef41Sopenharmony_ci assert.strictEqual(res.statusCode, 200); 191cb0ef41Sopenharmony_ci server.close(); 201cb0ef41Sopenharmony_ci })); 211cb0ef41Sopenharmony_ci}); 22