diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-21 17:19:16 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-21 17:19:16 +0100 |
commit | bfe2ef6bfae03444a232883fc7c449206cf3bee4 (patch) | |
tree | d1ee39e1700f6918c2799c5537da771bda468890 /shared/utils/requests | |
parent | 539d3f4faa1c1d2dbc68bb3ac0ba3549252e0f2a (diff) | |
download | PeerTube-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.ts | 5 |
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' | |||
3 | import { isAbsolute, join } from 'path' | 3 | import { isAbsolute, join } from 'path' |
4 | import { parse } from 'url' | 4 | import { parse } from 'url' |
5 | 5 | ||
6 | function get4KFileUrl () { | ||
7 | return 'https://download.cpy.re/peertube/4k_file.txt' | ||
8 | } | ||
9 | |||
6 | function makeRawRequest (url: string, statusCodeExpected?: number, range?: string) { | 10 | function 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 | ||
168 | export { | 172 | export { |
173 | get4KFileUrl, | ||
169 | makeHTMLRequest, | 174 | makeHTMLRequest, |
170 | makeGetRequest, | 175 | makeGetRequest, |
171 | makeUploadRequest, | 176 | makeUploadRequest, |