aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_curl.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-14Merged revisions 328247 via svnmerge from lmadsen1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines Merged revisions 328209 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines Introduce <support_level> tags in MODULEINFO. This change introduces MODULEINFO into many modules in Asterisk in order to show the community support level for those modules. This is used by changes committed to menuselect by Russell Bryant recently (r917 in menuselect). More information about the support level types and what they mean is available on the wiki at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@328259 f38db490-d61c-443f-a65b-d21fe96a405b
2011-05-02Merged revisions 316094 via svnmerge from tilghman1-6/+11
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r316094 | tilghman | 2011-05-02 14:09:55 -0500 (Mon, 02 May 2011) | 15 lines Merged revisions 316093 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r316093 | tilghman | 2011-05-02 14:04:36 -0500 (Mon, 02 May 2011) | 8 lines More possible crashes based upon invalid inputs. (closes issue #18161) Reported by: wdoekes Patches: 20110301__issue18161.diff.txt uploaded by tilghman (license 14) Tested by: wdoekes ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@316095 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-24According to section 19.1.2 of RFC 3261:mnicholson1-13/+5
For each component, the set of valid BNF expansions defines exactly which characters may appear unescaped. All other characters MUST be escaped. This patch modifies ast_uri_encode() to encode strings in line with this recommendation. This patch also adds an ast_escape_quoted() function which escapes '"' and '\' characters in quoted strings in accordance with section 25.1 of RFC 3261. The ast_uri_encode() function has also been modified to take an ast_flags struct describing the set of rules it should use when escaping characters to allow for it to escape SIP URIs in addition to HTTP URIs and other types of URIs or variations of those two URI types in the future. The ast_uri_decode() function has also been modified to accept an ast_flags struct describing the set of rules to use when decoding to enable decoding '+' as ' ' in legacy http URLs. The unit tests for these functions have also been updated. ABE-2705 Review: https://reviewboard.asterisk.org/r/1081/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@303509 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-07Oops, missed the actual decoding part.tilghman1-0/+16
(closes issue #18046) Reported by: wdoekes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@301008 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-06XML validationtilghman1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@300841 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-06Add a hashcompat mode called "legacy", which translates a literal plus sign ↵tilghman1-33/+154
to a space. (closes issue #18046) Reported by: wdoekes Patches: 20100930__issue18046.diff.txt uploaded by tilghman (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@300840 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-15Merged revisions 294989 via svnmerge from tilghman1-1/+4
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r294989 | tilghman | 2010-11-15 01:44:38 -0600 (Mon, 15 Nov 2010) | 15 lines Merged revisions 294988 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r294988 | tilghman | 2010-11-15 01:42:39 -0600 (Mon, 15 Nov 2010) | 8 lines It is possible to crash Asterisk by feeding the curl engine invalid data. (closes issue #18161) Reported by: wdoekes Patches: 20101029__issue18161.diff.txt uploaded by tilghman (license 14) Tested by: tilghman ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@294990 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-20Add load priority order, such that preload becomes unnecessary in most casestilghman1-1/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@278132 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-14Add SSL_VERIFYPEER, as requested on the -users listtilghman1-16/+20
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@212249 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-15More 'static' qualifiers on module global variables.kpfleming1-2/+2
The 'pglobal' tool is quite handy indeed :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@200620 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-12add 'const' qualifiers in various places where they should have beenkpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@193832 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-29Merge str_substitution branch.tilghman1-19/+91
This branch adds additional methods to dialplan functions, whereby the result buffers are now dynamic buffers, which can be expanded to the size of any result. No longer are variable substitutions limited to 4095 bytes of data. In addition, the common case of needing buffers much smaller than that will enable substitution to only take up the amount of memory actually needed. The existing variable substitution routines are still available, but users of those API calls should transition to using the dynamic-buffer APIs. Reviewboard: http://reviewboard.digium.com/r/174/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@191140 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-13Merge ast_str_opaque branch (discontinue usage of ast_str internals)tilghman1-18/+12
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-08Keep up with shadow warnings. One day I'll actually enable this in the ↵seanbright1-3/+3
Makefile. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147457 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06Merged revisions 146799 via svnmerge from tilghman1-1/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r146799 | tilghman | 2008-10-06 15:52:04 -0500 (Mon, 06 Oct 2008) | 8 lines Dialplan functions should not actually return 0, unless they have modified the workspace. To signal an error (and no change to the workspace), -1 should be returned instead. (closes issue #13340) Reported by: kryptolus Patches: 20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-24Create a 'hashcompat' option that permits the results of a CURL() able to betilghman1-4/+40
passed directly into the HASH() function. Requested via the -users list, and committed at Astricon in the Code Zone. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@144199 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-07make func_curl.c compile under devmode.mvanbaak1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@141626 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-06Get rid of the casts that cause warnings on OpenBSD. The compiler is errantlytilghman1-4/+4
detecting warnings when we redefine a structure each time it is used, even though the structure is identical. Reported by: mvanbaak, via #asterisk-dev git-svn-id: http://svn.digium.com/svn/asterisk/trunk@141507 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-05Fix func_curl compilationmmichelson1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@141425 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-05Add the CURLOPT dialplan function, which permits setting various options fortilghman1-37/+377
use with the CURL dialplan function. (closes issue #12920) Reported by: davevg Patches: 20080904__bug12920.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76, davevg git-svn-id: http://svn.digium.com/svn/asterisk/trunk@141328 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-30Merged revisions 134540 via svnmerge from russell1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r134540 | russell | 2008-07-30 14:52:53 -0500 (Wed, 30 Jul 2008) | 4 lines Fix a memory leak in func_curl. Every thread that used this function leaked an allocation the size of a pointer. (reported by jmls in #asterisk-dev) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134541 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-25Separate the global initialization routines for cURL into its own separatetilghman1-33/+21
module. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@125055 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove another set of redundant #include "asterisk/options.h"rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-3/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-26Merged revisions 87120 via svnmerge from tilghman1-2/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r87120 | tilghman | 2007-10-26 08:54:30 -0500 (Fri, 26 Oct 2007) | 7 lines The addition of autoservice to func_curl additionally made func_curl dependent on the existence of a channel, with no real reason. This should make func_curl once again work without a channel. Reported by jmls. Fixed by tilghman. Closes issue #11090 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87121 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-19Merged revisions 83177 via svnmerge from russell1-0/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r83177 | russell | 2007-09-19 14:34:25 -0500 (Wed, 19 Sep 2007) | 4 lines Using curl can take a substantial amount of time, so the channel should be autoserviced while waiting for it to complete. (closes issue #10725, reported by mnicholson) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83178 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-31Mostly cleanup of documentation to substitute the pipe with the comma, but a ↵tilghman1-1/+1
few other formatting cleanups, too. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77808 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18Clean up func_curl a bit.file1-8/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75586 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16For my next trick I will make it so dialplan functions no longer need to ↵file1-5/+0
call ast_module_user_add and ast_module_user_remove. These are now called in the ast_func_read and ast_func_write functions outside of the module. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75255 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16It is no longer required for each module that deals with a channel to call ↵file1-2/+0
ast_module_user_hangup_all in it's unload function. The loader will automatically perform this action for it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75183 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵tilghman1-1/+1
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-24Creating new doxygen macro "\extref" to create page that lists oej1-0/+2
external libraries and URLs to these. Please help me add these references. We might want to create a similar macro "\linuxpackage" to list the needed Linux packages in popular distributions. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56647 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-06finish const-ifying ast_func_read()kpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49741 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-16update to use trunk's version of the threadstorage APIkpfleming1-9/+15
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48526 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-16Merged revisions 48513 via svnmerge from kpfleming1-17/+31
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r48513 | kpfleming | 2006-12-15 22:25:09 -0600 (Fri, 15 Dec 2006) | 2 lines instead of initializing the curl library every time the CURL() function is invoked, do it only once per thread (this allows multiple calls to CURL() in the dialplan for a channel to run much more quickly, and also to re-use connections to the server) (thanks to JerJer for frequently complaining about this performance problem) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48514 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-03 Some changes/fixes for func_curl. curl_global_init is only supposed to be ↵bweschke1-2/+13
called once, and if it returns non-zero, we need to give up on further executions with that instance. Additionally, let's set absolute timeout values for the CURL connections to try and prevent possible Zap (and possibly other channel tech) channel lockouts. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41900 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-21/+7
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵kpfleming1-4/+4
again :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-24Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have ↵kpfleming1-0/+5
autoconf and menuselect tools for Asterisk! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@22267 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14This rather large commit changes the way modules are loaded. rizzo1-11/+6
As partly documented in loader.c and include/asterisk/module.h, modules are now expected to return all of their methods and flags into a structure 'mod_data', and are normally loaded with RTLD_NOW | RTLD_LOCAL, so symbols are resolved immediately and conflicts should be less likely. Only in a small number of cases (res_*, typically) modules are loaded RTLD_GLOBAL, so they can export symbols. The core of the change is only the two files loader.c and include/asterisk/module.h, all the rest is simply adaptation of the existing modules to the new API, a rather mechanical (but believe me, time and finger-consuming!) process whose detail you can figure out by svn diff'ing any single module. Expect some minor compilation issue after this change, please report it on mantis http://bugs.digium.com/view.php?id=6968 so we collect all the feedback in one place. I am just sorry that this change missed SVN version number 20000! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20003 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-08since the module API is changing, it's a good time to const-ify the ↵kpfleming1-2/+2
description() and key() return values git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18552 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-23Move CURL function from apps/ to funcs/tilghman1-0/+193
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10932 f38db490-d61c-443f-a65b-d21fe96a405b