Giter Site home page Giter Site logo

mongrel2 / mongrel2 Goto Github PK

View Code? Open in Web Editor NEW
1.3K 1.3K 186.0 10.43 MB

The Mongrel2 Web Server Project

Home Page: http://mongrel2.org/

License: BSD 3-Clause "New" or "Revised" License

Makefile 1.16% Python 0.17% HTML 0.01% C 94.39% Shell 0.53% Assembly 0.31% Awk 0.05% Ragel 2.68% Roff 0.38% PHP 0.14% Yacc 0.18%

mongrel2's Introduction

Mongrel2: The Language Agnostic Web Server

Mongrel2 is an application, language, and network architecture agnostic web server that focuses on web applications using modern browser technologies.

Features

  • Language Agnostic with a simple backend protocol supporting 17 languages and platforms all written by Mongrel2 fans.
  • Modern Browser Friendly designed to handle HTTP, Flash XMLSockets, or WebSockets, Long Polling on the same socket transparently.
  • ZeroMQ Enabled as well as HTTP proxy support so it works with what you have already while giving you new super powers.
  • Network Architecture Agnostic so you can carve your operations up any way that reduces costs.
  • N:M Messaging Patterns means you can have any N handlers answer to any M browsers arbitrarily, but still easy to do plain request/response.
  • Automation Loving Configs that are easily accessible via any programming language with a Model-View-Controller design.
  • Modern Internal Design using the Mongrel 1 HTTP parser powering many big companies with a proven security track record, event based I/O, fast coroutines to handle that I/O, and smart reasonable defaults with zero configuration needed usually.
  • Documented, Documented, Documented. We document everything in a well written manual that shows you how to use every feature.
  • BSD Licensed and all with a BSD 3-clause license.
  • Tir -- An official framework written in Lua that shows how to use Mongrel2 to create other frameworks for PHP, Python, etc.

Download

mongrel2 is now v1.13.0 as of Fri Dec 24 2021:

Documentation

Go to http://mongrel2.org for more information.

mongrel2's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mongrel2's Issues

WebSockets

We need WebSockets, which I already implemented but pulled. I'll write up what I hate about WebSockets so it's clear we don't implement the dumb features they have. Then I'll implement it and release it. Pretty much they just get SOCKET state and probably a few transitions from there.

Allow configurable error pages for all errors

M2 currently just has the whole response as a compiled in static string, which is fast, but sort of sucks for custom error responses. Instead, convert these to bformat specs and then allow the error responses to be configurable, but still static. Maybe a file given, or a SQL query? Not sure what's easiest.


zedshaw added on 2010-08-25 01:07:46:
Let's do this one in 2.0 as well.

X-Forwarded-For in Proxy

In IRC there was a request for adding x-forwarded-for to proxy requests. This seems reasonable, and also very doable. I hacked up a prototype here:
https://gist.github.com/1155870

If all we want tot do is have x-forwarded-for support, something like that (only cleaned up and all) seems reasonable. However, if we want to get into fancy mod_rewrite type stuff, then rebuilding and sending the entire HTTP header would be the way to go, as then people could use filters to do those fancy things. That's obviously a much bigger change though.

Any thoughts?

IPv6

When trying to run mongrel inside a linux-vserver VPS that has no IPv6 support, mongrel still tries to create a AF_INET6 socket. Here's the strace output:

socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = -1 EAFNOSUPPORT (Address family not supported by protocol)

FWIW, I think m2 should check whether IPv6 is supported.

BTW, doing a getaddrinfo from Python returned no IPv6 addresses:

socket.getaddrinfo("localhost", 6767)
[(2, 1, 6, '', ('127.0.0.1', 6767)),
(2, 2, 17, '', ('127.0.0.1', 6767)),
(2, 3, 0, '', ('127.0.0.1', 6767))]

NB the first "2" corresponds to the AF_INET4 constant.


jsimmons added on 2010-10-17 12:01:17:
When enumerating the list of addresses returned from getaddrinfo, it will try to bind to the each of the addresses, some of which may fail. This is normal behavior.

However in the mongrel2 code the failure to bind is catastrophic, meaning that instead of iterating over trying each address, the entire thing will collapse as soon as it hits an invalid one.

