Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop requests without src #5

Merged
merged 3 commits into from
Jun 19, 2021

Conversation

iliapenev
Copy link
Contributor

@iliapenev iliapenev commented Jun 18, 2021

#4

@rojer
Copy link
Contributor

rojer commented Jun 18, 2021

i don't think we should be parsing the entire frame, i think json_scanf for just id, src and method should be enough.
we should only reject if it's is a request (method not empty), requres a response (id not empty) and src is empty.

}

if (src.len == 0) {
if (id.len > 0 || method.len > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (method.len > 0 && id.len > 0 && src.len == 0)

@rojer rojer merged commit 20511b1 into mongoose-os-libs:master Jun 19, 2021
@rojer
Copy link
Contributor

rojer commented Jun 19, 2021

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants