Skip to content

Behaviour change on non-ASCII latin1 characters #1196

@TartanLlama

Description

@TartanLlama

The migration of http-me has introduced a behaviour change on non-ASCII latin1 characters.

This test used to pass, but now fails, as the response header is percent-encoded:

routes.set('/headers/non-ascii-latin1-field-value', async () => {
  let response = await fetch('https://http-me.glitch.me/meow?header=cat:é', {
    backend: 'httpme',
  });

  let text = response.headers.get('cat');
  console.log("response.headers.get('cat')", response.headers.get('cat'));

  assert(text, 'é', `response.headers.get('cat') === "é"`);
});

To retain the old behaviour, we could look at using the percent_encoding crate with a custom latin1 set analogous to this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions