Skip to content

Connection: close and Connection: keep-alive both present in the header #8205

Closed
@enjoyneering

Description

@enjoyneering

Basic Infos

  • [x ] This issue complies with the issue POLICY doc.
  • [x ] I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • [x ] I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • [x ] I have filled out all fields below.

Platform

  • Hardware: [ESP-12]
  • Core Version: [3.0.1]
  • Development Env: [Arduino IDE]
  • Operating System: [Windows]

Settings in IDE

  • Module: [Wemos D1 mini r2]
  • Flash Mode: [qio]
  • Flash Size: [4MB]
  • lwip Variant: [v2 Higher Bandwidth]
  • Reset Method: [nodemcu]
  • Flash Frequency: [80Mhz]
  • CPU Frequency: [80Mhz]
  • Upload Using: [OTA]
  • Upload Speed: [115200] (serial upload only)

Problem Description

Accordind to the comment in ESP8266WebServer.h - if the client sends the "Connection" header, the value given by the header is used. But in fact, both server.keepAlive(true); and server.sendHeader(F("Connection"), F("close")); server.send(200); is present in the header.

HTTP/1.1 200 OK
Content-Type:
Connection: close
Content-Length: 0
Connection: keep-alive
Keep-Alive: timeout=2000

UDP:
For some reason short version server.send(200, F("Connection"), F("close")); doesn't work (only keep-alive is present).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions