mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-13 06:04:31 +02:00
http.lua: allow override of hard-coded 5 max redirects
This commit is contained in:
@ -135,7 +135,8 @@ http.<b>request{</b><br>
|
||||
[step = <i>LTN12 pump step</i>,]<br>
|
||||
[proxy = <i>string</i>,]<br>
|
||||
[redirect = <i>boolean</i>,]<br>
|
||||
[create = <i>function</i>]<br>
|
||||
[create = <i>function</i>,]<br>
|
||||
[maxredirects = <i>number</i>]<br>
|
||||
<b>}</b>
|
||||
</p>
|
||||
|
||||
@ -185,6 +186,7 @@ Defaults to the LTN12 <tt>pump.step</tt> function.
|
||||
function from automatically following 301 or 302 server redirect messages;
|
||||
<li><tt>create</tt>: An optional function to be used instead of
|
||||
<a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created.
|
||||
<li><tt>maxredirects</tt>: An optional number specifying the maximum number of redirects to follow. Defaults to <tt>5</tt> if not specified. A boolean <tt>false</tt> value means no maximum (unlimited).
|
||||
</ul>
|
||||
|
||||
<p class=return>
|
||||
@ -324,8 +326,8 @@ r, c = http.request {
|
||||
</p>
|
||||
<p>
|
||||
<small>
|
||||
Last modified by Diego Nehab on <br>
|
||||
Thu Apr 20 00:25:26 EDT 2006
|
||||
Last modified by Eric Westbrook on <br>
|
||||
Sat Feb 23 19:09:42 UTC 2019
|
||||
</small>
|
||||
</p>
|
||||
</center>
|
||||
|
Reference in New Issue
Block a user