Skip to content

Commit 9587100

Browse files
committed
fix(HyperResponse): Default to UTF-8 charset if none is present in the response.
1 parent 1c7f268 commit 9587100

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/HyperResponse.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ component accessors="true" {
102102
* @res The CFHTTP struct.
103103
*/
104104
private function populateFromCFHTTP( res ) {
105-
variables.charset = res.charset;
105+
variables.charset = res.keyExists( "charset" ) ? res.charset : "UTF-8";
106106
variables.statusCode = res.responseheader.status_code;
107107
res.responseheader.each( function( name, value ) {
108108
variables.headers[ lcase( name ) ] = value;

0 commit comments

Comments
 (0)