curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to send absolute URI?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 21 Feb 2017 17:55:25 +0100 (CET)

On Tue, 21 Feb 2017, Tanyaofeng wrote:

> I call
> curl_easy_setopt£¨curl£¬CURLOPT_URL£¬¡°http://www.w3.org/pub/WWW/TheProject.html¡±£©;
>
> expect to send a HTTP request like this:
>
> get http://www.w3.org/pub/WWW/TheProject.html HTTP / 1.1

Why would you expect that? That's not what HTTP clients do unless it speaks
with a proxy.

You can trick curl into using that by saying your server is a proxy (too).

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-02-21