Skip to content
Browse files

Regen doc and projects

  • Loading branch information...
1 parent 1530a1d commit 80ee749eb7791168137005830ede6d2c0fdb7810 @embedthis committed
View
2 doc/api/appwebBare.tags
1 addition, 1 deletion not shown because the diff is too large. Please use a local Git client to view these changes.
View
2 doc/api/espBare.tags
1 addition, 1 deletion not shown because the diff is too large. Please use a local Git client to view these changes.
View
4 doc/api/http.dtags
@@ -2422,8 +2422,8 @@
<type>HttpHost *</type>
<name>httpCreateHost</name>
<anchorfile>group___http_host.html</anchorfile>
- <anchor>ga45276b2bd047354e6fcaf9e279cc35cb</anchor>
- <arglist>(cchar *home)</arglist>
+ <anchor>ga3e6e98147b766aeff4cbfebe8146998b</anchor>
+ <arglist>()</arglist>
</member>
<member kind="function">
<type>HttpHost *</type>
View
37 doc/api/http.html
@@ -176,7 +176,7 @@
<tr class="apiDef"><td class="apiType"><a href="#group___http_stage" class="ref">HttpStage*</a></td><td><a href="#group___http_stage_1gab1e3174087a5e78598b66abe7ac5887e" class="nameRef">httpCreateFilter</a>(<a href="#group___http" class="ref">Http</a> *http, <a href="mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="mpr.html#group___mpr_module" class="ref">MprModule</a> *module)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a filter stage.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___http_stage" class="ref">HttpStage*</a></td><td><a href="#group___http_stage_1ga238f5fb9f76203fdcb07fd6227ae383f" class="nameRef">httpCreateHandler</a>(<a href="#group___http" class="ref">Http</a> *http, <a href="mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="mpr.html#group___mpr_module" class="ref">MprModule</a> *module)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a request handler stage.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___http_packet" class="ref">HttpPacket*</a></td><td><a href="#group___http_packet_1ga24b80ddbcd324b10ac430c4465823190" class="nameRef">httpCreateHeaderPacket</a>()</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a response header packet.</td></tr>
-<tr class="apiDef"><td class="apiType"><a href="#group___http_host" class="ref">HttpHost*</a></td><td><a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="nameRef">httpCreateHost</a>(<a href="mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *home)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a host.</td></tr>
+<tr class="apiDef"><td class="apiType"><a href="#group___http_host" class="ref">HttpHost*</a></td><td><a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="nameRef">httpCreateHost</a>()</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a host.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___http_route" class="ref">HttpRoute*</a></td><td><a href="#group___http_route_1ga4190cb538d908637fa3c7ea17384f1fa" class="nameRef">httpCreateInheritedRoute</a>(<a href="#group___http_route" class="ref">HttpRoute</a> *route)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a route inherited from a parent route.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___http_limits" class="ref">HttpLimits*</a></td><td><a href="#group___http_limits_1gaf6da4fb1c160ebf9ae4e5fbafcdd583c" class="nameRef">httpCreateLimits</a>(int serverSide)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a new limits object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___http_packet" class="ref">HttpPacket*</a></td><td><a href="#group___http_packet_1ga736f27036a2f3752bc3aa5580f75eef7" class="nameRef">httpCreatePacket</a>(<a href="mpr.html#mpr_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a data packet.</td></tr>
@@ -3835,7 +3835,7 @@
<dl><dt><b>Description</b>:</dt><dd>A Host object represents a logical host. Several logical hosts may share a single HttpEndpoint.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
<dl><dt>Fields:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">HttpEndpoint *</td><td><td>defaultEndpoint</td><td>
@@ -3897,7 +3897,7 @@
</table></dd></dl>
<dl><dt>Returns:</dt><dd>&quot;Zero&quot; if the route can be added.</dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<a name="group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b"></a>
@@ -3916,23 +3916,19 @@
</table></dd></dl>
<dl><dt>Returns:</dt><dd>The new HttpHost object.</dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
-<a name="group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb"></a>
+<a name="group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b"></a>
<div class="api">
<div class="prototype">
<a href="#group___http_host" class="ref">HttpHost</a> *
httpCreateHost
-(<a href="mpr.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *home)
+()
</div>
<div class="apiDetail">
<p>Create a host.</p>
<dl><dt><b>Description</b>:</dt><dd>Create a new host object. The host is added to the Http service&apos;s list of hosts.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">home</td><td>directory for the host&apos;s configuration files.</td>
- </table></dd></dl>
<dl><dt>Returns:</dt><dd>The new HttpHost object.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
@@ -3949,7 +3945,7 @@
<p>Get the default host defined via httpSetDefaultHost.</p>
<dl><dt>Returns:</dt><dd>The defaul thost object.</dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<a name="group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa"></a>
@@ -3966,7 +3962,7 @@
<tr><td class="param">host</td><td>HttpHost object.</td>
</table></dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<a name="group___http_host_1gacba7af49f198c1ac13e6cadd2673956f"></a>
@@ -3983,7 +3979,7 @@
<tr><td class="param">host</td><td>Host to define as the default host.</td>
</table></dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<a name="group___http_host_1gae8d3b5ebddb6c740c738befee3c78efb"></a>
@@ -4002,7 +3998,7 @@
<tr><td class="param">route</td><td>Route to define as the default.</td>
</table></dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<a name="group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad"></a>
@@ -4023,7 +4019,7 @@
</table></dd></dl>
<dl><dt>Returns:</dt><dd>&quot;Zero&quot; if the route can be added.</dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<a name="group___http_host_1ga446cc7ba87875c92e544e035a404f33f"></a>
@@ -4043,7 +4039,7 @@
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if the route can be added.</dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<a name="group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581"></a>
@@ -4062,7 +4058,7 @@
<tr><td class="param">protocol</td><td>Set to either HTTP/1.0 or HTTP/1.1.</td>
</table></dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a></dd></dl>
</div>
</div>
<a name="group___http_host_1ga2302c34632a1b72ec759533ee9d7ad10"></a>
@@ -4081,7 +4077,7 @@
<tr><td class="param">root</td><td>Directory path for the host server root.</td>
</table></dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<h1>HttpLimits</h1>
@@ -4544,7 +4540,7 @@
Low water mark for flow control.
</td>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" >ssize</a></td><td><td>max</td><td>
-Maxiumum queue size.
+Advisory maxiumum queue size.
</td>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" >cchar</a> *</td><td><td>name</td><td>
Queue name for debugging.
@@ -8118,6 +8114,9 @@
<tr><td class="param"><a class="ref" href="#mpr_8h_1aa6887458d0a070b3665166af590089d8" >MprOff</a></td><td><td>entityLength</td><td>
Original content length before range subsetting.
</td>
+ <tr><td class="param"><a class="ref" href="#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" >cchar</a> *</td><td><td>errorDocument</td><td>
+Error document to render.
+</td>
<tr><td class="param">char *</td><td><td>etag</td><td>
Unique identifier tag.
</td>
View
37 doc/api/httpBare.html
@@ -124,7 +124,7 @@
<tr class="apiDef"><td class="apiType"><a href="#group___http_stage" class="ref">HttpStage*</a></td><td><a href="#group___http_stage_1gab1e3174087a5e78598b66abe7ac5887e" class="nameRef">httpCreateFilter</a>(<a href="#group___http" class="ref">Http</a> *http, <a href="mprBare.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="mprBare.html#group___mpr_module" class="ref">MprModule</a> *module)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a filter stage.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___http_stage" class="ref">HttpStage*</a></td><td><a href="#group___http_stage_1ga238f5fb9f76203fdcb07fd6227ae383f" class="nameRef">httpCreateHandler</a>(<a href="#group___http" class="ref">Http</a> *http, <a href="mprBare.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="mprBare.html#group___mpr_module" class="ref">MprModule</a> *module)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a request handler stage.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___http_packet" class="ref">HttpPacket*</a></td><td><a href="#group___http_packet_1ga24b80ddbcd324b10ac430c4465823190" class="nameRef">httpCreateHeaderPacket</a>()</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a response header packet.</td></tr>
-<tr class="apiDef"><td class="apiType"><a href="#group___http_host" class="ref">HttpHost*</a></td><td><a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="nameRef">httpCreateHost</a>(<a href="mprBare.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *home)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a host.</td></tr>
+<tr class="apiDef"><td class="apiType"><a href="#group___http_host" class="ref">HttpHost*</a></td><td><a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="nameRef">httpCreateHost</a>()</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a host.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___http_route" class="ref">HttpRoute*</a></td><td><a href="#group___http_route_1ga4190cb538d908637fa3c7ea17384f1fa" class="nameRef">httpCreateInheritedRoute</a>(<a href="#group___http_route" class="ref">HttpRoute</a> *route)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a route inherited from a parent route.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___http_limits" class="ref">HttpLimits*</a></td><td><a href="#group___http_limits_1gaf6da4fb1c160ebf9ae4e5fbafcdd583c" class="nameRef">httpCreateLimits</a>(int serverSide)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a new limits object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___http_packet" class="ref">HttpPacket*</a></td><td><a href="#group___http_packet_1ga736f27036a2f3752bc3aa5580f75eef7" class="nameRef">httpCreatePacket</a>(<a href="mprBare.html#mpr_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a data packet.</td></tr>
@@ -3783,7 +3783,7 @@
<dl><dt><b>Description</b>:</dt><dd>A Host object represents a logical host. Several logical hosts may share a single HttpEndpoint.</dd></dl>
<dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
<dl><dt>Fields:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">HttpEndpoint *</td><td><td>defaultEndpoint</td><td>
@@ -3845,7 +3845,7 @@
</table></dd></dl>
<dl><dt>Returns:</dt><dd>&quot;Zero&quot; if the route can be added.</dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<a name="group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b"></a>
@@ -3864,23 +3864,19 @@
</table></dd></dl>
<dl><dt>Returns:</dt><dd>The new HttpHost object.</dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
-<a name="group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb"></a>
+<a name="group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b"></a>
<div class="api">
<div class="prototype">
<a href="#group___http_host" class="ref">HttpHost</a> *
httpCreateHost
-(<a href="mprBare.html#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *home)
+()
</div>
<div class="apiDetail">
<p>Create a host.</p>
<dl><dt><b>Description</b>:</dt><dd>Create a new host object. The host is added to the Http service&apos;s list of hosts.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">home</td><td>directory for the host&apos;s configuration files.</td>
- </table></dd></dl>
<dl><dt>Returns:</dt><dd>The new HttpHost object.</dd></dl>
<dl><dt>See Also:</dt><dd>
<a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
@@ -3897,7 +3893,7 @@
<p>Get the default host defined via httpSetDefaultHost.</p>
<dl><dt>Returns:</dt><dd>The defaul thost object.</dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<a name="group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa"></a>
@@ -3914,7 +3910,7 @@
<tr><td class="param">host</td><td>HttpHost object.</td>
</table></dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<a name="group___http_host_1gacba7af49f198c1ac13e6cadd2673956f"></a>
@@ -3931,7 +3927,7 @@
<tr><td class="param">host</td><td>Host to define as the default host.</td>
</table></dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<a name="group___http_host_1gae8d3b5ebddb6c740c738befee3c78efb"></a>
@@ -3950,7 +3946,7 @@
<tr><td class="param">route</td><td>Route to define as the default.</td>
</table></dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<a name="group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad"></a>
@@ -3971,7 +3967,7 @@
</table></dd></dl>
<dl><dt>Returns:</dt><dd>&quot;Zero&quot; if the route can be added.</dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<a name="group___http_host_1ga446cc7ba87875c92e544e035a404f33f"></a>
@@ -3991,7 +3987,7 @@
</table></dd></dl>
<dl><dt>Returns:</dt><dd>Zero if the route can be added.</dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<a name="group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581"></a>
@@ -4010,7 +4006,7 @@
<tr><td class="param">protocol</td><td>Set to either HTTP/1.0 or HTTP/1.1.</td>
</table></dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a></dd></dl>
</div>
</div>
<a name="group___http_host_1ga2302c34632a1b72ec759533ee9d7ad10"></a>
@@ -4029,7 +4025,7 @@
<tr><td class="param">root</td><td>Directory path for the host server root.</td>
</table></dd></dl>
<dl><dt>See Also:</dt><dd>
- <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga45276b2bd047354e6fcaf9e279cc35cb" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
+ <a href="#group___http_host" class="ref">HttpHost</a>, <a href="#group___http_host_1gadcbb2c44a2ae32546fbdcccbfec64c0a" class="ref">httpAddRoute</a>, <a href="#group___http_host_1ga1fbea76e46959e0f9fd0c8f38090cb8b" class="ref">httpCloneHost</a>, <a href="#group___http_host_1ga3e6e98147b766aeff4cbfebe8146998b" class="ref">httpCreateHost</a>, <a href="#group___http_host_1gaaaa414cbf0f8cacd73ce305927b78efa" class="ref">httpResetRoutes</a>, <a href="#group___http_host_1ga9c33731fd3222d8eed376feeb3b115ad" class="ref">httpSetHostIpAddr</a>, <a href="#group___http_host_1ga446cc7ba87875c92e544e035a404f33f" class="ref">httpSetHostName</a>, <a href="#group___http_host_1ga0f04d9504cb2005ef7f0f4ba2d653581" class="ref">httpSetHostProtocol</a></dd></dl>
</div>
</div>
<h1>HttpLimits</h1>
@@ -4492,7 +4488,7 @@
Low water mark for flow control.
</td>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" external="mpr.dtags">ssize</a></td><td><td>max</td><td>
-Maxiumum queue size.
+Advisory maxiumum queue size.
</td>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" external="mpr.dtags">cchar</a> *</td><td><td>name</td><td>
Queue name for debugging.
@@ -8066,6 +8062,9 @@
<tr><td class="param"><a class="ref" href="#mpr_8h_1aa6887458d0a070b3665166af590089d8" external="mpr.dtags">MprOff</a></td><td><td>entityLength</td><td>
Original content length before range subsetting.
</td>
+ <tr><td class="param"><a class="ref" href="#mpr_8h_1a0f128c3e0c83721af0220c00554e9c4e" external="mpr.dtags">cchar</a> *</td><td><td>errorDocument</td><td>
+Error document to render.
+</td>
<tr><td class="param">char *</td><td><td>etag</td><td>
Unique identifier tag.
</td>
View
2 doc/api/httpBare.tags
1 addition, 1 deletion not shown because the diff is too large. Please use a local Git client to view these changes.
View
2 doc/api/mpr.html
@@ -8839,7 +8839,7 @@
</div>
<div class="apiDetail">
<p>Listen on a server socket for incoming connections.</p>
- <dl><dt><b>Description</b>:</dt><dd>Open a server socket and listen for client connections.</dd></dl>
+ <dl><dt><b>Description</b>:</dt><dd>Open a server socket and listen for client connections. If ip is null, then this will listen on both IPv6 and IPv4.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">sp</td><td>Socket object returned via <a class="ref" href="#group___mpr_socket_1ga0ef02d313ec268eae6038a5af0ee5cc4">mprCreateSocket</a></td>
View
2 doc/api/mprBare.html
@@ -8787,7 +8787,7 @@
</div>
<div class="apiDetail">
<p>Listen on a server socket for incoming connections.</p>
- <dl><dt><b>Description</b>:</dt><dd>Open a server socket and listen for client connections.</dd></dl>
+ <dl><dt><b>Description</b>:</dt><dd>Open a server socket and listen for client connections. If ip is null, then this will listen on both IPv6 and IPv4.</dd></dl>
<dl><dt>Parameters:</dt><dd>
<table class="parameters" title="Parameters">
<tr><td class="param">sp</td><td>Socket object returned via <a class="ref" href="#group___mpr_socket_1ga0ef02d313ec268eae6038a5af0ee5cc4">mprCreateSocket</a></td>
View
2 doc/api/mprBare.tags
1 addition, 1 deletion not shown because the diff is too large. Please use a local Git client to view these changes.
View
773 projects/appweb-macosx-xcode.xcodeproj/project.pbxproj
368 additions, 405 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
5 src/deps/http/http.h
@@ -95,7 +95,7 @@ struct HttpWebSocket;
#define HTTP_WSS_PING_PERIOD (30 * 1000)
#else
/*
- Tune for speed
+ Tune for speed and scale
*/
#define HTTP_BUFSIZE (32 * 1024)
#define HTTP_MAX_CACHE_ITEM (1024 * 1024)
@@ -1009,7 +1009,7 @@ typedef struct HttpQueue {
struct HttpQueue *nextQ; /**< Downstream queue for next stage */
HttpPacket *first; /**< First packet in queue (singly linked) */
struct HttpConn *conn; /**< Connection owning this queue */
- ssize max; /**< Maxiumum queue size */
+ ssize max; /**< Advisory maxiumum queue size */
ssize low; /**< Low water mark for flow control */
ssize packetSize; /**< Maximum acceptable packet size */
HttpPacket *last; /**< Last packet in queue (tail pointer) */
@@ -5293,7 +5293,6 @@ PUBLIC HttpHost *httpCloneHost(HttpHost *parent);
/**
Create a host
@description Create a new host object. The host is added to the Http service's list of hosts.
- @param home directory for the host's configuration files.
@return The new HttpHost object.
@ingroup HttpHost
*/
View
152 src/deps/http/httpLib.c
@@ -2293,15 +2293,24 @@ PUBLIC void httpConnTimeout(HttpConn *conn)
(conn->started + limits->requestParseTimeout) < now) {
httpError(conn, HTTP_CODE_REQUEST_TIMEOUT, "Exceeded parse headers timeout of %Ld sec",
limits->requestParseTimeout / 1000);
+ if (conn->rx) {
+ LOG(2, " State %d, uri %s", conn->state, conn->rx->uri);
+ }
} else {
if ((conn->lastActivity + limits->inactivityTimeout) < now) {
if (conn->state > HTTP_STATE_BEGIN) {
httpError(conn, HTTP_CODE_REQUEST_TIMEOUT,
"Exceeded inactivity timeout of %Ld sec", limits->inactivityTimeout / 1000);
+ if (conn->rx) {
+ LOG(2, " State %d, uri %s", conn->state, conn->rx->uri);
+ }
}
} else if ((conn->started + limits->requestTimeout) < now) {
httpError(conn, HTTP_CODE_REQUEST_TIMEOUT, "Exceeded timeout %d sec", limits->requestTimeout / 1000);
+ if (conn->rx) {
+ LOG(2, " State %d, uri %s", conn->state, conn->rx->uri);
+ }
}
}
}
@@ -5588,26 +5597,17 @@ static void netOutgoingService(HttpQueue *q)
httpFinalizeConnector(conn);
break;
- } else if (written == 0) {
- /* Socket full, wait for an I/O event */
- httpSocketBlocked(conn);
- break;
-
} else if (written > 0) {
tx->bytesWritten += written;
freeNetPackets(q, written);
adjustNetVec(q, written);
}
}
- LOG(5, "Net connector wrote %d, written so far %Ld, q->count %d/%d", written, tx->bytesWritten, q->count, q->max);
- if (q->ioCount == 0) {
- if ((q->flags & HTTP_QUEUE_EOF)) {
- assure(conn->writeq->count == 0);
- assure(conn->tx->finalizedOutput);
- httpFinalizeConnector(conn);
- } else {
- HTTP_NOTIFY(conn, HTTP_EVENT_WRITABLE, 0);
- }
+ if (q->first && q->first->flags & HTTP_PACKET_END) {
+ httpFinalizeConnector(conn);
+ } else {
+ httpSocketBlocked(conn);
+ HTTP_NOTIFY(conn, HTTP_EVENT_WRITABLE, 0);
}
}
@@ -5635,13 +5635,6 @@ static MprOff buildNetVec(HttpQueue *q)
conn->keepAliveCount = 0;
}
httpWriteHeaders(q, packet);
-
- } else if (packet->flags & HTTP_PACKET_END) {
- assure(conn->tx->finalizedOutput);
- q->flags |= HTTP_QUEUE_EOF;
- if (packet->prefix == NULL) {
- break;
- }
}
if (q->ioIndex >= (HTTP_MAX_IOVEC - 2)) {
break;
@@ -5696,14 +5689,17 @@ static void addPacketForNet(HttpQueue *q, HttpPacket *packet)
static void freeNetPackets(HttpQueue *q, ssize bytes)
{
- HttpPacket *packet;
- ssize len;
+ HttpPacket *packet;
+ ssize len;
assure(q->count >= 0);
- assure(bytes >= 0);
+ assure(bytes > 0);
- while (bytes > 0 && (packet = q->first) != 0) {
+ while ((packet = q->first) != 0) {
if (packet->prefix) {
+ /*
+ Note: the end packet may have the final chunk trailer in its prefix
+ */
len = mprGetBufLength(packet->prefix);
len = min(len, bytes);
mprAdjustBufStart(packet->prefix, len);
@@ -5721,12 +5717,16 @@ static void freeNetPackets(HttpQueue *q, ssize bytes)
q->count -= len;
assure(q->count >= 0);
}
- if (packet->content == 0 || mprGetBufLength(packet->content) == 0) {
- /*
- This will remove the packet from the queue and will re-enable upstream disabled queues.
- */
+ /*
+ Must not consume the END packet
+ */
+ if (httpGetPacketLength(packet) == 0 && !(packet->flags & HTTP_PACKET_END)) {
+ /* Consume the packet here */
httpGetPacket(q);
}
+ if (bytes == 0) {
+ break;
+ }
}
}
@@ -6652,6 +6652,13 @@ PUBLIC void httpCreateTxPipeline(HttpConn *conn, HttpRoute *route)
q = httpCreateQueue(conn, stage, HTTP_QUEUE_TX, q);
}
conn->connectorq = tx->queue[HTTP_QUEUE_TX]->prevQ;
+
+ /*
+ Double the connector max hi-water mark. This optimization permits connectors to accept packets without
+ unnecesary flow control.
+ */
+ conn->connectorq->max *= 2;
+
pairQueues(conn);
/*
@@ -7460,11 +7467,17 @@ PUBLIC bool httpWillNextQueueAcceptPacket(HttpQueue *q, HttpPacket *packet)
}
size = httpGetPacketLength(packet);
assure(size <= nextQ->packetSize);
- if ((size + nextQ->count) <= nextQ->max) {
+ /*
+ Packet size is now acceptable. Accept the packet if the queue is mostly empty (< low) or if the
+ packet will fit entirely under the max or if the queue.
+ NOTE: queue maximums are advisory. We choose to potentially overflow the max here to optimize the case where
+ the queue may have say one byte and a max size packet would overflow by 1.
+ */
+ if (nextQ->count < nextQ->low || (size + nextQ->count) <= nextQ->max) {
return 1;
}
/*
- The downstream queue is full, so disable the queue and mark the downstream queue as full and service
+ The downstream queue cannot accept this packet, so disable queue and mark the downstream queue as full and service
*/
httpSuspendQueue(q);
if (!(nextQ->flags & HTTP_QUEUE_SUSPENDED)) {
@@ -12278,9 +12291,8 @@ static void processCompletion(HttpConn *conn)
}
assure(conn->state == HTTP_STATE_FINALIZED);
httpSetState(conn, HTTP_STATE_COMPLETE);
-
if (tx->errorDocument && !conn->connError && !smatch(tx->errorDocument, rx->uri)) {
- mprLog(2, "Create error document %s for status %d from %s and retry", tx->errorDocument, tx->status, rx->uri);
+ mprLog(2, " ErrorDoc %s for %d from %s", tx->errorDocument, tx->status, rx->uri);
createErrorRequest(conn);
}
}
@@ -13039,53 +13051,35 @@ PUBLIC void httpSendOutgoingService(HttpQueue *q)
return;
}
}
+ if (q->ioIndex == 0) {
+ buildSendVec(q);
+ }
/*
- Loop doing non-blocking I/O until blocked or all the packets received are written.
+ No need to loop around as send file tries to write as much of the file as possible.
+ If not eof, will always have the socket blocked.
*/
- while (1) {
- /*
- Rebuild the iovector only when the past vector has been completely written. Simplifies the logic quite a bit.
- */
- if (q->ioIndex == 0 && buildSendVec(q) <= 0) {
- break;
- }
- file = q->ioFile ? tx->file : 0;
- written = mprSendFileToSocket(conn->sock, file, q->ioPos, q->ioCount, q->iovec, q->ioIndex, NULL, 0);
- if (written < 0) {
- errCode = mprGetError();
- if (errCode == EAGAIN || errCode == EWOULDBLOCK) {
- /* Socket is full. Wait for an I/O event */
- httpSocketBlocked(conn);
- break;
- }
+ file = q->ioFile ? tx->file : 0;
+ written = mprSendFileToSocket(conn->sock, file, q->ioPos, q->ioCount, q->iovec, q->ioIndex, NULL, 0);
+ if (written < 0) {
+ errCode = mprGetError();
+ if (errCode != EAGAIN && errCode != EWOULDBLOCK) {
if (errCode != EPIPE && errCode != ECONNRESET && errCode != ENOTCONN) {
httpError(conn, HTTP_ABORT | HTTP_CODE_COMMS_ERROR, "SendFileToSocket failed, errCode %d", errCode);
} else {
httpDisconnect(conn);
}
httpFinalizeConnector(conn);
- break;
-
- } else if (written == 0) {
- /* Socket is full. Wait for an I/O event */
- httpSocketBlocked(conn);
- break;
-
- } else if (written > 0) {
- tx->bytesWritten += written;
- adjustPacketData(q, written);
- adjustSendVec(q, written);
}
+ } else if (written > 0) {
+ tx->bytesWritten += written;
+ adjustPacketData(q, written);
+ adjustSendVec(q, written);
}
- mprLog(8, "Send connector ioCount %d, wrote %Ld, written so far %Ld, sending file %d, q->count %d/%d",
- q->ioCount, written, tx->bytesWritten, q->ioFile, q->count, q->max);
- if (q->ioCount == 0) {
- if ((q->flags & HTTP_QUEUE_EOF)) {
- assure(conn->tx->finalizedOutput);
- httpFinalizeConnector(conn);
- } else {
- HTTP_NOTIFY(conn, HTTP_EVENT_WRITABLE, 0);
- }
+ if ((q->flags & HTTP_QUEUE_EOF)) {
+ httpFinalizeConnector(conn);
+ } else {
+ httpSocketBlocked(conn);
+ HTTP_NOTIFY(conn, HTTP_EVENT_WRITABLE, 0);
}
}
@@ -13112,14 +13106,9 @@ static MprOff buildSendVec(HttpQueue *q)
for (packet = q->first; packet; packet = packet->next) {
if (packet->flags & HTTP_PACKET_HEADER) {
httpWriteHeaders(q, packet);
-
- } else if (httpGetPacketLength(packet) == 0 && packet->esize == 0) {
- q->flags |= HTTP_QUEUE_EOF;
- if (packet->prefix == NULL) {
- break;
- }
}
if (q->ioFile || q->ioIndex >= (HTTP_MAX_IOVEC - 2)) {
+ /* Only one file entry allowed */
break;
}
addPacketForSend(q, packet);
@@ -13211,8 +13200,8 @@ static void adjustPacketData(HttpQueue *q, MprOff bytes)
bytes -= len;
assure(packet->esize >= 0);
assure(bytes == 0);
- if (packet->esize > 0) {
- break;
+ if (packet->esize) {
+ break;
}
} else if ((len = httpGetPacketLength(packet)) > 0) {
len = (ssize) min(len, bytes);
@@ -13221,13 +13210,12 @@ static void adjustPacketData(HttpQueue *q, MprOff bytes)
q->count -= len;
assure(q->count >= 0);
}
+ if (packet->flags & HTTP_PACKET_HEADER) {
+ q->flags |= HTTP_QUEUE_EOF;
+ }
if (httpGetPacketLength(packet) == 0) {
httpGetPacket(q);
}
- assure(bytes >= 0);
- if (bytes == 0 && (q->first == NULL || !(q->first->flags & HTTP_PACKET_END))) {
- break;
- }
}
}
View
1 src/esp/esp.c
@@ -507,6 +507,7 @@ static void initialize()
app->currentDir = mprGetCurrentPath();
app->libDir = mprGetAppDir();
app->wwwDir = mprJoinPath(app->libDir, "esp-www");
+ httpCreate(HTTP_SERVER_SIDE);
}
View
26 src/modules/cgiHandler.c
@@ -20,6 +20,7 @@ typedef struct Cgi {
HttpQueue *writeq; /**< Queue to write to the CGI */
HttpQueue *readq; /**< Queue to read from the CGI */
HttpPacket *headers; /**< CGI response headers */
+ char *location; /**< Redirection location */
int seenHeader; /**< Parsed response header from CGI */
} Cgi;
@@ -96,6 +97,7 @@ static void manageCgi(Cgi *cgi, int flags)
mprMark(cgi->readq);
mprMark(cgi->cmd);
mprMark(cgi->headers);
+ mprMark(cgi->location);
} else {
if (cgi->cmd) {
/* Just for safety */
@@ -380,16 +382,19 @@ static void cgiCallback(MprCmd *cmd, int channel, void *data)
/* Child death notification */
break;
}
- httpServiceQueues(conn);
- LOG(7, "AFTER SERVICE state %d, error %d, complete %d", conn->state, conn->error, cmd->complete);
-
- if (cmd->complete) {
+ if (cgi->location) {
+ httpRedirect(conn, conn->tx->status, cgi->location);
+ }
+ if (cmd->complete || cgi->location) {
+ cgi->location = 0;
httpFinalize(conn);
+ httpServiceQueues(conn);
httpPumpRequest(conn, NULL);
/* WARNING: this will complete this request and prep for the next */
httpPostEvent(conn);
return;
}
+ httpServiceQueues(conn);
if (channel >= 0 && conn->state <= HTTP_STATE_FINALIZED) {
httpEnableConnEvents(conn);
mprLog(6, "CGI: ENABLE CONN: cgiCallback mask %x", conn->sock->handler ? conn->sock->handler->desiredMask : 0);
@@ -398,6 +403,11 @@ static void cgiCallback(MprCmd *cmd, int channel, void *data)
mprLog(6, "CGI: %s CGI: cgiCallback. Conn->writeq %d", suspended ? "DISABLE" : "ENABLE", conn->writeq->count);
assure(!suspended || conn->tx->writeBlocked);
mprEnableCmdOutputEvents(cmd, !suspended);
+
+ if (conn->state == HTTP_STATE_FINALIZED) {
+ httpPumpRequest(conn, NULL);
+ /* WARNING: the request may be completed here */
+ }
}
@@ -484,13 +494,12 @@ static bool parseCgiHeaders(Cgi *cgi, HttpPacket *packet)
HttpConn *conn;
HttpTx *tx;
MprBuf *buf;
- char *endHeaders, *headers, *key, *value, *location;
+ char *endHeaders, *headers, *key, *value;
ssize blen;
int len;
conn = cgi->conn;
tx = conn->tx;
- location = 0;
value = 0;
buf = packet->content;
headers = mprGetBufStart(buf);
@@ -546,7 +555,7 @@ static bool parseCgiHeaders(Cgi *cgi, HttpPacket *packet)
key = slower(key);
if (strcmp(key, "location") == 0) {
- location = value;
+ cgi->location = value;
} else if (strcmp(key, "status") == 0) {
httpSetStatus(conn, atoi(value));
@@ -567,12 +576,15 @@ static bool parseCgiHeaders(Cgi *cgi, HttpPacket *packet)
}
buf->start = endHeaders;
}
+#if UNUSED
if (location) {
httpRedirect(conn, tx->status, location);
if (conn->state == HTTP_STATE_FINALIZED) {
httpPumpRequest(conn, NULL);
+ /* WARNING: the request may be completed here */
}
}
+#endif
return 1;
}
View
2 src/server/appweb.conf
@@ -423,7 +423,7 @@ LimitWorkers 10
# Minimum number of worker threads. Pre-start and always preserve this
# number of workers threads.
#
-# MinWorkers 4
+# MinWorkers 5
#
# Memory allocation error policy. This defines what Appweb will do if
View
1 test/app/controllers/cache.c
@@ -23,7 +23,6 @@ static void big() {
for (i = 0; i < 1000; i++) {
render("Line: %05d %s", i, "aaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbccccccccccccccccccddddddd<br/>\r\n");
}
- // render("{ when: %Ld, uri: '%s', query: '%s' }\r\n", mprGetTicks(), getUri(), getQuery());
}
static void huge() {

0 comments on commit 80ee749

Please sign in to comment.
Something went wrong with that request. Please try again.