Age | Commit message (Collapse) | Author | Files | Lines |
|
microsecond, instead of only to the second
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75706 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
*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
|
|
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
|
|
(issue #9984, patches from eliel and dimas)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71338 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
Issue 10021.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70493 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
(issue #9983, eliel)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69436 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
guidelines changes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51932 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49027 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r49024 | qwell | 2006-12-28 14:52:46 -0500 (Thu, 28 Dec 2006) | 2 lines
make the uris_lock a rwlock instead of a mutex lock - needs to be forward ported to trunk
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49026 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r49006 | kpfleming | 2006-12-27 16:06:56 -0600 (Wed, 27 Dec 2006) | 2 lines
since these variables all have static duration, none of them need initializers (they default to zero anyway)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49008 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48947 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
done for exactly how much memory is needed. This was suggested by Luigi on
the asterisk-dev mailing list. Thanks!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48933 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
this, implementing locking of this list to make it thread-safe.
- Add a "redirect" option to http.conf that allows redirecting one URI to
another. I was inspired to do this while playing with the Asterisk GUI. I
got tired of typing this URL to get to the GUI:
http://localhost:8088/asterisk/static/config/cfgadvanced.html
So, now I have the following line in http.conf:
redirect=/=/asterisk/static/config/cfgadvanced.html
Now, I can type the following into my browser and go to the GUI:
http://localhost:8088
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48930 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
This makes the code easier to follow and saves some
copies to intermediate buffers.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48515 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
are passed as an argument.
- Update the code in main/http.c to use the new interface
(the diff is large but mostly mechanical, due to the name change of
several variables);
- And since now it is trivial, implement "AMI over TLS", and document
the possible options in manager.conf
- And since the test client (openssl s_client -connect host:port )
does not generate \r\n as a line terminator, make get_input()
also accept just a \n as a line terminator (Mac users: do you
also need the \r-only version ?)
The option parsing in manager.conf is not very efficient, and needs
to be cleaned up and made similar to what we have in http.conf
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48351 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
and implement services over tcp and/or tcp-tls.
This commit is nothing more than moving structure definitions
(and documentation) from main/http.c to include/asterisk/http.h
(temporary location until we find a better place), and removing the
'static' qualifier from server_root() and server_start().
The name change (adding the ast_ prefix as a minimum, and then
possibly a more meaningful name) is postponed to future commits.
Does not apply to other versions of asterisk.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48324 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
causing the http threads to do busy waiting around the socket...
Fix the mistake, sorry for the inconvenience!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48074 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
opening an SSL socket.
We are almost ready to make this code available to other modules.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48073 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
Because https is more secure than http, it usually
makes sense to keep this service more open than the
one on the unencrypted port.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48071 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
function doing work on the socket. This is another generalization
to provide a generic mechanism to open TCP/TLS socket with a thread
managing the accpet and children threads managing the individual
sessions.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48067 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48062 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
and then run a service on it.
The code in manager.c does essentially the same things,
so we will be able to reuse the code in here (probably
moving it to netsock.c or another appropriate library file).
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48008 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r47051 | tilghman | 2006-11-02 17:00:20 -0600 (Thu, 02 Nov 2006) | 2 lines
Reverse change of "show" to "list" and make several other commands more consistent with "category verb arguments"
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47052 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
and support linux as well (using fopencookie(), which should
be available in glibc).
Update configure.ac to check for funopen (BSD) and fopencookie(glibc),
and while we are at it also for gethostbyname_r
(the generated files need to be updated, or you need
to run bootstrap.sh yourself).
Document the new options in http.conf.sample
(names are only tentative, better ones are welcome).
At this point we can safely enable the option.
Anyone willing to try this on Sun and Apple platforms ?
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45892 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
The changes are not large. Most of the diff comes from putting the
global variables describing an accept session into a structure, so
we can reuse the existing code for running multiple accept threads
on different ports.
Once this is done, and if your system has the funopen() library
function (and ssl, of course), it is just a matter of calling
the appropriate functions to set up the ssl connection on the
existing socket, and everything works on the secure channel now.
At the moment, the code is disabled because i have not implemented yet
the autoconf code to detect the presence of funopen(), and add -lssl
to main/Makefile if ssl libraries are present. And a bit of documentation
on the http.conf arguments, too.
If you want to manually enable https support, that is very simple
(step 0 1 2 will be eventually detected by ./configure, the
rest is something you will have to do anyways).
0. make sure your system has funopen(3). FreeBSD does, linux probably
does too, not sure about other systems.
1. uncomment the following line in main/http.c
// #define DO_SSL /* comment in/out if you want to support ssl */
2. add -lssl to AST_LIBS in main/Makefile
3. add the following options to http.conf
sslenable=yes
sslbindport=4433 ; pick one you like
sslcert=/tmp/foo.pem ; path to your certificate file.
4. generate a suitable certificate e.g. (example from mini_httpd's Makefile:
openssl req -new -x509 -days 365 -nodes -out /tmp/foo.pem -keyout /tmp/foo.pem
and here you go:
https://localhost:4433/asterisk/manager
now works.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45869 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
reply back to http clients.
Use fprintf/fwrite instead, since we are already using a FILE *
to read the input.
If you wonder why, this is because it makes it trivial to
implement https support (as long as your system has funopen()).
And this is what i am going to put in with the next few commits...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45858 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
and reading from the config file used ntohs instead of htons.
this ought to be merged to 1.4 as well.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45836 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
(e.g. browsers do this when they encode input strings from a form).
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45474 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
minor optimizations to avoid extra calls of strlen(),
and some variable localization.
One feature worth backporting is the move of ast_variables_destroy()
to a different place in handle_uri() to avoid leaking memory
in case a uri is not found.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45463 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45169 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
(basically whitespace only).
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45161 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45160 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
On passing, small rearrangement of the code to reduce indentation.
There is a bit more cleanup planned for this file, so a merge to 1.4
will be done when it is all done.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45152 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45151 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44568 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r44378 | kpfleming | 2006-10-04 14:47:22 -0500 (Wed, 04 Oct 2006) | 4 lines
update thread creation code a bit
reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space
add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44379 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
patch provided in bugnote, with minor changes.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44253 f38db490-d61c-443f-a65b-d21fe96a405b
|
|
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43449 f38db490-d61c-443f-a65b-d21fe96a405b
|