aboutsummaryrefslogtreecommitdiffstats
path: root/spec/scansion/http_upload.scs
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-01-26 14:53:24 +0100
committerKim Alvefur <zash@zash.se>2021-01-26 14:53:24 +0100
commitba59af458c7499a38824dd5753bddd6de284850b (patch)
tree8b1ca72b7b981f8bdbaad7dda80e72948edb7c0f /spec/scansion/http_upload.scs
parent71267fd1116e47c3cbacdc13bf35de986960fbb3 (diff)
downloadprosody-ba59af458c7499a38824dd5753bddd6de284850b.tar.gz
prosody-ba59af458c7499a38824dd5753bddd6de284850b.zip
mod_http_file_share: Add file size limit (default 10M)
Diffstat (limited to 'spec/scansion/http_upload.scs')
-rw-r--r--spec/scansion/http_upload.scs16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/scansion/http_upload.scs b/spec/scansion/http_upload.scs
index ed4f1bca..72552946 100644
--- a/spec/scansion/http_upload.scs
+++ b/spec/scansion/http_upload.scs
@@ -22,6 +22,22 @@ Romeo receives:
</iq>
Romeo sends:
+ <iq to='upload.localhost' type='get' id='46ca64f3-518e-42bd-8e2f-4ab2f6d2224f' xml:lang='en'>
+ <request content-type='text/plain' filename='toolarge.dat' xmlns='urn:xmpp:http:upload:0' size='10000000000'/>
+ </iq>
+
+Romeo receives:
+ <iq id='46ca64f3-518e-42bd-8e2f-4ab2f6d2224f' from='upload.localhost' type='error'>
+ <error type='modify'>
+ <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
+ <text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>File too large</text>
+ <file-too-large xmlns='urn:xmpp:http:upload:0'>
+ <max-file-size>10000000</max-file-size>
+ </file-too-large>
+ </error>
+ </iq>
+
+Romeo sends:
<iq to='upload.localhost' type='get' id='ac56d83f-a627-4732-8399-60492d1210b6' xml:lang='en'>
<request content-type='text/plain' filename='invalid/filename.dat' xmlns='urn:xmpp:http:upload:0' size='1000'/>
</iq>