Open
Conversation
as51340
requested changes
Jun 26, 2024
src/mgclient.c
Outdated
| return extra; | ||
| } | ||
|
|
||
| mg_value *scheme_ = mg_value_make_string(scheme ? scheme : "basic"); |
Member
There was a problem hiding this comment.
I guess when mg_value_make_string fails (e.g., allocation, but unlikely + when it fails since it's small, there are bigger problems most likely)?
| goto cleanup; | ||
| } | ||
|
|
||
| if (username) { |
There was a problem hiding this comment.
So the change is also that username and password won't be inserted to extra if empty?
| uint32_t version = htobe32(0x0104); | ||
| ASSERT_EQ(SendData(sockfd, (char *)&version, 4), 0); | ||
| } | ||
| uint32_t version = htobe32(1); |
Member
There was a problem hiding this comment.
if 0x0104 is here the tests never finishes
| &mg_system_allocator); | ||
| mg_session *session = mg_session_init(&mg_system_allocator); | ||
| ASSERT_TRUE(session); | ||
| session->version = 1; |
Member
There was a problem hiding this comment.
Yea these seems like hacks to make the client work 🤔
| &mg_system_allocator); | ||
|
|
||
| // Read HELLO message. | ||
| // Read INIT message. |
There was a problem hiding this comment.
Test is changed from sending HELLO msg to INIT msg, any specific reason?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends the processing of Bolt v4 HELLO message to support custom auth schemes. The purpose is twofold:
schemefield)TODOs