aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod
diff options
context:
space:
mode:
Diffstat (limited to 'libpathod')
-rw-r--r--libpathod/rparse.py8
-rw-r--r--libpathod/templates/docs_lang.html4
-rw-r--r--libpathod/templates/docs_pathod.html8
3 files changed, 10 insertions, 10 deletions
diff --git a/libpathod/rparse.py b/libpathod/rparse.py
index 8b19a1d2..ab657974 100644
--- a/libpathod/rparse.py
+++ b/libpathod/rparse.py
@@ -413,20 +413,20 @@ class Method:
class PauseAt:
- def __init__(self, seconds, offset):
- self.seconds, self.offset = seconds, offset
+ def __init__(self, offset, seconds):
+ self.offset, self.seconds = offset, seconds
@classmethod
def expr(klass):
e = pp.Literal("p").suppress()
+ e += Offset
+ e += pp.Literal(",").suppress()
e += pp.MatchFirst(
[
v_integer,
pp.Literal("f")
]
)
- e += pp.Literal(",").suppress()
- e += Offset
return e.setParseAction(lambda x: klass(*x))
def accept(self, settings, r):
diff --git a/libpathod/templates/docs_lang.html b/libpathod/templates/docs_lang.html
index 4325ef39..9999282d 100644
--- a/libpathod/templates/docs_lang.html
+++ b/libpathod/templates/docs_lang.html
@@ -66,7 +66,7 @@
</tr>
<tr>
- <td> pSECONDS,<a href="#offsetspec">OFFSET</a> </td>
+ <td> p<a href="#offsetspec">OFFSET</a>,SECONDS </td>
<td>
Pause for SECONDS seconds after OFFSET bytes. SECONDS can
be an integer or "f" to pause forever.
@@ -135,7 +135,7 @@
</tr>
<tr>
- <td> pSECONDS,<a href="#offsetspec">OFFSET</a> </td>
+ <td> p<a href="#offsetspec">OFFSET</a>,SECONDS </td>
<td>
Pause for SECONDS seconds after OFFSET bytes. SECONDS can
be an integer or "f" to pause forever.
diff --git a/libpathod/templates/docs_pathod.html b/libpathod/templates/docs_pathod.html
index 977642c6..1c8f01c7 100644
--- a/libpathod/templates/docs_pathod.html
+++ b/libpathod/templates/docs_pathod.html
@@ -92,19 +92,19 @@ various other goodies. Try it by visiting the server root:</p>
for 120 seconds after sending 50 bytes (counted from the first byte of the HTTP
response):</p>
- <pre class="example">200:b@1m:p120,50</pre>
+ <pre class="example">200:b@1m:p50,120</pre>
<p>If that's not long enough, we can tell pathod to hang forever:</p>
- <pre class="example">200:b@1m:p120,f</pre>
+ <pre class="example">200:b@1m:pf,120</pre>
<p>Or to send all data, and then hang without disconnecting:</p>
- <pre class="example">200:b@1m:p120,a</pre>
+ <pre class="example">200:b@1m:pa,120</pre>
<p>We can also ask pathod to hang randomly:</p>
- <pre class="example">200:b@1m:pr,a</pre>
+ <pre class="example">200:b@1m:pr,10</pre>
<p>There is a similar mechanism for dropping connections mid-response. So, we can
tell pathod to disconnect after sending 50 bytes:</p>