Skip to content

"Connection:" header should default to 'keep-alive' in HTTP/1.1 on the regular Client API #369

@dkeeney

Description

@dkeeney

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Connection

What I am getting is Connection: close which is the default for HTTP/1.0.
For HTTP/1.1 the default should be Connection: keep-alive.

================================
GET HTTP/1.1 /hi
  Accept: */*
  Connection: close
  Content-Length: 0
  Host: localhost:8050
  REMOTE_ADDR: 127.0.0.1
  User-Agent: cpp-httplib/0.5
--------------------------------
200 HTTP/1.1
  Connection: close
  Content-Length: 13
  Content-Type: text/plain
body: Hello World!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions