moonbridge

changeset 224:828e2bca2e16 v1.0.0

Fixes in reference documentation
author jbe
date Tue Jun 23 16:47:36 2015 +0200 (2015-06-23)
parents d544e8379691
children 2ecaa4d8ee5c
files reference.txt
line diff
     1.1 --- a/reference.txt	Tue Jun 23 14:47:51 2015 +0200
     1.2 +++ b/reference.txt	Tue Jun 23 16:47:36 2015 +0200
     1.3 @@ -426,10 +426,11 @@
     1.4  -----------
     1.5  
     1.6  The HTTP module exports the function moonbridge_http.generate_handler(callback)
     1.7 -that converts an HTTP handler to a "connect" handler. See file "example.lua"
     1.8 -for an example of invocation. A table with options may be passed either as a
     1.9 -second argument, or as a first argument preceeding the callback function
    1.10 -(whichever is more convenient).
    1.11 +that converts an HTTP handler to a "connect" handler. See file "helloworld.lua"
    1.12 +for a simple example or "example_application.lua" for a more complex example of
    1.13 +invocation. A table with options may be passed either as a second argument, or
    1.14 +as a first argument preceeding the callback function (whichever is more
    1.15 +convenient).
    1.16  
    1.17  The following options are supported:
    1.18  
    1.19 @@ -500,9 +501,11 @@
    1.20  
    1.21  ### request:finish()
    1.22  
    1.23 -Finishes and flushes a HTTP response. May be called multiple times. An
    1.24 -HTTP status, all headers, and the response body (if applicable) must have been
    1.25 -previously sent. After calling this method, no further data may be written.
    1.26 +Finishes and flushes a HTTP response. An HTTP status, all headers, and the
    1.27 +response body (if applicable) must have been previously sent. May be called
    1.28 +multiple times (performs no operation if called on a finished request handle).
    1.29 +Gets automatically invoked when the callback handler returns. After calling
    1.30 +this method explicitly, no further data may be written.
    1.31  
    1.32  
    1.33  ### request:finish_headers()
    1.34 @@ -545,8 +548,8 @@
    1.35  ### request.headers
    1.36  
    1.37  A table that maps (case-insensitively) a HTTP header field name to a sequence
    1.38 -of values. One entry is created for every occurrence of a header line with the
    1.39 -given field name).
    1.40 +of values. For each occurrence of the respective header line, a string entry is
    1.41 +created in that sequence. Non-existent headers are mapped to an empty table.
    1.42  
    1.43  
    1.44  ### request.headers_csv_string
    1.45 @@ -559,8 +562,8 @@
    1.46  ### request.headers_csv_table
    1.47  
    1.48  A table that maps (case-insensitively) a HTTP header field name to a sequence
    1.49 -of values. One entry is created for every comma separated value of each header
    1.50 -with the given field name.
    1.51 +of values. One entry is created in that sequence for every comma separated
    1.52 +value of each header with the given field name.
    1.53  
    1.54  
    1.55  ### request.headers_flags
    1.56 @@ -607,6 +610,9 @@
    1.57  "file_name" and "content_type". If there are several POST values with the given
    1.58  field name, then the first value/file is used.
    1.59  
    1.60 +Note: May be implemented through metamethods, but does support iteration
    1.61 +through pairs(...).
    1.62 +
    1.63  
    1.64  ### request.post_metadata_list
    1.65  
    1.66 @@ -614,6 +620,9 @@
    1.67  to a sequence with their corresponding POST metadata tables. Needed if multiple
    1.68  files are uploaded with the same field name.
    1.69  
    1.70 +Note: May be implemented through metamethods, but does support iteration
    1.71 +through pairs(...).
    1.72 +
    1.73  
    1.74  ### request.post_params
    1.75  
    1.76 @@ -724,7 +733,4 @@
    1.77  Start streaming of request body immediately. On EOF the function returns and
    1.78  the callback function is *not* called with nil as argument.
    1.79  
    1.80 -Note that request:consume_input() needs to be called to enforce streaming to
    1.81 -finish.
    1.82  
    1.83 -

Impressum / About Us