Refuse to push empty messages.
Only refuse empty messages for POST.
Accept OPTIONS in addition to GET for cross-domain queries.
Typo :)
Handle OPTIONS differently. Only the headers are really needed.
There's no point in returning whatever lies in the queue.
Merge erikh push_ignore_queue_on_no_cache.
I don't buy the cors_allow feature, because arbitrary headers can already be
set up through the nginx config file.
fix: fill out content_type_len in headers_out
Support timeout for long-poll subscribers, merge from @yangjian
Merge ngx_http_push_find_in_header_value()
added test.py
added comments at the top of test.py
A correctly working example test.py. Last commit was a stupid one, in excitement, never checked that its not working right. :) Thanks to leo for pointing out the correct headers to use.
a dummy commit to ammend the last erroneous commit msg. amends: A correctly working example test.py. Last commit was a bit stupid one, in excitement, never checked that it was not working right. :) Thanks to Leo, this version has the correct headers too.
fix memory leak when no listeners are present

In that case messages were never freed. This hack might easily break case where
you actually have configured queueing of the messages. I will look at that later.
remove ngx_http_push_pool to avoid memory leaks

Nginx pool allocator is meant to be used for storing stuff while handling the HTTP request
and is usually destroyed when the request is done. Since the allocator assumes the pool is
short lived and will be destroyed anyway it really doesn't keep track of small allocations
and just takes new memory from the internally allocated blocks.
So calling ngx_pfree() on a small allocation (smaller than 4KiB by default) doesn't really do anything.

Since ngx_http_push_pool was a long lived pool that was created on module init it lead to memory leaks
even though ngx_pfree() was called correctly.
This patch basically just rips out pool allocator usage and replaces it with system allocator usage.
basic tools for performance/stress testing

push_nginx.py is a utility for sending a lot of push messages to the server in parallel (parallelized with processes).
It's highly configurable from the command line and the emphasis is on testing configurations that have many channels.

simple_client.py is a utility for emulating a small number of clients listening on these channels.
fix for "push_subscriber_concurrency last"

push_subscriber_concurrency last didn't work quite as expected: older connections
did indeed get HTTP 409 Conflict when a new subscriber arrived but after that the new
connection was terminated without returning any status code.

This was caused by broken check for return value of the ngx_http_push_broadcast_status_locked()
which is just a wrapper for ngx_http_push_broadcast_locked() which in turn can only return
NGX_HTTP_PUSH_MESSAGE_RECEIVED or NGX_HTTP_PUSH_MESSAGE_QUEUED so the response was always
interpreted as error.
fixes to the large message support

This is a fix for the race condition in the code that sends out same message to multiple subscribers
(ie. broadcast mode configuration).

The race condition arises from the fact that ngx_http_push_respond_to_subscribers() really just sets up
the response mechanisms and actual responding might not be finished for all the clients by the time
that this function frees the resources and returns.

For smaller messages this didn't usually cause problems since the memory was just freed and it's rather unlikelly
that something else manages to reuse it quickly enough. It was easily repeatable with larger messages (>100kb)
and only a single listener on channel since in this configuration the file descriptor was closed before sending
process managed to send all of the response out.

This usually manifested in responses to clients that were cut of at some random point and sendfile error was written
to nginx error log.

This fix makes deallocation of the data structs used in responding asynchronous.

I also give every responder their own FD for the temporary file since sharing just one between
multiple asynchronous workers leads to various interesting message corruptions too.
removed debug print
Merge branch 'master' of https://github.com/hadara/nginx_http_push_module into topic/nginx-push-module/CLOUD-210