Skip to content

[Http Server] - better error messageΒ #6078

Description

@smathersDT

#5794

This one caused an issue for me when i tried to update from 6.0.1 to 6.2.1

it introduces strict http header checking

  if (sw_unlikely(ctx->parser.error != HPE_OK || !ctx->completed)) {
      ctx->send(ctx, SW_STRL(SW_HTTP_BAD_REQUEST_PACKET));   // -> 400, err empty

A client of mine had setup a dynamic webservice on my site with a silly header called "Basic Authorization". which is clearly invalid. the site was not validating and just using the header. which started returning a 400 (no error message). i looked everywhere for this error in my code and when running the url locally it work (because i did not think to add the bad header).

Finally i realized maybe the 400 is not coming from my code, then i checked yours and see.

My ask is can we make this easier to debug, swoole warn or some error message returned because this was very hard to debug.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    in progressMaintainers are working on this

    Type

    No type

    Fields

    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