curl / Mailing Lists / curl-library / Single Mail

curl-library

Disallow HTTP/0.9 ?

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 17 Dec 2018 16:00:27 +0100 (CET)

Hey,

I've just submitted a PR [1] that introduces a command line option and
curl_easy_setopt() option for *allowing* HTTP/0.9 reseponses.

A HTTP/0.9 response is a response that is entirely without headers and just a
body with a terminating connection close to signal the end of the data.

You can basically tell curl to connect to any random TCP service that outputs
data and unless it responses as a correct HTTP server, curl will silently
consider it to be HTTP/0.9 and get that data and wait for server close.

I believe this is not what most users would expect and that's why I propose
that we modify this behavior and let users opt-in to that treatment with the
help of these new options.

A more conservative route would be to take the DEPRECATE route and mark this
to happen in 6 months and until then we keep the previous behavior.

Thoughts? Any users of HTTP/0.9 or perhaps someone who is surprised that curl
so willingly accept 0.9 this way?

[1] = https://github.com/curl/curl/pull/3383

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2018-12-17