Open your dependenciesnode_modules\karma\node_modules\connect\lib\patch.js
Change the SetHeader method to the following to kill the serialized date when the Chinese
Res.setheader =function(field, Val) {varKey =field.tolowercase (), Prev; //special-case Set-cookie if(Key = = = ' Set-cookie ')) { //detect code doing GetHeader-SetHeader if(Array.isarray (val) && val.length > 1) {prev= [].concat ( This. getheader (field) | | []); Val=Unique (prev, Val); } return This. appendheader (field, Val); } //CharSet if(' content-type ' = = key && This. CharSet) {Val= Utils.setcharset (Val, This. CharSet,true); } Try{ if(typeofval = = = ' String ') {Val= Val.replace (/China Standard Time/, ' ') } returnSetheader.call ( This, field, Val); }Catch(e) {Console.log (E, Val,field)}};
Source: Https://www.cnblogs.com/rubylouvre/p/6127190.html?utm_source=tuicool&utm_medium=referral
Window7 Karma Report The header content contains invalid characters BUG