Skip to content
Myr

feat: add deprecation warnings for redirect arguments undefined (#6405)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sebastian Beltran · committed by GitHub · parent 7a93112 · Browse files · 2 files+14 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+14 added−0 removed

  • other:+14 added−0 removed

2 files+14 added−0 removed

modified:lib/response.js+13 added
12 unmodified lines
13 */1415var contentDisposition = require('content-disposition');16var createError = require('http-errors')17var deprecate = require('depd')('express');18var encodeUrl = require('encodeurl');19var escapeHtml = require('escape-html');20var http = require('node:http');21var onFinished = require('on-finished');
804 unmodified lines
826 status = arguments[0]827 address = arguments[1]828 }829830 if (!address) {831 deprecate('Provide a url argument');832 }833834 if (typeof address !== 'string') {835 deprecate('Url must be a string');836 }837838 if (typeof status !== 'number') {839 deprecate('Status must be a number');840 }841842 // Set location header843 address = this.location(address).get('Location');844845 // Support text/{plain,html} by default
208 unmodified lines
modified:package.json+1 added