Fix response header "Content-Encoding" issue.

1. add code in WriteHeader method.