Skip to content

Commit

Permalink
'-Wall', ASan leak fixes, connection close on unspecified bodies
Browse files Browse the repository at this point in the history
This adds '-Wall', '-Wextra', '-Werror' compiler flags and fixes the
associated warnings.

It also fixes a few leaks detected by ASan.

It also adds unit tests to chunked-encoded parsing and makes some
adjustements accordingly. I don't believe, in the end, this changed much
behaviorally, but it could in theory make the client read the entire
final chunk (the zero-body one) when, before, it could have stopped
reading that after the entire expected body was received. But any
previous "bad" behavior would require specific read behavior such that
the final chunk was on a different read than the rest, which maybe is
unlikely. And even then, I'm not sure if something bad would have
happened.

The big behavioral change is having the server close the connection
after the entire writing of the body is done and there is no
content-length. This prevents timeouts from the client (generally, the
proxy actually) as it waits for the unspecified body.
  • Loading branch information
bneradt authored and bneradt committed May 22, 2020
1 parent 86ae94f commit 17a3d59
Show file tree
Hide file tree
Showing 18 changed files with 713 additions and 512 deletions.
2 changes: 1 addition & 1 deletion Sconstruct
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if path_nghttp2 is not None:
custom_rpath.append(path_nghttp2 + "/lib")
SetOptionDefault("RPATH", custom_rpath)

Part("swoc++/swoc++.part",vcs_type=VcsGit(server="github.com", repository="SolidWallOfCode/libswoc", tag="1.1.0"), package_group="proxy-verifier")
Part("code/libswoc.part",vcs_type=VcsGit(server="github.com", repository="SolidWallOfCode/libswoc", tag="1.2.3"), package_group="proxy-verifier")


Part("local/parts/proxy-verifier.part", package_group="proxy-verifier")
Expand Down
2 changes: 1 addition & 1 deletion local/include/core/ArgParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class ArgParser {
/** Main parsing function
@return The Arguments object available for program using
*/
Arguments parse(const char **argv);
Arguments parse(char const **argv);
// Add the usage to global_usage for help_message(). Something like:
// traffic_blabla [--SWITCH [ARG]]
void add_global_usage(std::string const &usage);
Expand Down
Loading

0 comments on commit 17a3d59

Please sign in to comment.