Really, all that code needs to be replaced with c-ares (or similar, but that's the best bet imo) for async loving and hopefully when we do that, we can get everything else working properly too.


zedshaw added on 2010-10-17 18:03:07:
"[ERROR](src/mongrel2.c:124: errno: Address family not supported by protocol) Can't announce on TCP port 80"

That's the error line from IRC. Need that to find the source line for the error.

Rejecting an upload with an empty reply crashes with a double free

While attempting to follow the documentation's description of how to reject an unwanted upload, I found that actually sending a zero-length reply back up to Mongrel2 flat out kills it:

mongrel2(51243,0x7fff70884ca0) malloc: *** error for object 0x100403b8d: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

I'm using the Python handler object's reply_http method to send the response if that makes any difference.


zedshaw added on 2011-05-12 15:50:43 UTC:
Alright I'll have to reconfirm this is still in 1.6 but it probably is.

does not load config on ipv6 disabled host

On a linux host with ipv6 disabled, the server fails to load after

src/task/net.c:174: Trying target: :::6767, af 10, prot 0

I'm running Ubuntu 10.10

Not sure if this is a bug or by design..
I had to enable ipv6 just for mongrel2, for it to load

Thanks..

Handler test suite/system.

Think would be nice to get a comprehensive test suite for handlers. Testing
in a basic request/response kind of way so we can hopefully avoid little
issues before they happen.

Handler Parser spit out 'why' parsing failed

My messages to the mongrel server occasionally fail and it would be great to know why. I will look over at the mongrel2 session and see

[ERROR] (src/handler.c:173: errno: None) Failed to parse message from handler.

OR

[ERROR] (src/handler.c:173: errno: Resource temporarily unavailable) Failed to parse message from handler.

I looked inside handler_parser.c and I'm not sure where the error is from. Is there a bad netstring? Bad overall format?

To see how I generate the "Resource temporarily unavailable" error statement:
https://gist.github.com/787004

I can cook up the "None" error as well. That is just when I send a normal small message.

Implement filters on state transitions

The filters will be .so files that are loaded and injected at points along the transition during certain events. They're configured via a new class named Filter() and with the parameter of the state and the .so. They are implemented as a simple function that is called from the .so to handle the requested state and connection, nothing more. From that we can implement other kinds like ones based on 0MQ handlers.

Make JSON/XML sockets have optional host target routing

Right now JSON and XML sockets can't target a host, just the default host. We can fix this by updating the parser to handle:

<test host="mongrel2.org"...

And require that host=... must be first or it's ignored. The JSON target already supports GET parameters, so we can do:

@test?host=mongrel2.org

To do it with JSON.

Procer error messages should go into error.log

When the executable I was trying to launch using procer was not found, procer kept trying to restart, but the error.log was not helpful in identifying this problem.

The run.log had the accurate error message thrown by the shell. ie.,
/home/pradeep/deployment/profiles/gitit/run: line 7: gitit: command not found

This message should have been in the error.log

See http://librelist.com/browser//mongrel2/2010/10/21/procer-monitored-process-keeps-getting-restarted/#ce96d52d6bddf4f551794d27f25cb203 for context.

internal redirect by backend (x-sendfile/x-accel-redirect)

One capability I would like is to have mongrel2 do 'redirects' based on instructions from backends.

In Lighty/Nginx this is very useful for having backends (like php, or whatever) making a decision and the webserver handeling the actual sending to the client of a resource/file. This way the backend never has to read the resource and is freed up quickly.
Another usage example is authentication, logging or triggers, ...

The mentioned webservers implement this through a specific header. Nginx even provides some settings like rate control.

http://wiki.nginx.org/NginxXSendfile

dir.c shouldn't use strftime to format dates

Sorry to be an RFC weenie but there's a TODO against this date generation code anyway, so I figure it's fair game...

According to a strict interpretation of the RFCs, HTTP date headers shouldn't be generated using strftime. Taken from the docstring of the relevant functions in python's stdlib:

""" According to RFC 1123, day and month names must always be in English. If not for that, this code could use strftime(). It can't because strftime() honors the locale and could generate non-English names. """


zedshaw added on 2011-04-22 23:24:12 UTC:
Great, so now we have to write our own damn time format function. Either that or force the LOCALE to english. Freaking awesome.

manual needs a section on configuring ssl

I got SSL up and running with no problems following the instructions here

  http://bnpcs.blogspot.com/2011/01/mongrel2-and-ssl.html

This info should make its way into the fine manual in some form. At the very least, the settings keys should be listed under "tweakable expert settings" so you can search the page for the word "ssl" and find something useful.

Extensive performance tuning

Start doing performance tuning extensively and working out all the kinks in scaling.


agartrell added on 2010-09-08 20:30:36:
One thing, constants for filerecord caching are pretty arbitrary. Possibly worth adjusting here.

request_tests: Wrong time from header on OpenSolaris

Build of mongrel2 and m2sh complete with some changes I'll doc elsewhere, but tests always stop on:

ERROR in test tests/request_tests:

RUNNING: ./tests/request_tests
FAILED: Wrong time from header.

After experimenting with smaller test cases, it looks like the problem is in using the strptime %z directive on OpenSolaris. Man page documents this option but tests show it doesn't work for any of the test strings taken from tests.log.

Also, it seems %z is not well supported across platforms and is not in the POSIX spec either. In addition the formats in dir.c and request_tests.c are not identical. Should they be?

dir.c:
const char *RFC_822_TIME = "%a, %d %b %Y %H:%M:%S GMT";
request_tests.c:
const char *RFC_822_TIME = "%a, %d %b %y %T %z";


zedshaw added on 2011-01-09 22:41:16:
Can you tell me if this is with GCC or is it with Sun's C compiler?
anonymous added on 2011-01-14 21:30:28:
I can duplicate the bug with the opensolaris gcc (gcc (GCC) 3.4.3 (csl-sol210-3_4-20050802))

Make procer more capable.

Rather than making procer standalone let's just make it more useful:

  1. Move it into the tools directory.
  2. It should keep trying to run stuff all the time.
  3. Switch to taskdelay now that taskdelay is fixed.
  4. Have it detect !0 exit codes and spit out the error to error.log or say to check run.log.
  5. Give it something like the control port so we can work with it.

And anything else that will make it nicer.

Create examples and document the use/install of each language

This is actually huge, so it may become more tickets, but we need to work out how each language is used with Mongrel2. Leave the actual bindings where they are in say github, but actually try to use them to make something. If their setup sucks then fork, improve, pull request. Keep doing this until it's nice and then document that. If they author isn't interested in maintaining, then take it over and put ours in the official list.

OS X sendfile wrapper failed

Serving static files larger than 200 KB is broken on OSX:

[ERROR](src/bsd_specific.c:63: errno: Socket is not connected) OS X sendfile wrapper failed
[ERROR](src/bsd_specific.c:63: errno: Broken pipe) OS X sendfile wrapper failed
[ERROR](src/bsd_specific.c:63: errno: Socket is not connected) OS X sendfile wrapper failed

  • Mongrel2 is installed on OSX 10.6.4.
  • With files smaller than 200 KB it works.

agartrell added on 2010-12-22 19:32:20:
Mostly fixed with patch from [email protected].

Still getting the following, however

[ERROR] (src/dir.c:159: errno: None) Sent other than expected, sent: -1, but expected: 98666304

m2sh depends on 'uuidgen'

calling the 'uuid' command of m2sh yields:

% m2sh 
mongrel2> uuid
sh: uuidgen: not found

the obvious solution is to install 'uuidgen' but the documentation about this fact could be improved:


anonymous claiming to be xraid added on 2010-10-24 14:41:46:
zmq has a class uuid.cpp

// This class provides RFC 4122 (a Universally Unique IDentifier)
// implementation.

class uuid_t

maybe use that ? ...


zedshaw added on 2011-01-09 22:43:04:
Actually I think we'll just remove the uuid feature from m2sh. It's too much of a pain.

Error messages for missing variables is weird.

main = Server( uuid="43d67166-15bc-4cb3-b727-be5ccf4eb8d1", access_log="/logs/access.log", error_log="/logs/error.log", chroot="./", pid_file="/run/mongrel2.pid", default_host="localhost", port=8787, hosts = [ Host(name="mongrel2.org", routes={ '/mp3stream': Handler( send_spec='tcp://127.0.0.1:9997', send_ident='53f9f1d1-1116-4751-b6ff-4fbe3e43d142', recv_spec='tcp://127.0.0.1:9996', recv_ident='') }) ] )

servers = [main]

The error message for this sucks. The Server is missing the 'name' variable, but we print out:

[ERROR](errno: None) Variable name is expected to be a QSTRING but it's not.

m2sh should warn about (and possibly fix) misformatted Dir handlers

It's possible to load a misformatted Dir handler, causing either of these errors:

[ERROR] (src/dir.c:180: errno: No such file or directory) Don't start the base with / in /static, that will fail when not in chroot.

[ERROR] (src/dir.c:181: errno: No such file or directory) End directory base with / in ./static or it won't work right.

m2sh should error out when loading a config with these errors, or possibly just warn and fix in the latter case.

Feature Request - Timestamps in Log Files

Access logs currently include a posix timestamp, however error log entries do not include any timestamping.

  1. A timestamp of some form be included in error log messages.
  2. Log timestamping should be easily human readable without needing external tools to interpret timestamps.

Make .deb and .rpm using OpenSUSE Build Systems

darix contacted me and hooked me up with an already setup build for Mongrel2 on OpenSuSE build system. Make it work and then use it to make packages for everyone so they can install it easier.

Add an internal handler for doing SQL query responses

It'll be handy to put a few canned responses to common jssocket and http requests in the sqlite3 database, especially for things like maintenance modes. Make one of the first loaded handlers a SQL query responder that converts sqlite3 query results to decent JSON (steal it from MulletDB).

`make clean all` fails

I successfully installed ZeroMQ v2.1.9, but installation of Mongrel2 v1.7.5 fails. This on Linux Mint Katya (aka Ubuntu Natty 11.04) x64.

This is the output of make clean all:

rm -rf build bin lib src/adt/darray.o src/adt/dict.o src/adt/hash.o src/adt/list.o src/adt/tst.o src/bstr/bsafe.o src/bstr/bstraux.o src/bstr/bstrlib.o src/config/config.o src/config/db.o src/config/module.o src/http11/http11_parser.o src/http11/httpclient_parser.o src/mem/halloc.o src/polarssl/aes.o src/polarssl/arc4.o src/polarssl/base64.o src/polarssl/bignum.o src/polarssl/camellia.o src/polarssl/certs.o src/polarssl/debug.o src/polarssl/des.o src/polarssl/dhm.o src/polarssl/havege.o src/polarssl/md2.o src/polarssl/md4.o src/polarssl/md5.o src/polarssl/net.o src/polarssl/padlock.o src/polarssl/rsa.o src/polarssl/sha1.o src/polarssl/sha2.o src/polarssl/sha4.o src/polarssl/ssl_cli.o src/polarssl/ssl_srv.o src/polarssl/ssl_tls.o src/polarssl/timing.o src/polarssl/version.o src/polarssl/x509parse.o src/polarssl/xtea.o src/task/context.o src/task/fd.o src/task/net.o src/task/qlock.o src/task/rendez.o src/task/task.o src/bsd_specific.o src/cache.o src/connection.o src/control.o src/dbg.o src/dir.o src/filter.o src/handler.o src/handler_parser.o src/headers.o src/host.o src/io.o src/log.o src/mime.o src/mongrel2.o src/pattern.o src/proxy.o src/register.o src/request.o src/response.o src/routing.o src/server.o src/setting.o src/state.o src/superpoll.o src/tnetstrings.o src/unixy.o src/upload.o src/state.o src/http11/http11_parser.o src/task/asm.o tests/bstr_tests tests/cache_tests tests/config_tests tests/connection_tests tests/darray_tests tests/db_tests tests/dict_tests tests/dir_tests tests/filter_tests tests/handler_parser_tests tests/handler_tests tests/hash_tests tests/host_tests tests/http11_tests tests/httpclient_tests tests/io_tests tests/list_tests tests/mime_tests tests/pattern_tests tests/proxy_tests tests/register_tests tests/request_tests tests/response_tests tests/routing_tests tests/server_tests tests/setting_tests tests/state_tests tests/superpoll_tests tests/tnetstrings_tests tests/tst_tests tests/unixy_tests tests/config.sqlite
rm -f tests/perf.log 
rm -f tests/test.pid 
rm -f tests/tests.log 
rm -f tests/empty.sqlite 
rm -f tools/lemon/lemon
rm -f tools/m2sh/tests/tests.log 
find . -name "*.gc*" -exec rm {} \;
make -C tools/m2sh OPTLIB= clean
make[1]: ingresso nella directory "/opt/mongrel2-1.7.5/tools/m2sh"
rm -rf src/*.o build tests/*_tests tests/*.o
make[1]: uscita dalla directory "/opt/mongrel2-1.7.5/tools/m2sh"
make -C tools/filters OPTLIB= clean
make[1]: ingresso nella directory "/opt/mongrel2-1.7.5/tools/filters"
rm -f *.so
make[1]: uscita dalla directory "/opt/mongrel2-1.7.5/tools/filters"
make -C tests/filters OPTLIB= clean
make[1]: ingresso nella directory "/opt/mongrel2-1.7.5/tests/filters"
rm -f *.so
make[1]: uscita dalla directory "/opt/mongrel2-1.7.5/tests/filters"
make -C tools/config_modules OPTLIB= clean
make[1]: ingresso nella directory "/opt/mongrel2-1.7.5/tools/config_modules"
rm -f *.so
make[1]: uscita dalla directory "/opt/mongrel2-1.7.5/tools/config_modules"
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/adt/darray.o src/adt/darray.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/adt/dict.o src/adt/dict.c
src/adt/dict.c: In function ‘dnode_alloc’:
src/adt/dict.c:949:35: warning: unused parameter ‘dict_context’
src/adt/dict.c: In function ‘dnode_free’:
src/adt/dict.c:954:45: warning: unused parameter ‘dict_context’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/adt/hash.o src/adt/hash.c
src/adt/hash.c: In function ‘hnode_alloc’:
src/adt/hash.c:748:35: warning: unused parameter ‘hash_context’
src/adt/hash.c: In function ‘hnode_free’:
src/adt/hash.c:753:45: warning: unused parameter ‘hash_context’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/adt/list.o src/adt/list.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/adt/tst.o src/adt/tst.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/bstr/bsafe.o src/bstr/bsafe.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/bstr/bstraux.o src/bstr/bstraux.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/bstr/bstrlib.o src/bstr/bstrlib.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/config/config.o src/config/config.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/config/db.o src/config/db.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/config/module.o src/config/module.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC     -c -o src/http11/http11_parser.o src/http11/http11_parser.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/http11/httpclient_parser.o src/http11/httpclient_parser.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/mem/halloc.o src/mem/halloc.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/aes.o src/polarssl/aes.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/arc4.o src/polarssl/arc4.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/base64.o src/polarssl/base64.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/bignum.o src/polarssl/bignum.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/camellia.o src/polarssl/camellia.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/certs.o src/polarssl/certs.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/debug.o src/polarssl/debug.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/des.o src/polarssl/des.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/dhm.o src/polarssl/dhm.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/havege.o src/polarssl/havege.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/md2.o src/polarssl/md2.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/md4.o src/polarssl/md4.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/md5.o src/polarssl/md5.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/net.o src/polarssl/net.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/padlock.o src/polarssl/padlock.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/rsa.o src/polarssl/rsa.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/sha1.o src/polarssl/sha1.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/sha2.o src/polarssl/sha2.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/sha4.o src/polarssl/sha4.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/ssl_cli.o src/polarssl/ssl_cli.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/ssl_srv.o src/polarssl/ssl_srv.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/ssl_tls.o src/polarssl/ssl_tls.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/timing.o src/polarssl/timing.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/version.o src/polarssl/version.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/x509parse.o src/polarssl/x509parse.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC   -c -o src/polarssl/xtea.o src/polarssl/xtea.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/task/context.o src/task/context.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/task/fd.o src/task/fd.c
src/task/fd.c: In function ‘fdtask’:
src/task/fd.c:96:19: warning: unused parameter ‘v’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/task/net.o src/task/net.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/task/qlock.o src/task/qlock.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/task/rendez.o src/task/rendez.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/task/task.o src/task/task.c
src/task/task.c: In function ‘taskmainstart’:
src/task/task.c:322:33: warning: unused parameter ‘v’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/bsd_specific.o src/bsd_specific.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/cache.o src/cache.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/connection.o src/connection.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/control.o src/control.c
src/control.c: In function ‘cstr_free’:
src/control.c:51:41: warning: unused parameter ‘hint’
src/control.c: In function ‘signal_server_cb’:
src/control.c:188:60: warning: unused parameter ‘args’
src/control.c: In function ‘version_cb’:
src/control.c:212:33: warning: unused parameter ‘name’
src/control.c:212:47: warning: unused parameter ‘args’
src/control.c: In function ‘help_cb’:
src/control.c:217:30: warning: unused parameter ‘name’
src/control.c:217:44: warning: unused parameter ‘args’
src/control.c: In function ‘control_stop_cb’:
src/control.c:241:38: warning: unused parameter ‘name’
src/control.c:241:52: warning: unused parameter ‘args’
src/control.c: In function ‘kill_cb’:
src/control.c:248:30: warning: unused parameter ‘name’
src/control.c: In function ‘status_cb’:
src/control.c:275:32: warning: unused parameter ‘name’
src/control.c: In function ‘info_cb’:
src/control.c:302:44: warning: unused parameter ‘args’
src/control.c: In function ‘Control_task’:
src/control.c:393:25: warning: unused parameter ‘v’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/dbg.o src/dbg.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/dir.o src/dir.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/filter.o src/filter.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/handler.o src/handler.c
src/handler.c: In function ‘cstr_free’:
src/handler.c:55:41: warning: unused parameter ‘hint’
src/handler.c: In function ‘Handler_task’:
src/handler.c:194:7: warning: ‘inmsg’ may be used uninitialized in this function
src/handler.c:169:16: note: ‘inmsg’ was declared here
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/handler_parser.o src/handler_parser.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/headers.o src/headers.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/host.o src/host.c
src/host.c: In function ‘backend_destroy_cb’:
src/host.c:46:45: warning: unused parameter ‘map’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/io.o src/io.c
src/io.c: In function ‘null_send’:
src/io.c:49:33: warning: unused parameter ‘iob’
src/io.c:49:44: warning: unused parameter ‘buffer’
src/io.c: In function ‘null_recv’:
src/io.c:54:33: warning: unused parameter ‘iob’
src/io.c:54:44: warning: unused parameter ‘buffer’
src/io.c: In function ‘null_stream_file’:
src/io.c:59:40: warning: unused parameter ‘iob’
src/io.c:59:49: warning: unused parameter ‘fd’
src/io.c: In function ‘ssl_debug’:
src/io.c:210:22: warning: unused parameter ‘p’
src/io.c:210:48: warning: unused parameter ‘msg’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/log.o src/log.c
src/log.c: In function ‘free_log_msg’:
src/log.c:249:32: warning: unused parameter ‘data’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/mime.o src/mime.c
src/mime.c: In function ‘MIME_traverse_destroy’:
src/mime.c:85:47: warning: unused parameter ‘data’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/pattern.o src/pattern.c
src/pattern.c: In function ‘classend’:
src/pattern.c:29:35: warning: unused parameter ‘ms’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/proxy.o src/proxy.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/register.o src/register.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/request.o src/request.c
src/request.c: In function ‘req_alloc_hash’:
src/request.c:60:38: warning: unused parameter ‘notused’
src/request.c: In function ‘req_free_hash’:
src/request.c:65:48: warning: unused parameter ‘notused’
src/request.c: In function ‘header_done_cb’:
src/request.c:92:52: warning: unused parameter ‘at’
src/request.c:92:63: warning: unused parameter ‘length’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/response.o src/response.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/routing.o src/routing.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/server.o src/server.c
src/server.c: In function ‘host_destroy_cb’:
src/server.c:64:42: warning: unused parameter ‘map’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/setting.o src/setting.c
src/setting.c: In function ‘Setting_traverse_destroy’:
src/setting.c:82:50: warning: unused parameter ‘data’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC     -c -o src/state.o src/state.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/superpoll.o src/superpoll.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/tnetstrings.o src/tnetstrings.c
src/tnetstrings.c: In function ‘tns_hnode_free’:
src/tnetstrings.c:169:42: warning: unused parameter ‘notused’
src/tnetstrings.c: In function ‘tns_hnode_alloc’:
src/tnetstrings.c:176:32: warning: unused parameter ‘notused’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/unixy.o src/unixy.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC    -c -o src/upload.o src/upload.c
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -fPIC  -c src/task/asm.S -o src/task/asm.o
ar rcs build/libm2.a src/adt/darray.o src/adt/dict.o src/adt/hash.o src/adt/list.o src/adt/tst.o src/bstr/bsafe.o src/bstr/bstraux.o src/bstr/bstrlib.o src/config/config.o src/config/db.o src/config/module.o src/http11/http11_parser.o src/http11/httpclient_parser.o src/mem/halloc.o src/polarssl/aes.o src/polarssl/arc4.o src/polarssl/base64.o src/polarssl/bignum.o src/polarssl/camellia.o src/polarssl/certs.o src/polarssl/debug.o src/polarssl/des.o src/polarssl/dhm.o src/polarssl/havege.o src/polarssl/md2.o src/polarssl/md4.o src/polarssl/md5.o src/polarssl/net.o src/polarssl/padlock.o src/polarssl/rsa.o src/polarssl/sha1.o src/polarssl/sha2.o src/polarssl/sha4.o src/polarssl/ssl_cli.o src/polarssl/ssl_srv.o src/polarssl/ssl_tls.o src/polarssl/timing.o src/polarssl/version.o src/polarssl/x509parse.o src/polarssl/xtea.o src/task/context.o src/task/fd.o src/task/net.o src/task/qlock.o src/task/rendez.o src/task/task.o src/bsd_specific.o src/cache.o src/connection.o src/control.o src/dbg.o src/dir.o src/filter.o src/handler.o src/handler_parser.o src/headers.o src/host.o src/io.o src/log.o src/mime.o src/pattern.o src/proxy.o src/register.o src/request.o src/response.o src/routing.o src/server.o src/setting.o src/state.o src/superpoll.o src/tnetstrings.o src/unixy.o src/upload.o src/state.o src/http11/http11_parser.o src/task/asm.o
ranlib build/libm2.a
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64    -c -o src/mongrel2.o src/mongrel2.c
src/mongrel2.c: In function ‘tickertask’:
src/mongrel2.c:168:23: warning: unused parameter ‘v’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 src/mongrel2.o -o bin/mongrel2 build/libm2.a -lzmq -ldl -lsqlite3 
sqlite3 tests/config.sqlite < src/config/config.sql
sqlite3 tests/config.sqlite < src/config/example.sql
sqlite3 tests/config.sqlite < src/config/mimetypes.sql
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/bstr_tests tests/bstr_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/cache_tests tests/cache_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/cache_tests.c: In function ‘taskmain’:
tests/cache_tests.c:110:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/config_tests tests/config_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/config_tests.c: In function ‘taskmain’:
tests/config_tests.c:83:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/connection_tests tests/connection_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/connection_tests.c: In function ‘test_task_with_sample’:
tests/connection_tests.c:40:39: warning: unused parameter ‘sample_file’
tests/connection_tests.c: In function ‘taskmain’:
tests/connection_tests.c:110:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/darray_tests tests/darray_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/darray_tests.c: In function ‘test_darray_operations’:
tests/darray_tests.c:39:5: warning: comparison between signed and unsigned integer expressions
tests/darray_tests.c:42:5: warning: comparison between signed and unsigned integer expressions
tests/darray_tests.c:45:5: warning: comparison between signed and unsigned integer expressions
tests/darray_tests.c: In function ‘taskmain’:
tests/darray_tests.c:77:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/db_tests tests/db_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/db_tests.c: In function ‘taskmain’:
tests/db_tests.c:117:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/dict_tests tests/dict_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/dict_tests.c: In function ‘new_node’:
tests/dict_tests.c:53:32: warning: unused parameter ‘c’
tests/dict_tests.c: In function ‘del_node’:
tests/dict_tests.c:64:31: warning: unused parameter ‘n’
tests/dict_tests.c:64:40: warning: unused parameter ‘c’
tests/dict_tests.c: In function ‘test_dict_operations’:
tests/dict_tests.c:164:19: warning: comparison between signed and unsigned integer expressions
tests/dict_tests.c: In function ‘taskmain’:
tests/dict_tests.c:316:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/dir_tests tests/dir_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/dir_tests.c: In function ‘fake_req’:
tests/dir_tests.c:92:5: warning: comparison between signed and unsigned integer expressions
tests/dir_tests.c: In function ‘taskmain’:
tests/dir_tests.c:181:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/filter_tests tests/filter_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/filter_tests.c: In function ‘taskmain’:
tests/filter_tests.c:84:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/handler_parser_tests tests/handler_parser_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/handler_parser_tests.c: In function ‘test_parse’:
tests/handler_parser_tests.c:15:36: warning: comparison between signed and unsigned integer expressions
tests/handler_parser_tests.c: In function ‘taskmain’:
tests/handler_parser_tests.c:47:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/handler_tests tests/handler_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/handler_tests.c: In function ‘taskmain’:
tests/handler_tests.c:75:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/hash_tests tests/hash_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/hash_tests.c: In function ‘new_node’:
tests/hash_tests.c:47:32: warning: unused parameter ‘c’
tests/hash_tests.c: In function ‘del_node’:
tests/hash_tests.c:58:31: warning: unused parameter ‘n’
tests/hash_tests.c:58:40: warning: unused parameter ‘c’
tests/hash_tests.c: In function ‘taskmain’:
tests/hash_tests.c:199:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/host_tests tests/host_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/host_tests.c: In function ‘taskmain’:
tests/host_tests.c:22:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/http11_tests tests/http11_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/http11_tests.c: In function ‘debug_element_cb’:
tests/http11_tests.c:6:29: warning: unused parameter ‘data’
tests/http11_tests.c:6:47: warning: unused parameter ‘at’
tests/http11_tests.c:6:58: warning: unused parameter ‘length’
tests/http11_tests.c: In function ‘debug_field_cb’:
tests/http11_tests.c:10:27: warning: unused parameter ‘data’
tests/http11_tests.c:10:45: warning: unused parameter ‘field’
tests/http11_tests.c:10:59: warning: unused parameter ‘flen’
tests/http11_tests.c:10:77: warning: unused parameter ‘value’
tests/http11_tests.c:10:91: warning: unused parameter ‘vlen’
tests/http11_tests.c: In function ‘test_parser_thrashing’:
tests/http11_tests.c:61:18: warning: comparison between signed and unsigned integer expressions
tests/http11_tests.c: In function ‘taskmain’:
tests/http11_tests.c:118:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/httpclient_tests tests/httpclient_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/httpclient_tests.c: In function ‘test_parser_thrashing’:
tests/httpclient_tests.c:69:18: warning: comparison between signed and unsigned integer expressions
tests/httpclient_tests.c:99:17: warning: comparison between signed and unsigned integer expressions
tests/httpclient_tests.c: In function ‘taskmain’:
tests/httpclient_tests.c:128:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/io_tests tests/io_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/io_tests.c: In function ‘taskmain’:
tests/io_tests.c:170:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/list_tests tests/list_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/list_tests.c: In function ‘taskmain’:
tests/list_tests.c:166:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/mime_tests tests/mime_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/mime_tests.c: In function ‘taskmain’:
tests/mime_tests.c:76:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/pattern_tests tests/pattern_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/pattern_tests.c: In function ‘taskmain’:
tests/pattern_tests.c:196:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/proxy_tests tests/proxy_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/proxy_tests.c: In function ‘taskmain’:
tests/proxy_tests.c:25:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/register_tests tests/register_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/register_tests.c: In function ‘taskmain’:
tests/register_tests.c:75:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/request_tests tests/request_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/request_tests.c: In function ‘test_Request_payloads’:
tests/request_tests.c:23:18: warning: comparison between signed and unsigned integer expressions
tests/request_tests.c: In function ‘taskmain’:
tests/request_tests.c:230:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/response_tests tests/response_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/response_tests.c: In function ‘taskmain’:
tests/response_tests.c:47:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/routing_tests tests/routing_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/routing_tests.c: In function ‘check_routing’:
tests/routing_tests.c:13:5: warning: comparison between signed and unsigned integer expressions
tests/routing_tests.c: In function ‘taskmain’:
tests/routing_tests.c:225:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/server_tests tests/server_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/server_tests.c: In function ‘taskmain’:
tests/server_tests.c:79:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/setting_tests tests/setting_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/setting_tests.c: In function ‘taskmain’:
tests/setting_tests.c:43:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/state_tests tests/state_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/state_tests.c: In function ‘test_action_cb’:
tests/state_tests.c:7:32: warning: unused parameter ‘data’
tests/state_tests.c: In function ‘taskmain’:
tests/state_tests.c:148:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/superpoll_tests tests/superpoll_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/superpoll_tests.c: In function ‘taskmain’:
tests/superpoll_tests.c:405:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/tnetstrings_tests tests/tnetstrings_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/tnetstrings_tests.c: In function ‘test_tnetstring_numbers’:
tests/tnetstrings_tests.c:15:5: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘size_t’
tests/tnetstrings_tests.c: In function ‘taskmain’:
tests/tnetstrings_tests.c:169:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/tst_tests tests/tst_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/tst_tests.c: In function ‘taskmain’:
tests/tst_tests.c:166:1: warning: unused parameter ‘argc’
cc -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG  -D_FILE_OFFSET_BITS=64 -o tests/unixy_tests tests/unixy_tests.c build/libm2.a -lzmq -ldl -lsqlite3 
tests/unixy_tests.c: In function ‘taskmain’:
tests/unixy_tests.c:74:1: warning: unused parameter ‘argc’
make OPTFLAGS=" " OPTLIBS="" LIBS="-lzmq -ldl -lsqlite3 " DESTDIR="" PREFIX="/usr/local" -C tests/filters all
make[1]: ingresso nella directory "/opt/mongrel2-1.7.5/tests/filters"
cc -I../../src  -fPIC -shared -nostartfiles -L../../build  -o test_filter.so test_filter.c ../../build/libm2.a
cc -I../../src  -fPIC -shared -nostartfiles -L../../build  -o test_filter_a.so test_filter_a.c ../../build/libm2.a
cc -I../../src  -fPIC -shared -nostartfiles -L../../build  -o test_filter_b.so test_filter_b.c ../../build/libm2.a
cc -I../../src  -fPIC -shared -nostartfiles -L../../build  -o test_filter_c.so test_filter_c.c ../../build/libm2.a
make[1]: uscita dalla directory "/opt/mongrel2-1.7.5/tests/filters"
make OPTFLAGS=" " OPTLIBS="" LIBS="-lzmq -ldl -lsqlite3 " DESTDIR="" PREFIX="/usr/local" -C tools/filters all
make[1]: ingresso nella directory "/opt/mongrel2-1.7.5/tools/filters"
cc -I../../src  -fPIC -shared -nostartfiles -L../../build  -o null.so null.c ../../build/libm2.a
make[1]: uscita dalla directory "/opt/mongrel2-1.7.5/tools/filters"
make OPTFLAGS=" " OPTLIBS="" LIBS="-lzmq -ldl -lsqlite3 " DESTDIR="" PREFIX="/usr/local" -C tools/config_modules all
make[1]: ingresso nella directory "/opt/mongrel2-1.7.5/tools/config_modules"
cc -I../../src  -fPIC -shared -nostartfiles -L../../build  -o null.so null.c ../../build/libm2.a
cc -I../../src  -fPIC -shared -nostartfiles -L../../build  -o zmq.so zmq.c ../../build/libm2.a
make[1]: uscita dalla directory "/opt/mongrel2-1.7.5/tools/config_modules"
sh ./tests/runtests.sh
Running unit tests:
./tests/bstr_tests: error while loading shared libraries: libzmq.so.1: cannot open shared object file: No such file or directory
ERROR in test tests/bstr_tests:
make: *** [tests] Errore 1

Add a warning when the config.sqlite isn't in the chroot for reloads

People will give a start with something like:

mongrel2 /var/www/config.sqlite sdjksdfjksfj

But then, their chroot will also be /var/www/, which means on reload it'll try to read /var/www/var/www/config.sqlite. Need to adjust for this, and then if the config.sqlite isn't in the chroot produce and error in the reload and skip it.

Start pulling down the librelist archives json and doing our own.

librelist has json archives so we could easily pull those down and put them at mongrel2.org


anonymous added on 2010-09-28 00:11:29:
i am working on this using rsync to local -> fields to sqlite -> m2 fossil wiki adds a new page ML with a jquery jsonp call to populate the page search included ... jsonp is served from a handler ...
anonymous added on 2010-09-28 00:58:32:
Ok, let me know when you have something. I hope you mean that you'll be using the site look and feel, not really putting the messages in the fossil repo.
anonymous claiming to be xraid added on 2010-09-28 01:06:47:
correct

- m2 css with some xtra jquery for functionality of page ...

- content and processing can live wherever since its a handler serving jsonp - m2 wiki only embeds it by jquery ajax into a wiki jquery template page ...

mongrel2 failes to pass tests when zeromq is built with openpgm support

my environment: snow leopard 10.6.7. zeromq 2.1.7, sqlite 3.7.6.3 installed with homebrew, mongrel2 at 0e21a8d (latest git version)

make all, last 5 lines:

tests/bstr_tests PASS
tests/cache_tests PASS
./tests/runtests.sh: line 3: 49933 Segmentation fault      ./$i 2>&1 > /tmp/mongrel2-test.log
ERROR in test tests/config_tests:
make: *** [tests] Error 1

tail tests/tests.log

DEBUG tests/bstr_tests.c:3813: # test aux failures: 0
DEBUG tests/cache_tests.c:110: ----- RUNNING: ./tests/cache_tests
DEBUG tests/cache_tests.c:103: 
----- test_cache_evict
DEBUG tests/cache_tests.c:104: 
----- test_cache_manual_evict
DEBUG tests/cache_tests.c:105: 
----- test_cache_lookup
DEBUG tests/config_tests.c:83: ----- RUNNING: ./tests/config_tests
[INFO] (src/server.c:257) Starting 0MQ with 1 threads.

gdb tests/config_tests

...

(gdb) run
Starting program: .../mongrel2/tests/config_tests 
Reading symbols for shared libraries +++.. done
----
RUNNING: .../mongrel2/tests/config_tests

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x00000001007fff78
0x00007fff8190e9fe in libinfoDSmig_Query ()
(gdb) backtrace
#0  0x00007fff8190e9fe in libinfoDSmig_Query ()
#1  0x00007fff8190e7e2 in LI_DSLookupQuery ()
#2  0x00007fff8190e12a in ds_item ()
#3  0x00007fff819814ba in ds_protocol_byname ()
#4  0x00007fff8193b7b5 in search_item_byname ()
#5  0x00007fff819813ec in getprotobyname ()
#6  0x00000001000b6ab5 in pgm_getprotobyname ()
#7  0x00000001000b4ef6 in pgm_init ()
#8  0x00000001000b1b3b in zmq_init ()
#9  0x000000010003be83 in mqinit (threads=783) at fd.c:33
#10 0x000000010004a0e3 in Server_init () at server.c:258
#11 0x000000010000125b in all_tests () at config_tests.c:71
#12 0x00000001000013eb in taskmain (argc=783, argv=0x7fff5fbfe238) at config_tests.c:83
#13 0x000000010003d171 in taskstart (y=783, x=12) at task.c:161
(gdb) 

m2sh give poor error message for missing curly brace

Saw the following:


m2sh load -config mongrel2.conf<br>

[WARN] (errno: None) No option --db given, using "config.sqlite" as the default.<br>

[ERROR] (errno: None) Failed to parse file: mongrel2.conf<br>

[ERROR] (errno: None) Error parsing config file: mongrel2.conf.<br>

With the following conf file:

BEGIN CONF FILE

www_dir = Dir(base='www/',

index_file='index.html',

default_ctype='text/plain'

)



mongrel2 = Host(

name="localhost",

routes={

'www': www_dir

}



main = Server(

... just like sample.conf

)



servers = [main]

END CONF FILE

I expect to see that the parser expects a closing paren and found EOF or something like that. At least that way, I can tell that the issue is with a matching parenthesis.

Add options for how a 0MQ receive handler is loaded

M2 takes all the registered handlers and starts up their receive side, and requires a receive side. It shouldn't start one if there is no receive side, and it should possibly allow some control over how that is started (not sure what though).


zedshaw added on 2010-07-12 00:34:53:
Yeah, this is actually a bad idea when daemonizing is involved. It's very particular about when things should start so we should control it.

Create a m2sh check command to validate configs.

Make a check command, and also run it after a new config. The check command could literally just be a sequence of SQL statements and matched error messages that confirm you've configured things correctly.

Mongrel2 not serving files bigger than 2GB

Currently mongrel2 does not serve files bigger than 2GB.

When mongrel2 calls stat() on a file bigger than 2GB, it returns -1. Compiling mongrel2 with -D_FILE_OFFSET_BITS=64 makes stat correctly read the file's metadata.

Another modification is on the RESPONSE_FORMAT (src/dir.c) constant, that uses %d for the Content-Length reponse header. The correct is to use %llu. It's also necessary to change all IOBuf_stream_* functions, as all these use int for the len parameter.

An initial effort to fix this is commited to the staticfiles-bigger-2gb branch, but as discussed on mailing list [1] this fix will be postponed to a future release.

[1] http://librelist.com/browser//mongrel2/2011/5/27/mongrel2-not-serving-files-bigger-than-2gb/

Create a config delta command for m2sh

Determined this scenario:

  1. You hire ninjas who secretly want to destroy your company.
  2. Late at night, these ninjas go onto your servers where mongrel2 is running, and they inject SQL queries directly into the config that fixes problems, but they don't update the mongrel2.conf to reflect these changes. Their master plan is to wait until you have a problem and then when you update the db from the mongrel2.conf bam your whole site goes down because you don't have the changes they put in recently via SQL. Devious. Brilliant.
  3. To prevent this from happening, and you know actually it'd be useful for a few other reasons, we need a "m2sh diff". You would give it a -db, a -config like normal, but it would compare what it knows about the config to what's in the database and report any differences.

Then people can do this:

"OMG NINJAS!" "Quick update the site it's down!" "Holy crap, what if they changed the config when we weren't looking?" "I know, I'll run m2sh diff and see if they've been sabotaging our site with fixes that we don't know about." "Aha! they have! Those bastards."
anonymous added on 2010-10-10 18:27:34:
this adds to the ticket 692666d87c53549345287f02248ff88ec4f215f8 where one can get a fresch copy to file of a db change from sql ...
anonymous added on 2010-10-10 18:46:35:
there can be a sqlite3 trigger to log any sql change to sql log table ...

thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.