Skip to content

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

Closed

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.

Activity

  1. added
    C-featureCategory: feature. This is adding a new feature.
    on Jul 31, 2025
  2. seanmonstar commented on Aug 1, 2025

    @seanmonstar
    Member

    Assuming you mean add configuration methods to the server http1::Builder for those options, definitely!

  3. added
    E-easyEffort: easy. A task that would be a great starting point for a new contributor.
    A-http1Area: HTTP/1 specific.
    on Aug 1, 2025
  4. changed the title [-]Expose parser config as a Server configuration like Client[/-] [+]Add HTTP1 server config for allowing multiple spaces in parsing[/+] on Aug 1, 2025
  5. magurotuna commented on Dec 7, 2025

    @magurotuna
    Contributor

    This was resolved by #3929 so I presume we can close it?

  6. heiwais25 commented on Dec 8, 2025

    @heiwais25
    Author

    Sorry for late. I double checked and found the ask was to expose this feature for the server.

    let mut req = httparse::Request::new(&mut []);

    The change was about enhancing h1_parser_config, and found it is not actually used by Server implementation. It is used by Client only.

    Please correct me if I'm wrong.

  7. heiwais25 commented on Dec 8, 2025

    @heiwais25
    Author

    I believe we need to reopen the ticket again unless I missed the implementation for Server.

    We can do like using match ctx.h1_parser_config.parse_request~~() with the default config used currently

    I was occupied with others, but now I have some time. Let me create a PR for this.

  8. seanmonstar commented on Dec 8, 2025

    @seanmonstar
    Member

    Ah, I see. So the builder method was added to the public API, but the parser doesn't yet use that config.

  9. heiwais25 commented on Dec 8, 2025

    @heiwais25
    Author

    Yes, that's correct.

  10. 0xPoe commented on Jan 3, 2026

    @0xPoe
    Contributor

    @heiwais25 I have created a PR for it: #4002. I hope I understood your request correctly, and I also added unit tests. It seems to work well.

  11. added a commit that references this issue on Jan 5, 2026
    bcb8ec5
  12. heiwais25 commented on Jan 5, 2026

    @heiwais25
    Author

    Thanks! @0xPoe

  13. added 2 commits that reference this issue on Oct 21, 2026
    215cda5
    8d13f73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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