Add request body limit

This commit is contained in:
Chocobozzz
2019-02-21 17:19:16 +01:00
parent 539d3f4faa
commit bfe2ef6bfa
5 changed files with 93 additions and 5 deletions

View File

@@ -3,6 +3,10 @@ import { buildAbsoluteFixturePath, root } from '../miscs/miscs'
import { isAbsolute, join } from 'path'
import { parse } from 'url'
function get4KFileUrl () {
return 'https://download.cpy.re/peertube/4k_file.txt'
}
function makeRawRequest (url: string, statusCodeExpected?: number, range?: string) {
const { host, protocol, pathname } = parse(url)
@@ -166,6 +170,7 @@ function updateAvatarRequest (options: {
// ---------------------------------------------------------------------------
export {
get4KFileUrl,
makeHTMLRequest,
makeGetRequest,
makeUploadRequest,