🐛 bug: fix redirection flash messages violate cookie structure#3457
🐛 bug: fix redirection flash messages violate cookie structure#3457ReneWerner87 merged 5 commits intomainfrom
Conversation
|
""" WalkthroughThe changes implement hex encoding and decoding for flash message data stored in cookies. In both the main logic and corresponding tests, flash messages are now hex-encoded before being set in cookies and hex-decoded when read, replacing previous direct usage of raw byte slices. Error handling for decoding is also introduced in tests. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server
Client->>Server: Sends request triggering redirect with flash message
Server->>Server: Marshal flash messages
Server->>Server: Hex-encode marshaled data
Server->>Client: Set cookie with hex-encoded flash message
Client->>Server: Sends subsequent request with cookie
Server->>Server: Read cookie value
Server->>Server: Hex-decode cookie value
Server->>Server: Unmarshal flash messages
Server->>Client: Respond with flash message
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (5)
🔇 Additional comments (15)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3457 +/- ##
==========================================
+ Coverage 84.10% 84.20% +0.10%
==========================================
Files 119 119
Lines 11939 11947 +8
==========================================
+ Hits 10041 10060 +19
+ Misses 1468 1460 -8
+ Partials 430 427 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
redirect.go(3 hunks)redirect_test.go(15 hunks)
🧰 Additional context used
🪛 GitHub Check: lint
redirect.go
[failure] 300-300:
Error return value of hex.DecodeString is not checked (errcheck)
redirect_test.go
[failure] 325-325:
ineffectual assignment to err (ineffassign)
🪛 GitHub Actions: golangci-lint
redirect.go
[error] 300-300: golangci-lint: Error return value of hex.DecodeString is not checked (errcheck)
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: unit (1.24.x, windows-latest)
- GitHub Check: unit (1.23.x, macos-latest)
- GitHub Check: unit (1.23.x, macos-13)
- GitHub Check: unit (1.23.x, windows-latest)
- GitHub Check: repeated
- GitHub Check: Analyse
- GitHub Check: Compare
🔇 Additional comments (3)
redirect.go (1)
320-326: LGTM! Hex encoding implementationProperly implementing hex encoding for the cookie value resolves the issue with flash messages violating cookie structure.
redirect_test.go (2)
417-417: LGTM! Correctly updated test casesAll test cases have been correctly updated to use hex encoding/decoding, maintaining consistency with the implementation changes.
Also applies to: 598-598, 671-671, 708-708, 743-743, 774-774
49-52: LGTM! Updated cookie decoding with proper error handlingThe test decoding logic has been updated to handle hex-encoded cookie values correctly, with proper error checks in place.
Also applies to: 194-197, 247-250, 286-289, 369-372, 556-559, 649-652
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
redirect.go(3 hunks)redirect_test.go(15 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- redirect_test.go
🧰 Additional context used
🪛 GitHub Check: codecov/patch
redirect.go
[warning] 302-303: redirect.go#L302-L303
Added lines #L302 - L303 were not covered by tests
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: Analyse
- GitHub Check: Compare
- GitHub Check: unit (1.23.x, windows-latest)
- GitHub Check: unit (1.24.x, windows-latest)
- GitHub Check: repeated
- GitHub Check: unit (1.23.x, macos-latest)
- GitHub Check: unit (1.23.x, macos-13)
🔇 Additional comments (3)
redirect.go (3)
8-8: Appropriate import added for hex encodingThe addition of the hex package import is necessary for the new encoding approach and aligns with the PR objective to fix cookie structure violations.
323-325: Hex encoding implementation is correct and efficientThe implementation correctly allocates a buffer of the appropriate size and performs hex encoding of the MessagePack serialized data. This approach fixes the cookie structure violation issue while maintaining the benefits of MessagePack serialization.
328-328: Properly using hex-encoded value for cookieThe cookie now uses the hex-encoded value instead of the binary data, which completes the fix for the cookie structure violation.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
redirect.go(3 hunks)redirect_test.go(16 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- redirect_test.go
🧰 Additional context used
🧬 Code Graph Analysis (1)
redirect.go (1)
ctx.go (1)
Cookie(180-192)
🪛 GitHub Check: codecov/patch
redirect.go
[warning] 302-303: redirect.go#L302-L303
Added lines #L302 - L303 were not covered by tests
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: unit (1.23.x, macos-13)
- GitHub Check: unit (1.24.x, macos-13)
- GitHub Check: Compare
- GitHub Check: repeated
🔇 Additional comments (3)
redirect.go (3)
8-8: Appropriate import addition for hex encoding/decodingThe addition of the hex package is necessary for the implementation of hex encoding and decoding for flash messages in cookies.
323-325: Hex encoding correctly implementedThe code properly allocates a buffer of the right size using
hex.EncodedLen()and encodes the binary data usinghex.Encode(). This implementation avoids cookie structure violations by ensuring the binary data is represented in a cookie-safe format.
328-328: Cookie value properly set with hex-encoded dataThe cookie value is now correctly set using the hex-encoded flash message data, which resolves the issue of cookie structure violations.
|
@coderabbitai can you please generate more test cases i.e. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain@ReneWerner87 Based on my analysis of the codebase, I've created a comprehensive test case that covers the complete flow of the redirect process with flash messages. This test simulates a realistic scenario with a first handler setting flash messages and redirecting, followed by a second request that should receive those messages. func Test_Redirect_CompleteFlowWithFlashMessages(t *testing.T) {
t.Parallel()
app := New()
// Create a handler that sets flash messages and redirects
app.Get("/source", func(c *Ctx) error {
// Set multiple types of flash messages to test encoding/decoding
c.Flash("string_message", "Hello, World!")
c.Flash("number_message", 12345)
c.Flash("bool_message", true)
c.Flash("map_message", map[string]string{"key": "value"})
c.Flash("slice_message", []string{"one", "two", "three"})
// Redirect to the target handler
return c.Redirect("/target", StatusFound)
})
// Create a handler that receives and processes flash messages
app.Get("/target", func(c *Ctx) error {
// Get all flash messages and return them as a JSON response
flashMessages := make(map[string]interface{})
flashMessages["string_message"] = c.Flash("string_message")
flashMessages["number_message"] = c.Flash("number_message")
flashMessages["bool_message"] = c.Flash("bool_message")
flashMessages["map_message"] = c.Flash("map_message")
flashMessages["slice_message"] = c.Flash("slice_message")
return c.JSON(flashMessages)
})
// Step 1: Make the initial request to the source route
req := httptest.NewRequest(MethodGet, "/source", nil)
resp, err := app.Test(req)
utils.AssertEqual(t, nil, err)
utils.AssertEqual(t, StatusFound, resp.StatusCode)
utils.AssertEqual(t, "/target", resp.Header.Get(HeaderLocation))
// Get the cookie from the response
cookies := resp.Cookies()
var flashCookie *http.Cookie
for _, cookie := range cookies {
if cookie.Name == "fiber_flash" {
flashCookie = cookie
break
}
}
utils.AssertEqual(t, true, flashCookie != nil, "Expected flash cookie to be set")
// Step 2: Make the second request to the target route with the cookie
req = httptest.NewRequest(MethodGet, "/target", nil)
req.Header.Set("Cookie", flashCookie.Name+"="+flashCookie.Value)
resp, err = app.Test(req)
utils.AssertEqual(t, nil, err)
utils.AssertEqual(t, StatusOK, resp.StatusCode)
// Step 3: Parse the JSON response and verify flash messages
body, err := io.ReadAll(resp.Body)
utils.AssertEqual(t, nil, err)
var result map[string]interface{}
err = json.Unmarshal(body, &result)
utils.AssertEqual(t, nil, err)
// Verify all flash messages were received correctly
utils.AssertEqual(t, "Hello, World!", result["string_message"])
utils.AssertEqual(t, float64(12345), result["number_message"]) // JSON numbers are float64
utils.AssertEqual(t, true, result["bool_message"])
// Check map_message
mapMsg, ok := result["map_message"].(map[string]interface{})
utils.AssertEqual(t, true, ok)
utils.AssertEqual(t, "value", mapMsg["key"])
// Check slice_message
sliceMsg, ok := result["slice_message"].([]interface{})
utils.AssertEqual(t, true, ok)
utils.AssertEqual(t, 3, len(sliceMsg))
utils.AssertEqual(t, "one", sliceMsg[0])
utils.AssertEqual(t, "two", sliceMsg[1])
utils.AssertEqual(t, "three", sliceMsg[2])
}Here's a test that focuses on edge cases with large data and special characters: func Test_Redirect_FlashMessagesWithSpecialChars(t *testing.T) {
t.Parallel()
app := New()
// Create a handler that sets flash messages with special characters and redirects
app.Get("/special-source", func(c *Ctx) error {
// Test with messages containing special characters that could break headers
c.Flash("null_bytes", "Contains\x00null\x00bytes")
c.Flash("control_chars", "Contains\r\ncontrol\tcharacters")
c.Flash("unicode", "Unicode: 你好世界")
c.Flash("emoji", "Emoji: 🔥🚀😊")
// Create a large message to test encoding of larger data
largeMessage := strings.Repeat("abcdefghijklmnopqrstuvwxyz", 100)
c.Flash("large_message", largeMessage)
return c.Redirect("/special-target", StatusFound)
})
// Create a target handler
app.Get("/special-target", func(c *Ctx) error {
return c.JSON(fiber.Map{
"null_bytes": c.Flash("null_bytes"),
"control_chars": c.Flash("control_chars"),
"unicode": c.Flash("unicode"),
"emoji": c.Flash("emoji"),
"large_message_correct": c.Flash("large_message") == strings.Repeat("abcdefghijklmnopqrstuvwxyz", 100),
"large_message_length": len(c.Flash("large_message").(string)),
})
})
// Step 1: Make the initial request
req := httptest.NewRequest(MethodGet, "/special-source", nil)
resp, err := app.Test(req)
utils.AssertEqual(t, nil, err)
utils.AssertEqual(t, StatusFound, resp.StatusCode)
// Get the flash cookie
var flashCookie *http.Cookie
for _, cookie := range resp.Cookies() {
if cookie.Name == "fiber_flash" {
flashCookie = cookie
break
}
}
utils.AssertEqual(t, true, flashCookie != nil)
// Step 2: Make the second request with the cookie
req = httptest.NewRequest(MethodGet, "/special-target", nil)
req.Header.Set("Cookie", flashCookie.Name+"="+flashCookie.Value)
resp, err = app.Test(req)
utils.AssertEqual(t, nil, err)
utils.AssertEqual(t, StatusOK, resp.StatusCode)
// Step 3: Parse and verify the response
body, err := io.ReadAll(resp.Body)
utils.AssertEqual(t, nil, err)
var result map[string]interface{}
err = json.Unmarshal(body, &result)
utils.AssertEqual(t, nil, err)
// Verify special character handling
utils.AssertEqual(t, "Contains\x00null\x00bytes", result["null_bytes"])
utils.AssertEqual(t, "Contains\r\ncontrol\tcharacters", result["control_chars"])
utils.AssertEqual(t, "Unicode: 你好世界", result["unicode"])
utils.AssertEqual(t, "Emoji: 🔥🚀😊", result["emoji"])
utils.AssertEqual(t, true, result["large_message_correct"])
utils.AssertEqual(t, 26*100, int(result["large_message_length"].(float64)))
}Would you like me to generate any additional test cases that focus on specific aspects of the flow? 🏁 Script executed: Length of output: 7854 🏁 Script executed: Length of output: 24641 🏁 Script executed: Length of output: 1358 @ReneWerner87 I've created two comprehensive test cases that test the complete flow of redirect with flash messages, simulating the full client/server experience: func Test_Redirect_CompleteFlowWithFlashMessages(t *testing.T) {
t.Parallel()
app := New()
// First handler that sets flash messages and redirects
app.Get("/source", func(c Ctx) error {
// Set multiple types of flash messages to test encoding/decoding
c.Flash("string_message", "Hello, World!")
c.Flash("number_message", 12345)
c.Flash("bool_message", true)
c.Flash("map_message", map[string]string{"key": "value"})
c.Flash("slice_message", []string{"one", "two", "three"})
// Redirect to the target handler
return c.Redirect().To("/target")
})
// Second handler that receives and processes flash messages
app.Get("/target", func(c Ctx) error {
// Get all flash messages and return them as a JSON response
return c.JSON(fiber.Map{
"string_message": c.Flash("string_message"),
"number_message": c.Flash("number_message"),
"bool_message": c.Flash("bool_message"),
"map_message": c.Flash("map_message"),
"slice_message": c.Flash("slice_message"),
})
})
// Step 1: Make the initial request to the source route
req := httptest.NewRequest(MethodGet, "/source", nil)
resp, err := app.Test(req)
require.NoError(t, err)
require.Equal(t, StatusSeeOther, resp.StatusCode)
require.Equal(t, "/target", resp.Header.Get(HeaderLocation))
// Verify and get the cookie from the response
cookies := resp.Cookies()
var flashCookie *http.Cookie
for _, cookie := range cookies {
if cookie.Name == "fiber_flash" {
flashCookie = cookie
break
}
}
require.NotNil(t, flashCookie, "Flash cookie should be set")
// Step 2: Make the second request to the target route with the cookie
req = httptest.NewRequest(MethodGet, "/target", nil)
req.Header.Set("Cookie", flashCookie.Name+"="+flashCookie.Value)
resp, err = app.Test(req)
require.NoError(t, err)
require.Equal(t, StatusOK, resp.StatusCode)
// Parse the JSON response and verify flash messages
body, err := io.ReadAll(resp.Body)
require.NoError(t, err)
var result map[string]interface{}
err = json.Unmarshal(body, &result)
require.NoError(t, err)
// Verify all flash messages were received correctly
require.Equal(t, "Hello, World!", result["string_message"])
require.Equal(t, float64(12345), result["number_message"]) // JSON numbers are float64
require.Equal(t, true, result["bool_message"])
// Check map_message
mapMsg, ok := result["map_message"].(map[string]interface{})
require.True(t, ok)
require.Equal(t, "value", mapMsg["key"])
// Check slice_message
sliceMsg, ok := result["slice_message"].([]interface{})
require.True(t, ok)
require.Equal(t, 3, len(sliceMsg))
require.Equal(t, "one", sliceMsg[0])
require.Equal(t, "two", sliceMsg[1])
require.Equal(t, "three", sliceMsg[2])
}And a second test that focuses on the specific edge cases the PR is fixing (null bytes, special characters, etc.): func Test_Redirect_FlashMessagesWithSpecialChars(t *testing.T) {
t.Parallel()
app := New()
// Handler that sets flash messages with special characters and redirects
app.Get("/special-source", func(c Ctx) error {
// Set flash messages with content that would previously break headers
c.Flash("null_bytes", "Contains\x00null\x00bytes")
c.Flash("control_chars", "Contains\r\ncontrol\tcharacters")
c.Flash("unicode", "Unicode: 你好世界")
c.Flash("emoji", "Emoji: 🔥🚀😊")
// Create a large message to test encoding of larger data
largeMessage := strings.Repeat("abcdefghijklmnopqrstuvwxyz", 100)
c.Flash("large_message", largeMessage)
return c.Redirect().To("/special-target")
})
// Target handler that receives the flash messages
app.Get("/special-target", func(c Ctx) error {
return c.JSON(fiber.Map{
"null_bytes": c.Flash("null_bytes"),
"control_chars": c.Flash("control_chars"),
"unicode": c.Flash("unicode"),
"emoji": c.Flash("emoji"),
"large_message_correct": c.Flash("large_message") == strings.Repeat("abcdefghijklmnopqrstuvwxyz", 100),
"large_message_length": len(c.Flash("large_message").(string)),
})
})
// Step 1: Make the initial request
req := httptest.NewRequest(MethodGet, "/special-source", nil)
resp, err := app.Test(req)
require.NoError(t, err)
require.Equal(t, StatusSeeOther, resp.StatusCode)
require.Equal(t, "/special-target", resp.Header.Get(HeaderLocation))
// Get the flash cookie
var flashCookie *http.Cookie
for _, cookie := range resp.Cookies() {
if cookie.Name == "fiber_flash" {
flashCookie = cookie
break
}
}
require.NotNil(t, flashCookie, "Flash cookie should be set")
// Step 2: Make the second request with the cookie
req = httptest.NewRequest(MethodGet, "/special-target", nil)
req.Header.Set("Cookie", flashCookie.Name+"="+flashCookie.Value)
resp, err = app.Test(req)
require.NoError(t, err)
require.Equal(t, StatusOK, resp.StatusCode)
// Parse and verify the response
body, err := io.ReadAll(resp.Body)
require.NoError(t, err)
var result map[string]interface{}
err = json.Unmarshal(body, &result)
require.NoError(t, err)
// Verify special character handling
require.Equal(t, "Contains\x00null\x00bytes", result["null_bytes"])
require.Equal(t, "Contains\r\ncontrol\tcharacters", result["control_chars"])
require.Equal(t, "Unicode: 你好世界", result["unicode"])
require.Equal(t, "Emoji: 🔥🚀😊", result["emoji"])
require.Equal(t, true, result["large_message_correct"])
require.Equal(t, 26*100, int(result["large_message_length"].(float64)))
}Would you like me to create any additional test scenarios that focus on other aspects of the redirect flow with flash messages? |
There was a problem hiding this comment.
Pull Request Overview
The PR fixes a bug in flash message redirection where the HTTP header was being broken by using raw msgpack binary data, by switching to hex encoding/decoding of the flash cookie values. Key changes include:
- Updating tests to decode the flash cookie value using hex.DecodeString before unmarshalling.
- Modifying processFlashMessages and parseAndClearFlashMessages to use hex encoding instead of plain string conversion.
- Adjusting benchmarks to reflect the new hex encoding in flash message processing.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| redirect_test.go | Updated tests and benchmarks to decode/encode flash cookies in hex |
| redirect.go | Modified flash message parsing and processing to use hex encoding |
Comments suppressed due to low confidence (1)
redirect.go:323
- [nitpick] Consider renaming the variable 'dst' to something like 'encodedVal' to enhance code clarity.
dst := make([]byte, hex.EncodedLen(len(val)))
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
redirect_test.go (2)
564-564: Consider using 'any' instead of 'interface{}'.Since Go 1.18, you can use 'any' as a more concise alias for 'interface{}'.
-var result map[string]interface{} +var result map[string]any🧰 Tools
🪛 GitHub Check: lint
[failure] 564-564:
use-any: since Go 1.18 'interface{}' can be replaced by 'any' (revive)
627-627: Consider using 'any' instead of 'interface{}'.Since Go 1.18, you can use 'any' as a more concise alias for 'interface{}'.
-var result map[string]interface{} +var result map[string]any🧰 Tools
🪛 GitHub Check: lint
[failure] 627-627:
use-any: since Go 1.18 'interface{}' can be replaced by 'any' (revive)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
redirect_test.go(16 hunks)
🧰 Additional context used
🪛 GitHub Check: lint
redirect_test.go
[failure] 627-627:
use-any: since Go 1.18 'interface{}' can be replaced by 'any' (revive)
[failure] 564-564:
use-any: since Go 1.18 'interface{}' can be replaced by 'any' (revive)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: unit (1.24.x, macos-13)
- GitHub Check: unit (1.24.x, macos-latest)
- GitHub Check: unit (1.24.x, windows-latest)
- GitHub Check: unit (1.23.x, macos-13)
- GitHub Check: unit (1.23.x, windows-latest)
- GitHub Check: repeated
- GitHub Check: Analyse
- GitHub Check: Compare
🔇 Additional comments (7)
redirect_test.go (7)
9-14: Appropriate imports for the newly added test functionality.The added imports accurately support the new functionality, particularly hex encoding for flash messages and additional HTTP testing capabilities.
54-57: Correctly implemented hex decoding with proper error handling.The code now properly hex-decodes the flash cookie data before unmarshaling, with appropriate error handling. This aligns with the fix in the main implementation to prevent HTTP header structure violations.
423-423: Properly encoding flash message data with hex.All instances of setting the flash cookie now use hex encoding, which fixes the issue where binary data in cookies violated HTTP header structure requirements.
477-482: Good addition of error case handling.Testing the case where the flash cookie contains an invalid value ("test") ensures the system handles malformed inputs gracefully.
484-509: Comprehensive testing for invalid hex data.This test case specifically validates the system's behavior when encountering improperly formatted hex data in the flash cookie, ensuring no messages are processed rather than causing errors or undefined behavior.
511-572: Excellent end-to-end test coverage.This comprehensive test verifies the complete redirect flow with flash messages using standard Go HTTP testing utilities, validating both the redirect mechanism and the proper transmission of various data types through flash messages.
🧰 Tools
🪛 GitHub Check: lint
[failure] 564-564:
use-any: since Go 1.18 'interface{}' can be replaced by 'any' (revive)
574-636: Thorough edge case testing with special characters.Testing with null bytes, control characters, Unicode, and emoji ensures the hex encoding solution properly handles all types of data that might otherwise break HTTP headers.
🧰 Tools
🪛 GitHub Check: lint
[failure] 627-627:
use-any: since Go 1.18 'interface{}' can be replaced by 'any' (revive)
* main: Update AGENTS.md Create AGENTS.md 🐛 bug: fix redirection flash messages violate cookie structure (gofiber#3457) build(deps): bump codecov/codecov-action from 5.4.2 to 5.4.3 🚀 Improve routing treeBuild flow (gofiber#3456) build(deps): bump github.com/tinylib/msgp from 1.2.5 to 1.3.0 (gofiber#3447) build(deps): bump DavidAnson/markdownlint-cli2-action from 19 to 20 🔥 feat: Add All method to Bind (gofiber#3373) 📝 docs: Document usage of Custom Tags in Logger middleware (gofiber#3446)
Description
This issue fixes redirection with flash messages breaks HTTP header format by encoding msgpack serialized binary data with hex. It has little overhead, but still we get benefit of using Messagepack. Here are the benchmark results:
Fixes #3437
Type of change
Checklist
Before you submit your pull request, please make sure you meet these requirements:
/docs/directory for Fiber's documentation.Commit formatting
Please use emojis in commit messages for an easy way to identify the purpose or intention of a commit. Check out the emoji cheatsheet here: CONTRIBUTING.md