This repository has been archived by the owner on Jun 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 162
evhtp_set_gencb don't work #51
Comments
NathanFrench
added a commit
to NathanFrench/libevhtp
that referenced
this issue
Oct 31, 2017
- previously htp__callback_find_()'s strncmp() for type_hash would use the path_len instead of the callbacks path length This is wrong: if you have a callback set for '/foo/', and you request '/', the evaluation was: strncmp("/foo/", "/", 1); Which will, of course, match "/foo/" since it's only looking for one byte. Instead, it should be: strncmp("/", "/foo/", 5) which would not take the true branch. - evhtp_callback_new now correctly sets the length (which is now used in htp__callback_find_
Neato, big fail here. As seen in the referenced commit above, I think this is a fix. Can you try the https://github.com/criticalstack/libevhtp/tree/issue51 branch? |
NathanFrench
added a commit
that referenced
this issue
Nov 1, 2017
[Bugfix #51] htp__callback_find_ length check fix
Merged into develop. Thank you very much for pointing out this incredibly silly bug. It reminds me of a story from the book "Deep C Secrets". I cannot quote the entire thing, but the gist was this: There was a bug in Solaris's mail command. Any user that had an "s" as the second character of their name would never receive email. Turns out there was a command line parsing bug; It was treating the first character as a |
Fixed! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Details
Steps or code to reproduce the problem.
evhtp_set_gencb don't work. Instead first evhtp_set_cb callback called.
Example code (if applicable)
This is modified version of test_basic.c
Version
Latest
The text was updated successfully, but these errors were encountered: