Skip to content

Failing test case with TRACE and request body #28

@kelunik

Description

@kelunik
Q A
Bug? yes
New Feature? no
Version 98cec80

Test Case

Starting test '4) Http\Adapter\Artax\Test\ClientTest::testSendRequest with data set #11 ('TRACE', 'http://127.0.0.1:10000/server.php', array('close', 'PHP HTTP Adapter', '0', 'utf-8', 'en'), 'param1=foo&param2%5B0%5D=bar&...5D=baz').

Actual Behavior

Failed asserting that an array has the key 'HTTP_CONTENT_LENGTH'.

Expected Behavior

The test shouldn't assert what it does. https://tools.ietf.org/html/rfc7231#section-4.3.8 says:

A client MUST NOT send a message body in a TRACE request.

Possible Solutions

All current clients fail to obey the RFC here and send a request body. artax-adapter does it better and just strips the body. Whether it should error out or silently strip is out of scope for this issue.

Metadata

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