curl / Mailing Lists / curl-users / Single Mail


Re: & in the URL

From: Daniel Stenberg <>
Date: Sat, 24 Mar 2018 10:43:59 +0100 (CET)

On Sat, 24 Mar 2018, Mike Lambert wrote:

> Problem is :- when the URL has a & in it I get the error unknown command.

That's a problem for your environment where you use that URL. It is not a
curl problem.

Whatever you use that URL in seems to split up the URL on the & position and
treat the right side of the URL as another command. That's not done by curl.

Usually you tell shells, command promts and others to not fiddle with URL
contents by enclosing the URL within double quotes. (Or sometimes single

Since you don't really tell us how or where you set this URL, we can't really
tell you exactly how to fix this problem. Something is not liking it _before_
curl gets a chance to play with it.

Received on 2018-03-24