Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New features for ngx_lua #286

Closed
wants to merge 29 commits into from
Closed

New features for ngx_lua #286

wants to merge 29 commits into from

Commits on Apr 24, 2013

  1. Added an optional parameter for ngx.req.set_header and ngx.req.clear_…

    …header that determines whether or not to replace underscores with hyphens.
    
    Previously, underscores were replaced unconditionally.
    Currently each of the functions has another boolean argument. If it's false, underscores would not be touched. If it's true, they would.
    The default value of the argument is true.
    Aviram committed Apr 24, 2013
    Configuration menu
    Copy the full SHA
    3f39535 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2013

  1. Merged with 0.8.1

    Aviram committed May 8, 2013
    Configuration menu
    Copy the full SHA
    886e27b View commit details
    Browse the repository at this point in the history
  2. Changed the replace_underscores parameter to a table of parameters (o…

    …ptions), in which the only possible option currently is replace_underscores.
    aviramc committed May 8, 2013
    Configuration menu
    Copy the full SHA
    1c5e5b9 View commit details
    Browse the repository at this point in the history
  3. Added an options table to clean_header as well.

    aviramc committed May 8, 2013
    Configuration menu
    Copy the full SHA
    f2e849a View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2013

  1. Configuration menu
    Copy the full SHA
    e1281a2 View commit details
    Browse the repository at this point in the history
  2. Added ngx.req.set_keepalive and ngx.req.get_keepalive to control the …

    …keepalive option for the request.
    aviram committed Sep 29, 2013
    Configuration menu
    Copy the full SHA
    f602d0f View commit details
    Browse the repository at this point in the history
  3. Removed unneeded variable.

    aviram committed Sep 29, 2013
    Configuration menu
    Copy the full SHA
    d4d2988 View commit details
    Browse the repository at this point in the history
  4. Added SSL support for TCP cosockets.

    aviram committed Sep 29, 2013
    Configuration menu
    Copy the full SHA
    ef2ce04 View commit details
    Browse the repository at this point in the history
  5. Multiple changes:

     - Now receive and send operations can be done simultaneous from several threads.
     - A different timeout can be set for receive and send.
     - Added fake_close for the client socket (ngx.req.socket), so that a thread that receives on this socket can be notified that we don't want to read from it anymore.
    aviram committed Sep 29, 2013
    Configuration menu
    Copy the full SHA
    a3f9aa9 View commit details
    Browse the repository at this point in the history
  6. Added the option 'bsd_receive' to the receive method, which enables u…

    …s to receive just like BSD's recv call, meaning the maximum number of bytes given.
    
    This will only work only when a number is given as the first parameter for receive.
    Note that this differs from the original LuaSocket API.
    aviram committed Sep 29, 2013
    Configuration menu
    Copy the full SHA
    d4864a9 View commit details
    Browse the repository at this point in the history
  7. Added the lua_correct_location_header directive. If off, when setting…

    … the "Location" response header, Nginx won't try to make absolute in case it's relative.
    
    Default is on.
    aviram committed Sep 29, 2013
    Configuration menu
    Copy the full SHA
    08dc8b4 View commit details
    Browse the repository at this point in the history
  8. Added the 'lua_enforce_content_type' directive. When this is off and …

    …response headers weren't set, ngx_lua won't enforce setting the content type header.
    
    Default is on, and this causes the default behavior - if the headers aren't set, then the 'Content-Type' header is set to the default content type.
    aviram committed Sep 29, 2013
    Configuration menu
    Copy the full SHA
    7a7b7fc View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2013

  1. Added two killing functions -

     ngx.thread.kill - kills a thread.
     ngx.thread.kill_sleeping - either kills immediately a sleeping thread, or, if the thread is not sleeping, can wait for it to end. Useful for a thread that has a loop in which it sleeps.
    aviram committed Sep 30, 2013
    Configuration menu
    Copy the full SHA
    2a84a4c View commit details
    Browse the repository at this point in the history
  2. Lua subrequests - added support for passing the method optional param…

    …eter as a string.
    
    If the method string isn't a known Nginx method, it is still passed (and Nginx considers it as unknown).
    aviram committed Sep 30, 2013
    Configuration menu
    Copy the full SHA
    2799aad View commit details
    Browse the repository at this point in the history
  3. Added ngx.location.capture_stream, which enables a single subrequest …

    …to be performed in a streaming fashion.
    aviram committed Sep 30, 2013
    Configuration menu
    Copy the full SHA
    c111582 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'keepalive' into patches

    aviram committed Sep 30, 2013
    Configuration menu
    Copy the full SHA
    2936588 View commit details
    Browse the repository at this point in the history
  5. Merge branch 'location-header' into patches

    Conflicts:
    	src/ngx_http_lua_common.h
    	src/ngx_http_lua_module.c
    aviram committed Sep 30, 2013
    Configuration menu
    Copy the full SHA
    61f8f07 View commit details
    Browse the repository at this point in the history
  6. Merge branch 'socket-changes' into patches

    Conflicts:
    	src/ngx_http_lua_common.h
    	src/ngx_http_lua_module.c
    aviram committed Sep 30, 2013
    Configuration menu
    Copy the full SHA
    4ed8b96 View commit details
    Browse the repository at this point in the history
  7. Merge branch 'socket-changes' into patches

    aviram committed Sep 30, 2013
    Configuration menu
    Copy the full SHA
    5e9e3c3 View commit details
    Browse the repository at this point in the history
  8. Merge branch 'subrequest-methods' into patches

    aviram committed Sep 30, 2013
    Configuration menu
    Copy the full SHA
    d3c8e40 View commit details
    Browse the repository at this point in the history
  9. Merge branch 'thread-kill' into patches

    aviram committed Sep 30, 2013
    Configuration menu
    Copy the full SHA
    fb225e6 View commit details
    Browse the repository at this point in the history
  10. Merge branch 'subrequest-streaming' into patches

    aviram committed Sep 30, 2013
    Configuration menu
    Copy the full SHA
    ac49b69 View commit details
    Browse the repository at this point in the history
  11. Added fake_close to the raw socket as well.

    aviram committed Sep 30, 2013
    Configuration menu
    Copy the full SHA
    ae9d9f7 View commit details
    Browse the repository at this point in the history
  12. Merge branch 'socket-changes' into patches

    aviram committed Sep 30, 2013
    Configuration menu
    Copy the full SHA
    a5e3322 View commit details
    Browse the repository at this point in the history
  13. del_thread doesn't remove the sleeping timer, which may cause segfaul…

    …ts when using ngx.thread.kill_sleeping.
    
    Now removing the timer.
    aviram committed Sep 30, 2013
    Configuration menu
    Copy the full SHA
    7cd287a View commit details
    Browse the repository at this point in the history
  14. Merge branch 'thread-kill' into patches

    aviram committed Sep 30, 2013
    Configuration menu
    Copy the full SHA
    f21cb57 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2013

  1. Setting ctx->headers_set to 1 whenever setting a header successfully …

    …(even when enforce_content_type is off).
    aviram committed Oct 1, 2013
    Configuration menu
    Copy the full SHA
    fff19d6 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'content-type' into patches

    aviram committed Oct 1, 2013
    Configuration menu
    Copy the full SHA
    4714264 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2013

  1. Now when using the raw request socket, one shouldn't read the entire …

    …request body before using it.
    
    This makes it possible to implement 'streaming' protocols, in which both client and server can read and write at the same time (such as forward HTTPS proxy with the CONNECT method).
    aviram committed Oct 2, 2013
    Configuration menu
    Copy the full SHA
    cf77dc3 View commit details
    Browse the repository at this point in the history