Skip to content

Enable to remove "Content-Length: 0" for GET Request #2167

Closed
@ga0

Description

Long story short

When I send GET request to some http server with the "Content-Length: 0" header, will cause a aiohttp.ServerDisconnectedError. If I remove this header, everything goes well.

I don't know why these server hate empty content-length header so much.

Expected behaviour

Some args to remove Content-Length if it is 0 and method is GET.

Steps to reproduce

You can test by using the comands below.

curl -v -H "Content-Length: 0" http://115.238.34.168

curl -v http://115.238.34.168 

Your environment

aiohttp: 2.0.7

OS & Python:

  • macOS with Python 3.6.1
  • CentOS7 with Python 3.4.5

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions