Skip to content

Quote curl URLs in docs to prevent shell globbing#6561

Merged
mihaibudiu merged 3 commits into
feldera:mainfrom
asnimansari:docs/fix-url-quotes
Jun 29, 2026
Merged

Quote curl URLs in docs to prevent shell globbing#6561
mihaibudiu merged 3 commits into
feldera:mainfrom
asnimansari:docs/fix-url-quotes

Conversation

@asnimansari

Copy link
Copy Markdown

Unquoted URLs with query strings (e.g. ?format=json) fail in zsh because ? triggers glob expansion before curl runs. Wrap every curl URL in single quotes across documentation examples so commands work when copied verbatim.

Fixes #6560

Checklist

  • Unit tests added/updated
  • Integration tests added/updated
  • Documentation updated
  • Changelog updated

Breaking Changes?

Mark if you think the answer is yes for any of these components:

Unquoted URLs with query strings (e.g. `?format=json`) fail in zsh
because `?` triggers glob expansion before curl runs. Wrap every curl
URL in single quotes across documentation examples so commands work
when copied verbatim.

Fixes feldera#6560

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup overall — zsh globbing on ? is a real papercut and quoting the URLs is the right fix.

One issue: two of the URLs contain \& (backslash-escaped &), which was only there to protect the ampersand from the unquoted shell. Once the whole URL is wrapped in single quotes, the backslash is no longer a shell escape and ends up as a literal \ inside the URL — so the request goes out with & properly delimited but the preceding character is \, which breaks the query string. Inline comments on the two spots.

The raw.md case is fine because it uses a bare &, which is what you want inside single quotes.

Two unrelated nits while we're here:

  • A handful of files gained a single trailing blank line (e.g. connectors/completion-tokens.md, sinks/http.md, sources/http-get.md, sources/http.md, formats/raw.md, get-started/docker.md, get-started/enterprise/https.md). Worth dropping — keeps the diff to just the substantive change.
  • The PR doesn't touch connectors/sources/http.md's Bearer <API-KEY> example content, but please double-check there aren't other curl examples in the repo that still need this treatment — rg "curl .* http.*\?" docs.feldera.com is a quick way to spot stragglers.

Fix the \& regressions and I'll approve.

```bash
curl -i -X 'POST' \
http://127.0.0.1:8080/v0/pipelines/supply-chain-pipeline/egress/average_price?format=json\&send_snapshot=true
'http://127.0.0.1:8080/v0/pipelines/supply-chain-pipeline/egress/average_price?format=json\&send_snapshot=true'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regression: this URL contains \&. Outside single quotes, the backslash was protecting & from the shell. Inside single quotes the backslash is no longer interpreted by the shell and is passed verbatim to curl, producing a request to ...?format=json\&send_snapshot=true — that's a literal backslash in the query string, not a parameter separator, and the server will not parse send_snapshot correctly.

Drop the backslash:

curl -i -X 'POST' \
  'http://127.0.0.1:8080/v0/pipelines/supply-chain-pipeline/egress/average_price?format=json&send_snapshot=true'

```bash
curl -i -X 'POST' \
http://127.0.0.1:8080/v0/pipelines/supply-chain-pipeline/ingress/product?format=json\&array=true \
'http://127.0.0.1:8080/v0/pipelines/supply-chain-pipeline/ingress/product?format=json\&array=true' \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as in sinks/http.md: \& inside single quotes is a literal backslash followed by &, not an escaped ampersand. The URL needs a plain & now that the whole thing is single-quoted:

curl -i -X 'POST' \
  'http://127.0.0.1:8080/v0/pipelines/supply-chain-pipeline/ingress/product?format=json&array=true' \
  -d '[{"insert": {"pid": 0, "name": "hammer", "price": 5}}, {"insert": {"pid": 1, "name": "nail", "price": 0.02}}]'

Asnim Ansari added 2 commits June 30, 2026 00:50
Revert accidental EOF newlines introduced when quoting curl URLs.
No content changes.
Inside single quotes, `\&` is sent literally to the server. Use plain
`&` for query-string separators now that URLs are quoted.
@asnimansari

Copy link
Copy Markdown
Author

@mihaibudiu I have fixed the comments

  1. removing un necessary white space changes
  2. removing the escape character for &

@mihaibudiu mihaibudiu enabled auto-merge June 29, 2026 20:38
@mihaibudiu mihaibudiu added this pull request to the merge queue Jun 29, 2026
Merged via the queue into feldera:main with commit aec7707 Jun 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation example: HTTP-based Input and Output not working

3 participants