File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 11unreleased
22==========
33
4+ * Add charset to the ` Content-Type ` header
45 * Support ` statusCode ` property on ` Error ` objects
56 * deps: accepts@~ 1.2.9
67 - deps: mime-types@~ 2.1.1
Original file line number Diff line number Diff line change @@ -145,11 +145,11 @@ exports = module.exports = function errorHandler(options) {
145145 var error = { message : err . message , stack : err . stack } ;
146146 for ( var prop in err ) error [ prop ] = err [ prop ] ;
147147 var json = JSON . stringify ( { error : error } ) ;
148- res . setHeader ( 'Content-Type' , 'application/json' ) ;
148+ res . setHeader ( 'Content-Type' , 'application/json; charset=utf-8' )
149149 res . end ( json ) ;
150150 // plain text
151151 } else {
152- res . setHeader ( 'Content-Type' , 'text/plain' ) ;
152+ res . setHeader ( 'Content-Type' , 'text/plain; charset=utf-8' )
153153 res . end ( str )
154154 }
155155 } ;
You can’t perform that action at this time.
0 commit comments