aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/utils/requests
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-02-21 17:19:16 +0100
committerChocobozzz <me@florianbigard.com>2019-02-21 17:19:16 +0100
commitbfe2ef6bfae03444a232883fc7c449206cf3bee4 (patch)
treed1ee39e1700f6918c2799c5537da771bda468890 /shared/utils/requests
parent539d3f4faa1c1d2dbc68bb3ac0ba3549252e0f2a (diff)
downloadPeerTube-bfe2ef6bfae03444a232883fc7c449206cf3bee4.tar.gz
PeerTube-bfe2ef6bfae03444a232883fc7c449206cf3bee4.tar.zst
PeerTube-bfe2ef6bfae03444a232883fc7c449206cf3bee4.zip
Add request body limit
Diffstat (limited to 'shared/utils/requests')
-rw-r--r--shared/utils/requests/requests.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/shared/utils/requests/requests.ts b/shared/utils/requests/requests.ts
index 6b59e24fc..dc2d4abe5 100644
--- a/shared/utils/requests/requests.ts
+++ b/shared/utils/requests/requests.ts
@@ -3,6 +3,10 @@ import { buildAbsoluteFixturePath, root } from '../miscs/miscs'
3import { isAbsolute, join } from 'path' 3import { isAbsolute, join } from 'path'
4import { parse } from 'url' 4import { parse } from 'url'
5 5
6function get4KFileUrl () {
7 return 'https://download.cpy.re/peertube/4k_file.txt'
8}
9
6function makeRawRequest (url: string, statusCodeExpected?: number, range?: string) { 10function makeRawRequest (url: string, statusCodeExpected?: number, range?: string) {
7 const { host, protocol, pathname } = parse(url) 11 const { host, protocol, pathname } = parse(url)
8 12
@@ -166,6 +170,7 @@ function updateAvatarRequest (options: {
166// --------------------------------------------------------------------------- 170// ---------------------------------------------------------------------------
167 171
168export { 172export {
173 get4KFileUrl,
169 makeHTMLRequest, 174 makeHTMLRequest,
170 makeGetRequest, 175 makeGetRequest,
171 makeUploadRequest, 176 makeUploadRequest,