- Fix invalid check of uri and postdata parameters - Fix fixup functions - Refactor curl function to remove dependance on pv/fixup structures - Export curl_connect through C API - Fix buffer overflow in curl write function You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/435
-- Commit Summary --
* Fixes and improvements to curl module
-- File Changes --
M modules/curl/curl.c (172) A modules/curl/curl_api.c (12) A modules/curl/curl_api.h (36) M modules/curl/functions.c (202) M modules/curl/functions.h (10)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/435.patch https://github.com/kamailio/kamailio/pull/435.diff
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/435
Thank you! This looks great. Will test it soon and merge it.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/435#issuecomment-163528246
I noted that the API function was not documented in the XML docs. Will try to fix.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/435#issuecomment-163528626
This possibly handles the report in #400 - but only for the curl module. Maybe we need to look into the utils module too and backport changes there.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/435#issuecomment-163532237
Hugh (@que273) pushed already some patches to utils module as well -- see 3b6d7a28ea0b053f27cb169ac31259e20ef4ece0 .
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/435#issuecomment-163533143
In my testing of the curl module,before these changes, I didn't get any crashes - perhaps I was lucky. The crash in utils/http_query (#432) is not related to these changes because the http_query_post_hdr function (which allows passing additional headers, e.g. Content-Type) has not yet been ported to the curl module. If the intention is to obsolete http_query from the utils module, this version of the command needs to be ported. Fixing the buffer overflow may fix the crash in #400, but that was already fixed in utils (master & 4.3) so no backport is required.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/435#issuecomment-163569573
The content type is already covered, but adding other headers is not part of the current curl. Maybe something I should add to the "TODO" file. Thank you for the feedback.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/435#issuecomment-163571362
Can this be merged? It would be good to get it in master for making it available for testing with common code base.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/435#issuecomment-164684470
Merged #435.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/435#event-492021447
Thank you for testing @oej
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/435#issuecomment-164713327