Score:0

Add some text to curl's user agent string? (i.e. curl with a UA that includes curl's default UA & my text)

bg flag

I am writing a shell script which uses curl(1) to download files. By default curl will set a HTTP User-Agent (UA) to something like curl/7.74.0. I want to be a good internet citizen and set the UA to say what my script is. Since the software that is making HTTP requests is still curl, I would like this user agent to also include the default curl UA.

I can replace User-Agent with -A, but is it possible to add something to the default curl UA? Is there an argument to prefix/suffix my text to what curl would normally send? (e.g. curl --append-to-ua ' mysoftware/1.0' … results in User-Agent: curl/7.74.0 mysoftware/1.0 http header)

(curl v7.74.0 installed via apt on debian 11)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.