)]}'
{
  "commit": "a1a1a9ed5c965ee914ae8437e8c56771ef4b0d6d",
  "tree": "036040000ccacbfce17c9490732935affed99a5c",
  "parents": [
    "2a0d3a18389f8ac04b6d4a3586555c0e14231dd6"
  ],
  "author": {
    "name": "QUICHE team",
    "email": "quiche-dev@google.com",
    "time": "Tue Nov 25 09:24:30 2025 -0800"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue Nov 25 09:25:27 2025 -0800"
  },
  "message": "Always reset content length status when removing the Content-Length header in BalsaHeaders.\n\nCurrently, when removing the \"Content-Length\" header, BalsaHeaders does not reset its internal content length status if \"Transfer-Encoding: chunked\" is also present. This can lead to inconsistencies where `content_length_valid()` remains true even after the \"Content-Length\" header is gone. This change introduces a new reloadable flag, `gfe2_reloadable_flag_reset_content_length_status_when_removing_content_length_header`, which, when true, ensures that the content length status is always reset when \"Content-Length\" is removed, regardless of the presence of \"Transfer-Encoding: chunked\". Tests are added to cover a scenario where both headers are initially present in a request.\n\nI manually e2e tested, and confirmed that\n* When gfe2_reloadable_flag_reset_content_length_status_when_removing_content_length_header is false, we saw `REQUIRED_BODY_BUT_NO_CONTENT_LENGTH` in the test backend http://screen/C7QyLfJxaEwCtsA.\n* When the feature flag is true, the response code is 200, and the request headers sent by GFE has `transfer-encoding`: http://screen/9yDWwpGSFhnYVZi\n\nI am now writing the nice automated e2e test that requires changes in the implementation. Given the tight timeline of the product launch, I don\u0027t think the automated test is blocking this change.\n\nProtected by gfe2_reloadable_flag_reset_content_length_status_when_removing_content_length_header.\n\nPiperOrigin-RevId: 836699619\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ae4ce40dd9b0a332f5de8e0682acb6edd5f4fdf4",
      "old_mode": 33188,
      "old_path": "quiche/balsa/balsa_headers.cc",
      "new_id": "dcb3aa2e2fe09880d9cb40fc55eb4882e828ecdf",
      "new_mode": 33188,
      "new_path": "quiche/balsa/balsa_headers.cc"
    },
    {
      "type": "modify",
      "old_id": "b00ca2b1a5c4c7b2d0344e2e3271cb9b4143d7dd",
      "old_mode": 33188,
      "old_path": "quiche/balsa/balsa_headers_test.cc",
      "new_id": "f67a078df5b033e5bed309a3631afd87ac18a485",
      "new_mode": 33188,
      "new_path": "quiche/balsa/balsa_headers_test.cc"
    },
    {
      "type": "modify",
      "old_id": "aec984a59a468d9f465f522229def7fdf9517001",
      "old_mode": 33261,
      "old_path": "quiche/common/quiche_feature_flags_list.h",
      "new_id": "cabd955b74cd71b4001251b35ceabda5e70934ea",
      "new_mode": 33261,
      "new_path": "quiche/common/quiche_feature_flags_list.h"
    }
  ]
}
