MT#12927 add charset utf-8 to hal+json headers

Change-Id: I8f0f89d958942e9860294d4bbca11b8c047f0939
changes/25/1825/3
Victor Seva 11 years ago
parent 010c9be9d5
commit 98a00e42c0

@ -210,10 +210,12 @@ sub http_headers {
if ($self->links) {
if (my ($profile_link) = grep { 'profile' eq $_->relation->as_string } @{ $self->links }) {
push @headers, 'Content-Type' => join_header_words(
'application/hal+json' => undef, profile => $profile_link->href->as_string
'application/hal+json' => undef,
profile => $profile_link->href->as_string,
charset => 'utf-8',
);
} else {
push @headers, 'Content-Type' => 'application/hal+json';
push @headers, 'Content-Type' => 'application/hal+json; charset=utf-8';
}
unless(exists $params{skip_links} && $params{skip_links}) {
push @headers,

Loading…
Cancel
Save