Window7 Karma Report The header content contains invalid characters BUG

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.