Update param-forward-tsn-supported to RFC 9260 - #423
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #423 +/- ##
=======================================
Coverage 83.84% 83.85%
=======================================
Files 51 51
Lines 3448 3450 +2
=======================================
+ Hits 2891 2893 +2
Misses 417 417
Partials 140 140
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds validation for the Forward TSN Supported parameter to ensure it conforms to RFC 9260 requirements. The parameter must be header-only (length=4) with no payload data.
Key Changes:
- Added validation in
unmarshalto reject parameters with non-empty payloads - Introduced a new error type
ErrForwardTSNSupportedParamInvalidLengthfor invalid length errors - Added comprehensive test coverage for both invalid unmarshal and marshal edge cases
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| param_forward_tsn_supported.go | Added error constant and validation logic to enforce header-only parameter format |
| param_forward_tsn_supported_test.go | Added two new test cases covering invalid length unmarshal and marshal behavior with pre-filled raw data |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
rawis empty inunmarshal().Reference issue
Resolves #422.