Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Diacritics in IP geolocation headers causing problems #7641 #218

Closed
Joozty opened this issue Dec 31, 2024 · 1 comment
Closed

[BUG] Diacritics in IP geolocation headers causing problems #7641 #218

Joozty opened this issue Dec 31, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Joozty
Copy link

Joozty commented Dec 31, 2024

Describe the bug

I tried to deploy my Next.js app to Cloudflare Workers, and I followed this tutorial. The build completes successfully, but when I try to preview or deploy it, I encounter the following error:

Invalid header name or value: "Žilina". Per the Fetch specification, the Headers class may only accept header names and values which contain 8-bit characters. That is, they must not contain any Unicode code points greater than 0xFF. As a quirk, we are encoding this string in UTF-8 in the header, but in a browser this would result in a TypeError exception. Consider encoding this string in ASCII for compatibility with browser implementations of the Fetch specification.

Žilina is a city in Slovakia, and I assume that somewhere, a header with this value is being sent. I was able to find the cause, and it throws an error in Miniflare here. I guess the diacritics are causing the problem.

Steps to reproduce

I do not know how to reproduce. VPN maybe?

Expected behavior

not throwing the error

@opennextjs/cloudflare version

0.3.3

Wrangler version

3.99.0

next info output

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.2.0: Fri Dec  6 18:56:34 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020
  Available memory (MB): 32768
  Available CPU cores: 12
Binaries:
  Node: 20.17.0
  npm: 10.8.2
  Yarn: 1.22.22
  pnpm: 9.15.0
Relevant Packages:
  next: 15.1.3 // Latest available version is detected (15.1.3).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.7.2
Next.js Config:
  output: N/A

Additional context

cloudflare/workers-sdk#7641

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants