Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tinyhttp/content-disposition

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinyhttp/content-disposition - npm Package Compare versions

Comparing version 2.0.10 to 2.1.0

4

package.json
{
"name": "@tinyhttp/content-disposition",
"description": "content-disposition rewrite in TypeScript",
"version": "2.0.10",
"version": "2.1.0",
"license": "MIT",

@@ -17,3 +17,3 @@ "homepage": "https://tinyhttp.v1rtl.site",

"engines": {
"node": ">=12.4.0"
"node": ">=12.20.0"
},

@@ -20,0 +20,0 @@ "type": "module",

# @tinyhttp/content-disposition
> [`content-disposition`](https://github.com/jshttp/content-disposition) rewrite in TypeScript.
> [`content-disposition`](https://github.com/jshttp/content-disposition) rewrite
> in TypeScript.

@@ -21,5 +22,5 @@ Create and parse HTTP `Content-Disposition` header

Create an attachment `Content-Disposition` header value using the given file name,
if supplied. The `filename` is optional and if no file name is desired, but you
want to specify `options`, set `filename` to `undefined`.
Create an attachment `Content-Disposition` header value using the given file
name, if supplied. The `filename` is optional and if no file name is desired,
but you want to specify `options`, set `filename` to `undefined`.

@@ -30,5 +31,5 @@ ```js

**note** HTTP headers are of the ISO-8859-1 character set. If you are writing this
header through a means different from `setHeader` in Node.js, you'll want to specify
the `'binary'` encoding in Node.js.
**note** HTTP headers are of the ISO-8859-1 character set. If you are writing
this header through a means different from `setHeader` in Node.js, you'll want
to specify the `'binary'` encoding in Node.js.

@@ -42,4 +43,4 @@ #### Options

If the `filename` option is outside ISO-8859-1, then the file name is actually
stored in a supplemental field for clients that support Unicode file names and
a ISO-8859-1 version of the file name is automatically generated.
stored in a supplemental field for clients that support Unicode file names and a
ISO-8859-1 version of the file name is automatically generated.

@@ -53,7 +54,8 @@ This specifies the ISO-8859-1 file name to override the automatic generation or

Unicode version (unless the file name is already ISO-8859-1).
- `true` will enable automatic generation if the file name is outside ISO-8859-1.
- `true` will enable automatic generation if the file name is outside
ISO-8859-1.
If the `filename` option is ISO-8859-1 and this option is specified and has a
different value, then the `filename` option is encoded in the extended field
and this set as the fallback field, even though they are both ISO-8859-1.
different value, then the `filename` option is encoded in the extended field and
this set as the fallback field, even though they are both ISO-8859-1.

@@ -75,10 +77,11 @@ ##### `type`

("Unicode") parameters by decoding them and providing them under the standard
parameter name. This will return an object with the following properties (examples
are shown for the string `'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'`):
parameter name. This will return an object with the following properties
(examples are shown for the string
`'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'`):
- `type`: The disposition type (always lower case). Example: `'attachment'`
- `parameters`: An object of the parameters in the disposition (name of parameter
always lower case and extended versions replace non-extended versions). Example:
`{filename: "€ rates.txt"}`
- `parameters`: An object of the parameters in the disposition (name of
parameter always lower case and extended versions replace non-extended
versions). Example: `{filename: "€ rates.txt"}`

@@ -95,4 +98,4 @@ ## Example

import destroy from 'destroy'
import fs from 'fs'
import { createServer } from 'http'
import fs from 'node:fs'
import { createServer } from 'node:http'
import onFinished from 'on-finished'

@@ -99,0 +102,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc