Skip to content

Add HTTP1 server config for allowing multiple spaces in parsing #3923

@heiwais25

Description

@heiwais25

Is your feature request related to a problem? Please describe.

We have a situation that we want to allow request to have multi spaces as a request line delimiter.

However, I found that the parser config for server is not exposed to the server builder unlike client.

Because of this, there is no way to use Hyper server to support those use case even though httparse crate has a flag for that feature.

Describe the solution you'd like

Expose the parser config in the similar way as Hyper Client.

As it will be configurable in the builder, it will not break other existing server behavior.

Client side example code: https://code.amazon.com/packages/S3DataEngineHyper/blobs/62a7a6badaba2858361fdc633727a97aed4c8853/--/src/client/conn/http1.rs#L350

Describe alternatives you've considered

  1. Update the httparse crate default configuration, but this will break the backward compatibility
  2. Expose ParserConfig itself to the Builder. However, this will make Hyper user to have coupling with httparse config

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-http1Area: HTTP/1 specific.A-serverArea: server.C-featureCategory: feature. This is adding a new feature.E-easyEffort: easy. A task that would be a great starting point for a new contributor.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions