fix charset getting reset to nil unintentionally
Merge pull request #552 from yinquanteo/master

fix header's charset getting reset to nil unintentionally