Skip to content

Content-Length header not specified for empty POST requests with fsockopen transport #248

@dd32

Description

@dd32

A reported to WordPress.org Trac in #38427 the fsockopen transport fails to send a Content-Length: 0 header for empty payloads.

This causes some servers to respond with a 411 error.
To quote the above ticket:

HTTP result code 411 is "Length required". RFC2616 Section 14.13 says Content-Length header "SHOULD" be included. In practice, it is not used for GET nor HEAD requests, but is expected for POST requests.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions