Skip to content

Add h1-case-adjust-bogus-server option - #237

Merged
xosk31 merged 1 commit into
six-group:mainfrom
kenichi-mashiyama:add-h1-case-adjust-bogus-server-option
Sep 22, 2026
Merged

xosk31 merged 1 commit into
six-group:mainfrom
kenichi-mashiyama:add-h1-case-adjust-bogus-server-option

Conversation

@kenichi-mashiyama

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for configuring the h1-case-adjust-bogus-server option within the defaults section of HAProxy configurations.

Motivation

By default, HAProxy normalizes HTTP header names to lowercase. While this complies with standard HTTP specifications, some legacy or non-compliant backend servers ("bogus servers") fail to process HTTP headers correctly if they are not in a specific case (e.g., CamelCase). The h1-case-adjust-bogus-server option in HAProxy provides a workaround for this issue. By introducing the h1CaseAdjustBogusServer field to the DefaultsConfiguration struct, users can now enable this option globally across all proxies directly via the Instance CRD.

Changes

  • Added the H1CaseAdjustBogusServer (bool) field to the DefaultsConfiguration struct in apis/proxy/v1alpha1/instance_types.go.
  • Updated the Model() method in apis/proxy/v1alpha1/instance_types.go to map this new field to the native HAProxy model (defaults.H1CaseAdjustBogusServer = models.DefaultsBaseH1CaseAdjustBogusServerEnabled).
  • Added unit tests (TestDefaultsConfiguration_AddToParser_H1CaseAdjustBogusServerEnabled and TestDefaultsConfiguration_AddToParser_H1CaseAdjustBogusServerDisabledByDefault) in apis/proxy/v1alpha1/instance_types_test.go to verify the correct generation of the option h1-case-adjust-bogus-server configuration line.
  • Regenerated CRDs and API documentation to reflect the new h1CaseAdjustBogusServer field.

Checklist

  • Code changes implemented
  • Unit tests added/updated
  • Generated CRDs and API docs updated

@xosk31 xosk31 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for your contribution

@xosk31
xosk31 merged commit c4c0414 into six-group:main Sep 22, 2026
4 checks passed
@kenichi-mashiyama
kenichi-mashiyama deleted the add-h1-case-adjust-bogus-server-option branch September 22, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants