Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Why curl does not send `Connection: Keep-Alive` in the header by default?
From: Peng Yu via curl-users <curl-users_at_cool.haxx.se>
Date: Fri, 1 Nov 2019 23:18:03 -0500
Date: Fri, 1 Nov 2019 23:18:03 -0500
Here is the netcat output of curl.
```
$ nc -l -p 9000
HEAD / HTTP/1.1
Host: localhost:9000
User-Agent: curl/7.66.0
Accept: */*
$ curl -ss -iLI http://localhost:9000
```
Here is the netcat output of wget. Does anybody know why curl does not
use the same request header as the wget? Is there an option to make
curl behave the same as wget in this aspect? Thanks.
```
$ nc -l -p 9000
HEAD / HTTP/1.1
User-Agent: Wget/1.20.3 (darwin18.6.0)
Accept: */*
Accept-Encoding: identity
Host: localhost:9000
Connection: Keep-Alive
$ wget -q --spider -S -o- http://localhost:9000
-- Regards, Peng ----------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2019-11-02