47ng / 47ng/nuqs

AWS API Gateway returns 400 when {} are present in query values

オープン
#1,114 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
TypeScript
スター
10.8k
フォーク
294
平均マージ
1日 16時間
マージ済み PR(30日)
21

説明

## Context

What's your version of `nuqs`?

```
"nuqs": "2.5.2",
```

What framework are you using?

- ✅ Next.js (app router)

Which version of your framework are you using?

```
"next": "14.2.32",
```

## Description
- Requests to AWS API Gateway with `{}` in query values fail with 400 bad request (and appear to hard-crash the gateway, because no execution or access logs appear in CloudWatch for these requests)
- I am trying to use `parseAsJson`, which ends up serializing `{ hello: ['a', 'b'] }` as `{%22hello%22:[%22a%22,%22b%22]}`
- I expect `{}` to be URL-escaped into `%7B` and `%7D` respectively
- `:`, `[`, and `]` do not need to be escaped - AWS API Gateway works fine with those as-is

## Reproduction
- I do not have any public API Gateway services right now
- I could look into creating one if needed

## Related
- #1069
- #1068
- #925

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。