Skip to content

.charset(charset) doesn't work on its own in ext #2979

@rockbot

Description

@rockbot

Desired header: content-type: text/html; charset=utf-8

However:

  server.ext('onPreResponse', function(request, reply) {
    request.response.charset('utf-8');

    return reply.continue();
  });

results in the following header: content-type: text/html. (text/html is the default content-type header)

The current workaround is to use

  server.ext('onPreResponse', function(request, reply) {
    request.response.type('text/html').charset('utf-8');

    return reply.continue();
  });

which results in the desired behavior.

Metadata

Metadata

Assignees

Labels

bugBug or defect

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions