-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix malformed headers #136
Conversation
Tempted to use this newish (2022) curl feature for parsing the headers: https://curl.se/libcurl/c/curl_easy_nextheader.html (announcement). It's pretty convenient. It's available from curl 7.83, I believe now that we have Nix on prod it should be doable to get this version. Note: We need to document this requirement on the README. We might solve this as well #115 |
82243d8
to
d5c8714
Compare
This comment was marked as outdated.
This comment was marked as outdated.
- Now libcurl >= 7.83 is a requirement - Tests are changed to fit new libcurl behavior
d5c8714
to
2303382
Compare
worker.bgw_main_arg = (Datum) 0; | ||
worker.bgw_notify_pid = 0; | ||
RegisterBackgroundWorker(&worker); | ||
RegisterBackgroundWorker(&(BackgroundWorker){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO previous state of pg_init() was completely ok and also was easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new way using C99 designated initializer requires fewer LOC and avoids the need to memset
to 0. Readability is highly subjective but fewer LOCs in this case is a win IMO.
When having a malformed header such as:
The background worker crashes.
To prove the above, we use https://github.com/steve-chavez/ngx_pathological.