Skip to content

SOLR-18500: Single-quote the URL in every curl example - #5120

Open
serhiy-bzhezytskyy wants to merge 3 commits into
apache:mainfrom
serhiy-bzhezytskyy:SOLR-18500-curl-url-quoting
Open

serhiy-bzhezytskyy wants to merge 3 commits into
apache:mainfrom
serhiy-bzhezytskyy:SOLR-18500-curl-url-quoting

Conversation

@serhiy-bzhezytskyy

@serhiy-bzhezytskyy serhiy-bzhezytskyy commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/SOLR-18500

Description

Of 510 curl commands in the Ref Guide, the URL is single-quoted in 161, double-quoted in 89 and unquoted in 190. Eleven of the unquoted ones cannot be copied as written: the shell ends the URL at & or reads <signature> as a redirect.

Solution

Every URL is single-quoted, except the 6 that need shell escapes or $VAR expansion, and the v2 API page, which SOLR-18499 rewrites. -X GET and -XPOST next to -d are dropped, and -X POST in the -T example moves before the URL.

Written with Claude Code.

Tests

For each of the 263 commands that only changed quotes, bash passes curl the same arguments before and after. The 11 unquoted ones now pass the whole URL. buildLocalAntoraSite and checkSiteLinks pass.

Checklist

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide
  • I have added a changelog entry for my change

A single-quoted URL reaches curl as written, so a copied example does what the page says. Eleven
unquoted examples did not: the shell ended the URL at `&` or read `<signature>` as a redirect. URLs that
need `$VAR` expansion or escapes stay double-quoted; `-X` now comes before the URL and is dropped where curl implies it.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 13, 2026
That page is rewritten in SOLR-18499, which also single-quotes its curl examples.
@epugh

epugh commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

I'd love another set of eyes. Here is what we had:

image

And after this change:

image

We need to wrap certain urls that have & characters etc. But if we don't have that, should we still wrap them in single quotes? I like that we use single quotes everywhere, instead of a mix of single and double quote.. But maybe we don't want quotes on simpler URLs?

WOuld love another opinion on what looks best!

@epugh
epugh requested a review from gerlowskija October 13, 2026 15:29
@epugh

epugh commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

@janhoy @gerlowskija would love your opinon on the visual look of these CURL commands, see the one above!

@epugh epugh self-assigned this Oct 13, 2026
@epugh epugh added this to the 10.x milestone Oct 13, 2026
…uoting

# Conflicts:
#	solr/solr-ref-guide/modules/deployment-guide/pages/cluster-node-management.adoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants