asterisk/funcs
Matthew Nicholson e706b5706e According to section 19.1.2 of RFC 3261:
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: https://origsvn.digium.com/svn/asterisk/trunk@303509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-24 18:59:22 +00:00
..
Makefile Merged revisions 207647 via svnmerge from 2009-07-21 13:28:04 +00:00
func_aes.c Add relationships to function documentation. 2011-01-14 20:07:02 +00:00
func_audiohookinherit.c Merged revisions 229669 via svnmerge from 2009-11-12 16:44:39 +00:00
func_base64.c Add relationships to function documentation. 2011-01-14 20:07:02 +00:00
func_blacklist.c ast_callerid restructuring 2010-07-14 15:48:36 +00:00
func_callcompletion.c Add small documentation update to func_callcompletion.c. 2010-04-21 19:07:25 +00:00
func_callerid.c Expand the caller ANI field to an ast_party_id 2010-07-14 16:58:03 +00:00
func_cdr.c Add High Resolution Times to CDRs for Asterisk 2010-06-08 23:48:17 +00:00
func_channel.c Merged revisions 286189 via svnmerge from 2010-09-10 22:15:47 +00:00
func_config.c Merge changes from team/group/appdocsxml 2008-11-01 21:10:07 +00:00
func_curl.c According to section 19.1.2 of RFC 3261: 2011-01-24 18:59:22 +00:00
func_cut.c AST-2009-005 2009-08-10 19:20:57 +00:00
func_db.c Add DB_KEYS. 2011-01-21 08:13:18 +00:00
func_devstate.c Add load priority order, such that preload becomes unnecessary in most cases 2010-07-20 19:35:02 +00:00
func_dialgroup.c Merged revisions 298478 via svnmerge from 2010-12-16 08:56:59 +00:00
func_dialplan.c ast_callerid restructuring 2010-07-14 15:48:36 +00:00
func_enum.c AST-2009-005 2009-08-10 19:20:57 +00:00
func_env.c Merged revisions 289543,289581 via svnmerge from 2010-09-30 20:40:08 +00:00
func_extstate.c Merge str_substitution branch. 2009-04-29 18:53:01 +00:00
func_frame_trace.c Merged revisions 287647 via svnmerge from 2010-09-20 22:16:37 +00:00
func_global.c Convert the ast_channel data structure over to the astobj2 framework. 2009-04-24 14:04:26 +00:00
func_groupcount.c Add support for GROUP_MATCH_COUNT regex matching on category 2010-02-17 19:51:53 +00:00
func_iconv.c Merge changes from team/group/appdocsxml 2008-11-01 21:10:07 +00:00
func_lock.c Fix a build error on FreeBSD. 2009-12-01 23:38:34 +00:00
func_logic.c Merge str_substitution branch. 2009-04-29 18:53:01 +00:00
func_math.c Kill some startup warnings and errors and make some messages more helpful in tracking down the source. 2010-07-09 17:00:22 +00:00
func_md5.c Merge str_substitution branch. 2009-04-29 18:53:01 +00:00
func_module.c Merge str_substitution branch. 2009-04-29 18:53:01 +00:00
func_odbc.c Merged revisions 283350 via svnmerge from 2010-08-24 12:51:46 +00:00
func_pitchshift.c Change needed to make Mac OS X 10.6 happy 2010-03-08 05:12:55 +00:00
func_rand.c AST-2009-005 2009-08-10 19:20:57 +00:00
func_realtime.c Merged revisions 206807 via svnmerge from 2009-07-16 16:51:05 +00:00
func_sha1.c Merge str_substitution branch. 2009-04-29 18:53:01 +00:00
func_shell.c Merge changes from team/group/appdocsxml 2008-11-01 21:10:07 +00:00
func_speex.c Adding some clarifications to func_speex doxygen docs. 2009-11-03 16:56:48 +00:00
func_sprintf.c AST-2009-005 2009-08-10 19:20:57 +00:00
func_srv.c Commit compromise I suggested on review 608. 2010-04-19 18:42:31 +00:00
func_strings.c Merged revisions 293159 via svnmerge from 2010-10-28 16:11:53 +00:00
func_sysinfo.c Move function SYSINFO documentation to XML. 2009-06-06 21:56:58 +00:00
func_timeout.c AST-2009-005 2009-08-10 19:20:57 +00:00
func_uri.c According to section 19.1.2 of RFC 3261: 2011-01-24 18:59:22 +00:00
func_version.c Merge changes from team/group/appdocsxml 2008-11-01 21:10:07 +00:00
func_vmcount.c More 'static' qualifiers on module global variables. 2009-06-15 17:34:30 +00:00
func_volume.c Expand codec bitfield from 32 bits to 64 bits. 2009-11-04 14:05:12 +00:00