aboutsummaryrefslogtreecommitdiffstats
path: root/main/http.c
AgeCommit message (Collapse)AuthorFilesLines
2009-01-13Merged revisions 168588 via svnmerge from twilson1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r168588 | twilson | 2009-01-13 17:05:43 -0600 (Tue, 13 Jan 2009) | 5 lines Fully overwrite a same-named file when uploading (closes issue #14190) Reported by: timking ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@168589 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-03port gcc 4.3.x warning fixes from trunk to this branchkpfleming1-5/+15
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@153743 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-31Merged revisions 135016 via svnmerge from kpfleming1-10/+10
https://origsvn.digium.com/svn/asterisk/trunk ................ r135016 | kpfleming | 2008-07-31 17:28:42 -0500 (Thu, 31 Jul 2008) | 11 lines Merged revisions 134983 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r134983 | kpfleming | 2008-07-31 17:18:11 -0500 (Thu, 31 Jul 2008) | 3 lines accomodate users who seem to lack a sense of humor :-) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@135034 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-25Include the http_decode function from trunkbkruse1-3/+20
to replace the + with a space. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@133804 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-17Merged revisions 123546 via svnmerge from bbryant1-1/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r123546 | bbryant | 2008-06-17 16:46:57 -0500 (Tue, 17 Jun 2008) | 5 lines Updates all usages of ast_tcptls_session_instance to be managed by reference counts so that they only get destroyed when all threads are done using them, and memory does not get free'd causing strange issues with SIP. This code was originally written by russellb in the team/group/issue_11972/ branch. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@123547 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-23Merged revisions 118161 via svnmerge from bbryant1-0/+16
https://origsvn.digium.com/svn/asterisk/trunk ........ r118161 | bbryant | 2008-05-23 16:19:42 -0500 (Fri, 23 May 2008) | 3 lines Add new functionality to http server that requires manager authentication for any path that includes a directory named 'private'. This patch also requires manager authentication for any POST's being sent to the server as well to help secure uploads. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@118168 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-23Merged revisions 114601 via svnmerge from russell1-43/+42
https://origsvn.digium.com/svn/asterisk/trunk ................ r114601 | russell | 2008-04-23 17:53:20 -0500 (Wed, 23 Apr 2008) | 14 lines Merged revisions 114600 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114600 | russell | 2008-04-23 17:18:12 -0500 (Wed, 23 Apr 2008) | 6 lines Improve some broken cookie parsing code. Previously, manager login over HTTP would only work if the mansession_id cookie was first. Now, the code builds a list of all of the cookies in the Cookie header. This fixes a problem observed by users of the Asterisk GUI. (closes AST-20) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@114602 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-31Merged revisions 112033 via svnmerge from twilson1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r112033 | twilson | 2008-03-31 15:45:05 -0500 (Mon, 31 Mar 2008) | 2 lines Handle blank prefix= in http.conf ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@112034 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-17Merged revisions 109229 via svnmerge from twilson1-85/+126
https://origsvn.digium.com/svn/asterisk/trunk ........ r109229 | twilson | 2008-03-17 17:10:06 -0500 (Mon, 17 Mar 2008) | 5 lines Replace minimime with superior GMime library so that the entire contents of an http post are not read into memory. This does introduce a dependency on the GMime library for handling HTTP POSTs, but it is available in most distros. If the library is present, then the compile flag for ENABLE_UPLOADS is enabled by default in menuselect. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@109254 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-12Merged revisions 108295 via svnmerge from russell1-6/+6
https://origsvn.digium.com/svn/asterisk/trunk ........ r108295 | russell | 2008-03-12 17:13:18 -0500 (Wed, 12 Mar 2008) | 3 lines Rename ast_tcptls_server_instance to session_instance, since this pertains to server and client usage. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@108348 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-12Merged revisions 108346 via svnmerge from russell1-4/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r108346 | russell | 2008-03-12 17:49:26 -0500 (Wed, 12 Mar 2008) | 4 lines Make the default prefix empty, like it was in Asterisk 1.4. (closes issue #12198, reported by bkruse, patched by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@108347 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-06Merged revisions 105804 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r105804 | russell | 2008-03-04 16:28:03 -0600 (Tue, 04 Mar 2008) | 2 lines add a destroy API call for a server instance ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106305 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-06Merged revisions 105785 via svnmerge from russell1-5/+5
https://origsvn.digium.com/svn/asterisk/trunk ........ r105785 | russell | 2008-03-04 16:23:21 -0600 (Tue, 04 Mar 2008) | 2 lines More public API name changes to use an appropriate ast_ prefix ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106304 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-06Merged revisions 105773 via svnmerge from russell1-5/+5
https://origsvn.digium.com/svn/asterisk/trunk ........ r105773 | russell | 2008-03-04 16:15:18 -0600 (Tue, 04 Mar 2008) | 2 lines Rename public object server_instance to ast_tcptls_server_instance ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106303 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-26Rename version.h to ast_version.h. Next, I will be re-adding version.h as anrussell1-1/+1
automatically generated file like it used to be. This still needs to be there for modules that have to check it to compile against multiple asterisk versions. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104244 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-18Merge changes from team/group/sip-tcptlsrussell1-196/+4
This set of changes introduces TCP and TLS support for chan_sip. There are various new options in configs/sip.conf.sample that are used to enable these features. Also, there is a document, doc/siptls.txt that describes some things in more detail. This code was implemented by Brett Bryant and James Golovich. It was reviewed by Joshua Colp and myself. A number of other people participated in the testing of this code, but since it was done outside of the bug tracker, I do not have their names. If you were one of them, thanks a lot for the help! (closes issue #4903, but with completely different code that what exists there.) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99085 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-12merging a comment added in 1.4pari1-0/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98514 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-05Now that the version.h file was getting properly regenerated every time the svnrussell1-2/+2
revision changed, every module that used the version was getting rebuilt after every svn update. This severly annoyed me pretty quickly, so I have improved the situation. Now, instead of generating version.h, main/version.c is generated. version.c includes the version information, as well as a couple of API calls for modules to retrieve the version. So now, only version.c will get rebuilt, and the main asterisk binary relinked, which is must faster than rebuilding http.c, manager.c, asterisk.c, relinking the asterisk binary, chan_sip.c, func_version.c, res_agi ... The only minor change in behavior here is that the version information reported by chan_sip, for example, is the version of the Asterisk core, and not necessarily the Asterisk version that the chan_sip module came from. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@96717 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-24remove some unnecessary includesrizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89542 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove a bunch of useless #include "options.h"rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89511 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20move asterisk/paths.h outside asterisk.h and into those filesrizzo1-0/+1
who really need it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89466 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-17trim more redundant headersrizzo1-3/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89384 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-5/+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-22Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former ↵qwell1-1/+1
didn't make much sense git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86820 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19Convert NEW_CLI to AST_CLI.qwell1-1/+1
Closes issue #11039, as suggested by seanbright. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86536 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-18(issue #10724)qwell1-27/+30
Reported by: eliel Patches: res_features.c.patch uploaded by eliel (license 64) res_agi.c.patch uploaded by seanbright (license 71) res_musiconhold.c.patch uploaded by seanbright (license 71) pbx.c.patch uploaded by moy (license 222) logger.c.patch uploaded by moy (license 222) frame.c.patch uploaded by moy (license 222) manager.c.patch uploaded by moy (license 222) http.c.patch uploaded by moy (license 222) dnsmgr.c.patch uploaded by moy (license 222) res_realtime.c.patch uploaded by eliel (license 64) res_odbc.c.patch uploaded by seanbright (license 71) res_jabber.c.patch uploaded by eliel (license 64) chan_local.c.patch uploaded by eliel (license 64) chan_agent.c.patch uploaded by eliel (license 64) chan_alsa.c.patch uploaded by eliel (license 64) chan_features.c.patch uploaded by eliel (license 64) chan_sip.c.patch uploaded by eliel (license 64) RollUp.1.patch (includes all of the above patches) uploaded by seanbright (license 71) Convert many CLI commands to the NEW_CLI format. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82930 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-17Fix memory leak introduced when POST support was added.dbailey1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82568 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I ↵murf1-3/+3
didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81361 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16Don't reload a configuration file if nothing has changed.tilghman1-1/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18Merge in ast_strftime branch, which changes timestamps to be accurate to the ↵tilghman1-5/+6
microsecond, instead of only to the second git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75706 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-29Fix my recent change for sending large files via the http server. This coderussell1-11/+1
*must* write the file to the FILE *, and not the raw fd. Otherwise, it breaks TLS support. Thanks to rizzo for catching this! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72738 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-29Merge changes from team/russell/http_filetxferrussell1-21/+31
Handle transferring large files from the built-in http server. Previously, the code attempted to malloc a block as large as the file itself. Now it uses the sendfile() system call so that the file isn't copied into userspace at all if it is available. Otherwise, it just uses a read/write of small chunks at a time. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72701 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-24Conversions to ast_debug()russell1-25/+14
(issue #9984, patches from eliel and dimas) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71338 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-20Revert the change made in revision 45474, since this causes other issues.qwell1-13/+1
Issue 10021. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70493 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14Convert uses of strdup() to ast_strdup()russell1-4/+4
(issue #9983, eliel) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69436 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵tilghman1-14/+14
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-24Add a new API call for creating detached threads. Then, go replace all of therussell1-6/+1
places in the code where the same block of code for creating detached threads was replicated. (patch from bbryant) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65968 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-30Merged revisions 62414 via svnmerge from russell1-4/+12
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r62414 | russell | 2007-04-30 10:25:31 -0500 (Mon, 30 Apr 2007) | 4 lines When serving dynamic content, include a Cache-Control header to instruct the browsers to not store the resulting content. (issue #9621, reported by Pari, patch by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@62415 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-11Merged revisions 61407 via svnmerge from russell1-5/+7
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r61407 | russell | 2007-04-11 09:48:01 -0500 (Wed, 11 Apr 2007) | 4 lines Add "svgz" to the mimetypes table. (issue #9510, bkruse) In passing, constify the elements of the mimetypes table. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61410 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-08Merged revisions 60712 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r60712 | tilghman | 2007-04-08 09:12:00 -0500 (Sun, 08 Apr 2007) | 2 lines Fix --enable-dev-mode ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@60714 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-06Merged revisions 60603 via svnmerge from russell1-4/+314
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r60603 | russell | 2007-04-06 15:58:43 -0500 (Fri, 06 Apr 2007) | 13 lines To be able to achieve the things that we would like to achieve with the Asterisk GUI project, we need a fully functional HTTP interface with access to the Asterisk manager interface. One of the things that was intended to be a part of this system, but was never actually implemented, was the ability for the GUI to be able to upload files to Asterisk. So, this commit adds this in the most minimally invasive way that we could come up with. A lot of work on minimime was done by Steve Murphy. He fixed a lot of bugs in the parser, and updated it to be thread-safe. The ability to check permissions of active manager sessions was added by Dwayne Hubbard. Then, hacking this all together and do doing the modifications necessary to the HTTP interface was done by me. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@60604 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-05Merged revisions 60265 via svnmerge from russell1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r60265 | russell | 2007-04-05 10:47:17 -0500 (Thu, 05 Apr 2007) | 2 lines Add the MIME type for gif by request from Pari ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@60266 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-21Merged revisions 59089 via svnmerge from file1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r59089 | file | 2007-03-21 14:08:57 -0400 (Wed, 21 Mar 2007) | 2 lines Add svg mimetype for pari. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59090 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-08Merged revisions 58354 via svnmerge from kpfleming1-3/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r58354 | kpfleming | 2007-03-08 08:23:46 -0500 (Thu, 08 Mar 2007) | 2 lines this change was not needed; fclose() handles closing the file descriptor already ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@58355 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-08Merged revisions 58351-58352 via svnmerge from kpfleming1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r58351 | kpfleming | 2007-03-08 08:17:17 -0500 (Thu, 08 Mar 2007) | 2 lines fix two cases where HTTP session file descriptors would not be closed ........ r58352 | kpfleming | 2007-03-08 08:17:42 -0500 (Thu, 08 Mar 2007) | 2 lines fix a compiler warning, and overwriting 'res' value ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@58353 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-20Merged revisions 55634 via svnmerge from russell1-2/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r55634 | russell | 2007-02-20 14:26:06 -0600 (Tue, 20 Feb 2007) | 3 lines Add the Asterisk version information to the Server header in HTTP responses. (requested by Pari) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@55635 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-31Merged revisions 53046 via svnmerge from russell1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r53046 | russell | 2007-01-31 15:32:08 -0600 (Wed, 31 Jan 2007) | 11 lines Merged revisions 53045 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53045 | russell | 2007-01-31 15:25:11 -0600 (Wed, 31 Jan 2007) | 3 lines Fix a bunch of places where pthread_attr_init() was called, but pthread_attr_destroy() was not. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@53047 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-24Doxygen updatesoej1-19/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51932 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-28Convert uri_redirects list to read/write locks.file1-23/+23
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49027 f38db490-d61c-443f-a65b-d21fe96a405b