Skip to content

Commit db428bf

Browse files
committed
doc: added a new section, "Cocockets Not Available Everywhere", under the "Known Issues" section.
1 parent 1506812 commit db428bf

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

README.markdown

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Table of Contents
3737
* [Lua Coroutine Yielding/Resuming](#lua-coroutine-yieldingresuming)
3838
* [Lua Variable Scope](#lua-variable-scope)
3939
* [Locations Configured by Subrequest Directives of Other Modules](#locations-configured-by-subrequest-directives-of-other-modules)
40+
* [Cocockets Not Available Everywhere](#cocockets-not-available-everywhere)
4041
* [Special PCRE Sequences](#special-pcre-sequences)
4142
* [Mixing with SSI Not Supported](#mixing-with-ssi-not-supported)
4243
* [SPDY Mode Not Fully Supported](#spdy-mode-not-fully-supported)
@@ -735,6 +736,15 @@ will not work as expected.
735736

736737
[Back to TOC](#table-of-contents)
737738

739+
Cocockets Not Available Everywhere
740+
----------------------------------
741+
742+
Due the internal limitations in the nginx core, the cosocket API are disabled in the following contexts: [set_by_lua*](#set_by_lua), [log_by_lua*](#log_by_lua), [header_filter_by_lua*](#header_filter_by_lua), and [body_filter_by_lua](#body_filter_by_lua).
743+
744+
The cosockets are currently also disabled in the [init_by_lua*](#init_by_lua) and [init_worker_by_lua*](#init_worker_by_lua) directive contexts but we may add support for these contexts in the future because there is no limitation in the nginx core (or the limitation might be worked around).
745+
746+
[Back to TOC](#table-of-contents)
747+
738748
Special PCRE Sequences
739749
----------------------
740750
PCRE sequences such as `\d`, `\s`, or `\w`, require special attention because in string literals, the backslash character, `\`, is stripped out by both the Lua language parser and by the Nginx config file parser before processing. So the following snippet will not work as expected:

doc/HttpLuaModule.wiki

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,12 @@ The [[#ngx.location.capture|ngx.location.capture]] and [[#ngx.location.capture_m
599599

600600
will not work as expected.
601601

602+
== Cocockets Not Available Everywhere ==
603+
604+
Due the internal limitations in the nginx core, the cosocket API are disabled in the following contexts: [[#set_by_lua|set_by_lua*]], [[#log_by_lua|log_by_lua*]], [[#header_filter_by_lua|header_filter_by_lua*]], and [[#body_filter_by_lua|body_filter_by_lua]].
605+
606+
The cosockets are currently also disabled in the [[#init_by_lua|init_by_lua*]] and [[#init_worker_by_lua|init_worker_by_lua*]] directive contexts but we may add support for these contexts in the future because there is no limitation in the nginx core (or the limitation might be worked around).
607+
602608
== Special PCRE Sequences ==
603609
PCRE sequences such as <code>\d</code>, <code>\s</code>, or <code>\w</code>, require special attention because in string literals, the backslash character, <code>\</code>, is stripped out by both the Lua language parser and by the Nginx config file parser before processing. So the following snippet will not work as expected:
604610

0 commit comments

Comments
 (0)