You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pierrejeambrun (via GitHub)" <gi...@apache.org> on 2026/06/17 09:39:24 UTC
[PR] Percent-encode API client path params for keys with slashes [airflow]
pierrejeambrun opened a new pull request, #68667:
URL: https://github.com/apache/airflow/pull/68667
Variable keys may start with or contain `/` (e.g. `/foo`). The generated UI API client interpolated path params with `encodeURI`, which intentionally leaves `/` unescaped — so a key `/foo` produced a literal `//` in the URL (`/api/v2/variables//foo`). Some proxies collapse `//` → `/`, silently dropping the slash and corrupting the key, so GET/PATCH/DELETE of such variables fail behind those proxies (create is unaffected, since the key travels in the request body).
Switching `OpenAPI.ENCODE_PATH` to `encodeURIComponent` escapes `/` as `%2F`, so no literal `//` ever appears; the backend decodes it back to `/`. It's a no-op for plain keys, and also correctly escapes other characters (`?`, `#`, `&`, …) that `encodeURI` wrongly left untouched in path-param values.
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Opus 4.8)
Generated-by: Claude Code (Opus 4.8) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Percent-encode API client path params for keys with slashes [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on PR #68667:
URL: https://github.com/apache/airflow/pull/68667#issuecomment-4728309642
## Before
https://github.com/user-attachments/assets/d331c68e-e32d-4a4c-bf86-289df2c7be1b
## After
https://github.com/user-attachments/assets/7384e30a-91cc-4413-a03a-364e2e67281e
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Percent-encode API client path params [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun merged PR #68667:
URL: https://github.com/apache/airflow/pull/68667
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org