tyk icon indicating copy to clipboard operation
tyk copied to clipboard

[TT-13257] Fix websocket upgrade with multiple values in Connection header

Open Darkness4 opened this issue 1 year ago • 2 comments

Description

To check for Websocket connection upgrade, replaces the "!=" check with the "not contains" check.

Related Issue

Closes #6449.

How This Has Been Tested

A test case has been added.

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [x] Refactoring or add test (improvements in base code or adds test coverage to functionality)

Checklist

  • [x] I ensured that the documentation is up to date
  • [ ] ~I explained why this PR updates go.mod in detail with reasoning why it's required~
  • [ ] ~I would like a code coverage CI quality gate exception and have explained why~

Darkness4 avatar Oct 09 '24 10:10 Darkness4

Hi,

thank you for the contribution. The approach looks good for the most part, two requests raised from review:

  • can you use testify/assert in tests (we're standardising on it, but have some fragmentation)
  • can you please extend the internal/httputil location with a unit test (ideally that's black box)

Thank you :)

titpetric avatar Oct 09 '24 11:10 titpetric

@titpetric You can re-review. :slightly_smiling_face:

Darkness4 avatar Oct 09 '24 15:10 Darkness4