Express Server erstellt
This commit is contained in:
		
							
								
								
									
										436
									
								
								express-server/node_modules/send/HISTORY.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										436
									
								
								express-server/node_modules/send/HISTORY.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,436 @@
 | 
			
		||||
0.15.6 / 2017-09-22
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * deps: debug@2.6.9
 | 
			
		||||
  * perf: improve `If-Match` token parsing
 | 
			
		||||
 | 
			
		||||
0.15.5 / 2017-09-20
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * deps: etag@~1.8.1
 | 
			
		||||
    - perf: replace regular expression with substring
 | 
			
		||||
  * deps: fresh@0.5.2
 | 
			
		||||
    - Fix handling of modified headers with invalid dates
 | 
			
		||||
    - perf: improve ETag match loop
 | 
			
		||||
    - perf: improve `If-None-Match` token parsing
 | 
			
		||||
 | 
			
		||||
0.15.4 / 2017-08-05
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * deps: debug@2.6.8
 | 
			
		||||
  * deps: depd@~1.1.1
 | 
			
		||||
    - Remove unnecessary `Buffer` loading
 | 
			
		||||
  * deps: http-errors@~1.6.2
 | 
			
		||||
    - deps: depd@1.1.1
 | 
			
		||||
 | 
			
		||||
0.15.3 / 2017-05-16
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * deps: debug@2.6.7
 | 
			
		||||
    - deps: ms@2.0.0
 | 
			
		||||
  * deps: ms@2.0.0
 | 
			
		||||
 | 
			
		||||
0.15.2 / 2017-04-26
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * deps: debug@2.6.4
 | 
			
		||||
    - Fix `DEBUG_MAX_ARRAY_LENGTH`
 | 
			
		||||
    - deps: ms@0.7.3
 | 
			
		||||
  * deps: ms@1.0.0
 | 
			
		||||
 | 
			
		||||
0.15.1 / 2017-03-04
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * Fix issue when `Date.parse` does not return `NaN` on invalid date
 | 
			
		||||
  * Fix strict violation in broken environments
 | 
			
		||||
 | 
			
		||||
0.15.0 / 2017-02-25
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * Support `If-Match` and `If-Unmodified-Since` headers
 | 
			
		||||
  * Add `res` and `path` arguments to `directory` event
 | 
			
		||||
  * Remove usage of `res._headers` private field
 | 
			
		||||
    - Improves compatibility with Node.js 8 nightly
 | 
			
		||||
  * Send complete HTML document in redirect & error responses
 | 
			
		||||
  * Set default CSP header in redirect & error responses
 | 
			
		||||
  * Use `res.getHeaderNames()` when available
 | 
			
		||||
  * Use `res.headersSent` when available
 | 
			
		||||
  * deps: debug@2.6.1
 | 
			
		||||
    - Allow colors in workers
 | 
			
		||||
    - Deprecated `DEBUG_FD` environment variable set to `3` or higher
 | 
			
		||||
    - Fix error when running under React Native
 | 
			
		||||
    - Use same color for same namespace
 | 
			
		||||
    - deps: ms@0.7.2
 | 
			
		||||
  * deps: etag@~1.8.0
 | 
			
		||||
  * deps: fresh@0.5.0
 | 
			
		||||
    - Fix false detection of `no-cache` request directive
 | 
			
		||||
    - Fix incorrect result when `If-None-Match` has both `*` and ETags
 | 
			
		||||
    - Fix weak `ETag` matching to match spec
 | 
			
		||||
    - perf: delay reading header values until needed
 | 
			
		||||
    - perf: enable strict mode
 | 
			
		||||
    - perf: hoist regular expressions
 | 
			
		||||
    - perf: remove duplicate conditional
 | 
			
		||||
    - perf: remove unnecessary boolean coercions
 | 
			
		||||
    - perf: skip checking modified time if ETag check failed
 | 
			
		||||
    - perf: skip parsing `If-None-Match` when no `ETag` header
 | 
			
		||||
    - perf: use `Date.parse` instead of `new Date`
 | 
			
		||||
  * deps: http-errors@~1.6.1
 | 
			
		||||
    - Make `message` property enumerable for `HttpError`s
 | 
			
		||||
    - deps: setprototypeof@1.0.3
 | 
			
		||||
 | 
			
		||||
0.14.2 / 2017-01-23
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * deps: http-errors@~1.5.1
 | 
			
		||||
    - deps: inherits@2.0.3
 | 
			
		||||
    - deps: setprototypeof@1.0.2
 | 
			
		||||
    - deps: statuses@'>= 1.3.1 < 2'
 | 
			
		||||
  * deps: ms@0.7.2
 | 
			
		||||
  * deps: statuses@~1.3.1
 | 
			
		||||
 | 
			
		||||
0.14.1 / 2016-06-09
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * Fix redirect error when `path` contains raw non-URL characters
 | 
			
		||||
  * Fix redirect when `path` starts with multiple forward slashes
 | 
			
		||||
 | 
			
		||||
0.14.0 / 2016-06-06
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * Add `acceptRanges` option
 | 
			
		||||
  * Add `cacheControl` option
 | 
			
		||||
  * Attempt to combine multiple ranges into single range
 | 
			
		||||
  * Correctly inherit from `Stream` class
 | 
			
		||||
  * Fix `Content-Range` header in 416 responses when using `start`/`end` options
 | 
			
		||||
  * Fix `Content-Range` header missing from default 416 responses
 | 
			
		||||
  * Ignore non-byte `Range` headers
 | 
			
		||||
  * deps: http-errors@~1.5.0
 | 
			
		||||
    - Add `HttpError` export, for `err instanceof createError.HttpError`
 | 
			
		||||
    - Support new code `421 Misdirected Request`
 | 
			
		||||
    - Use `setprototypeof` module to replace `__proto__` setting
 | 
			
		||||
    - deps: inherits@2.0.1
 | 
			
		||||
    - deps: statuses@'>= 1.3.0 < 2'
 | 
			
		||||
    - perf: enable strict mode
 | 
			
		||||
  * deps: range-parser@~1.2.0
 | 
			
		||||
    - Fix incorrectly returning -1 when there is at least one valid range
 | 
			
		||||
    - perf: remove internal function
 | 
			
		||||
  * deps: statuses@~1.3.0
 | 
			
		||||
    - Add `421 Misdirected Request`
 | 
			
		||||
    - perf: enable strict mode
 | 
			
		||||
  * perf: remove argument reassignment
 | 
			
		||||
 | 
			
		||||
0.13.2 / 2016-03-05
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * Fix invalid `Content-Type` header when `send.mime.default_type` unset
 | 
			
		||||
 | 
			
		||||
0.13.1 / 2016-01-16
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * deps: depd@~1.1.0
 | 
			
		||||
    - Support web browser loading
 | 
			
		||||
    - perf: enable strict mode
 | 
			
		||||
  * deps: destroy@~1.0.4
 | 
			
		||||
    - perf: enable strict mode
 | 
			
		||||
  * deps: escape-html@~1.0.3
 | 
			
		||||
    - perf: enable strict mode
 | 
			
		||||
    - perf: optimize string replacement
 | 
			
		||||
    - perf: use faster string coercion
 | 
			
		||||
  * deps: range-parser@~1.0.3
 | 
			
		||||
    - perf: enable strict mode
 | 
			
		||||
 | 
			
		||||
0.13.0 / 2015-06-16
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * Allow Node.js HTTP server to set `Date` response header
 | 
			
		||||
  * Fix incorrectly removing `Content-Location` on 304 response
 | 
			
		||||
  * Improve the default redirect response headers
 | 
			
		||||
  * Send appropriate headers on default error response
 | 
			
		||||
  * Use `http-errors` for standard emitted errors
 | 
			
		||||
  * Use `statuses` instead of `http` module for status messages
 | 
			
		||||
  * deps: escape-html@1.0.2
 | 
			
		||||
  * deps: etag@~1.7.0
 | 
			
		||||
    - Improve stat performance by removing hashing
 | 
			
		||||
  * deps: fresh@0.3.0
 | 
			
		||||
    - Add weak `ETag` matching support
 | 
			
		||||
  * deps: on-finished@~2.3.0
 | 
			
		||||
    - Add defined behavior for HTTP `CONNECT` requests
 | 
			
		||||
    - Add defined behavior for HTTP `Upgrade` requests
 | 
			
		||||
    - deps: ee-first@1.1.1
 | 
			
		||||
  * perf: enable strict mode
 | 
			
		||||
  * perf: remove unnecessary array allocations
 | 
			
		||||
 | 
			
		||||
0.12.3 / 2015-05-13
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * deps: debug@~2.2.0
 | 
			
		||||
    - deps: ms@0.7.1
 | 
			
		||||
  * deps: depd@~1.0.1
 | 
			
		||||
  * deps: etag@~1.6.0
 | 
			
		||||
   - Improve support for JXcore
 | 
			
		||||
   - Support "fake" stats objects in environments without `fs`
 | 
			
		||||
  * deps: ms@0.7.1
 | 
			
		||||
    - Prevent extraordinarily long inputs
 | 
			
		||||
  * deps: on-finished@~2.2.1
 | 
			
		||||
 | 
			
		||||
0.12.2 / 2015-03-13
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * Throw errors early for invalid `extensions` or `index` options
 | 
			
		||||
  * deps: debug@~2.1.3
 | 
			
		||||
    - Fix high intensity foreground color for bold
 | 
			
		||||
    - deps: ms@0.7.0
 | 
			
		||||
 | 
			
		||||
0.12.1 / 2015-02-17
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * Fix regression sending zero-length files
 | 
			
		||||
 | 
			
		||||
0.12.0 / 2015-02-16
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * Always read the stat size from the file
 | 
			
		||||
  * Fix mutating passed-in `options`
 | 
			
		||||
  * deps: mime@1.3.4
 | 
			
		||||
 | 
			
		||||
0.11.1 / 2015-01-20
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * Fix `root` path disclosure
 | 
			
		||||
 | 
			
		||||
0.11.0 / 2015-01-05
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * deps: debug@~2.1.1
 | 
			
		||||
  * deps: etag@~1.5.1
 | 
			
		||||
    - deps: crc@3.2.1
 | 
			
		||||
  * deps: ms@0.7.0
 | 
			
		||||
    - Add `milliseconds`
 | 
			
		||||
    - Add `msecs`
 | 
			
		||||
    - Add `secs`
 | 
			
		||||
    - Add `mins`
 | 
			
		||||
    - Add `hrs`
 | 
			
		||||
    - Add `yrs`
 | 
			
		||||
  * deps: on-finished@~2.2.0
 | 
			
		||||
 | 
			
		||||
0.10.1 / 2014-10-22
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * deps: on-finished@~2.1.1
 | 
			
		||||
    - Fix handling of pipelined requests
 | 
			
		||||
 | 
			
		||||
0.10.0 / 2014-10-15
 | 
			
		||||
===================
 | 
			
		||||
 | 
			
		||||
  * deps: debug@~2.1.0
 | 
			
		||||
    - Implement `DEBUG_FD` env variable support
 | 
			
		||||
  * deps: depd@~1.0.0
 | 
			
		||||
  * deps: etag@~1.5.0
 | 
			
		||||
    - Improve string performance
 | 
			
		||||
    - Slightly improve speed for weak ETags over 1KB
 | 
			
		||||
 | 
			
		||||
0.9.3 / 2014-09-24
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * deps: etag@~1.4.0
 | 
			
		||||
    - Support "fake" stats objects
 | 
			
		||||
 | 
			
		||||
0.9.2 / 2014-09-15
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * deps: depd@0.4.5
 | 
			
		||||
  * deps: etag@~1.3.1
 | 
			
		||||
  * deps: range-parser@~1.0.2
 | 
			
		||||
 | 
			
		||||
0.9.1 / 2014-09-07
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * deps: fresh@0.2.4
 | 
			
		||||
 | 
			
		||||
0.9.0 / 2014-09-07
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Add `lastModified` option
 | 
			
		||||
  * Use `etag` to generate `ETag` header
 | 
			
		||||
  * deps: debug@~2.0.0
 | 
			
		||||
 | 
			
		||||
0.8.5 / 2014-09-04
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Fix malicious path detection for empty string path
 | 
			
		||||
 | 
			
		||||
0.8.4 / 2014-09-04
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Fix a path traversal issue when using `root`
 | 
			
		||||
 | 
			
		||||
0.8.3 / 2014-08-16
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * deps: destroy@1.0.3
 | 
			
		||||
    - renamed from dethroy
 | 
			
		||||
  * deps: on-finished@2.1.0
 | 
			
		||||
 | 
			
		||||
0.8.2 / 2014-08-14
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Work around `fd` leak in Node.js 0.10 for `fs.ReadStream`
 | 
			
		||||
  * deps: dethroy@1.0.2
 | 
			
		||||
 | 
			
		||||
0.8.1 / 2014-08-05
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Fix `extensions` behavior when file already has extension
 | 
			
		||||
 | 
			
		||||
0.8.0 / 2014-08-05
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Add `extensions` option
 | 
			
		||||
 | 
			
		||||
0.7.4 / 2014-08-04
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Fix serving index files without root dir
 | 
			
		||||
 | 
			
		||||
0.7.3 / 2014-07-29
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Fix incorrect 403 on Windows and Node.js 0.11
 | 
			
		||||
 | 
			
		||||
0.7.2 / 2014-07-27
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * deps: depd@0.4.4
 | 
			
		||||
    - Work-around v8 generating empty stack traces
 | 
			
		||||
 | 
			
		||||
0.7.1 / 2014-07-26
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
 * deps: depd@0.4.3
 | 
			
		||||
   - Fix exception when global `Error.stackTraceLimit` is too low
 | 
			
		||||
 | 
			
		||||
0.7.0 / 2014-07-20
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
 * Deprecate `hidden` option; use `dotfiles` option
 | 
			
		||||
 * Add `dotfiles` option
 | 
			
		||||
 * deps: debug@1.0.4
 | 
			
		||||
 * deps: depd@0.4.2
 | 
			
		||||
   - Add `TRACE_DEPRECATION` environment variable
 | 
			
		||||
   - Remove non-standard grey color from color output
 | 
			
		||||
   - Support `--no-deprecation` argument
 | 
			
		||||
   - Support `--trace-deprecation` argument
 | 
			
		||||
 | 
			
		||||
0.6.0 / 2014-07-11
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
 * Deprecate `from` option; use `root` option
 | 
			
		||||
 * Deprecate `send.etag()` -- use `etag` in `options`
 | 
			
		||||
 * Deprecate `send.hidden()` -- use `hidden` in `options`
 | 
			
		||||
 * Deprecate `send.index()` -- use `index` in `options`
 | 
			
		||||
 * Deprecate `send.maxage()` -- use `maxAge` in `options`
 | 
			
		||||
 * Deprecate `send.root()` -- use `root` in `options`
 | 
			
		||||
 * Cap `maxAge` value to 1 year
 | 
			
		||||
 * deps: debug@1.0.3
 | 
			
		||||
   - Add support for multiple wildcards in namespaces
 | 
			
		||||
 | 
			
		||||
0.5.0 / 2014-06-28
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
 * Accept string for `maxAge` (converted by `ms`)
 | 
			
		||||
 * Add `headers` event
 | 
			
		||||
 * Include link in default redirect response
 | 
			
		||||
 * Use `EventEmitter.listenerCount` to count listeners
 | 
			
		||||
 | 
			
		||||
0.4.3 / 2014-06-11
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
 * Do not throw un-catchable error on file open race condition
 | 
			
		||||
 * Use `escape-html` for HTML escaping
 | 
			
		||||
 * deps: debug@1.0.2
 | 
			
		||||
   - fix some debugging output colors on node.js 0.8
 | 
			
		||||
 * deps: finished@1.2.2
 | 
			
		||||
 * deps: fresh@0.2.2
 | 
			
		||||
 | 
			
		||||
0.4.2 / 2014-06-09
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
 * fix "event emitter leak" warnings
 | 
			
		||||
 * deps: debug@1.0.1
 | 
			
		||||
 * deps: finished@1.2.1
 | 
			
		||||
 | 
			
		||||
0.4.1 / 2014-06-02
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
 * Send `max-age` in `Cache-Control` in correct format
 | 
			
		||||
 | 
			
		||||
0.4.0 / 2014-05-27
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
 * Calculate ETag with md5 for reduced collisions
 | 
			
		||||
 * Fix wrong behavior when index file matches directory
 | 
			
		||||
 * Ignore stream errors after request ends
 | 
			
		||||
   - Goodbye `EBADF, read`
 | 
			
		||||
 * Skip directories in index file search
 | 
			
		||||
 * deps: debug@0.8.1
 | 
			
		||||
 | 
			
		||||
0.3.0 / 2014-04-24
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
 * Fix sending files with dots without root set
 | 
			
		||||
 * Coerce option types
 | 
			
		||||
 * Accept API options in options object
 | 
			
		||||
 * Set etags to "weak"
 | 
			
		||||
 * Include file path in etag
 | 
			
		||||
 * Make "Can't set headers after they are sent." catchable
 | 
			
		||||
 * Send full entity-body for multi range requests
 | 
			
		||||
 * Default directory access to 403 when index disabled
 | 
			
		||||
 * Support multiple index paths
 | 
			
		||||
 * Support "If-Range" header
 | 
			
		||||
 * Control whether to generate etags
 | 
			
		||||
 * deps: mime@1.2.11
 | 
			
		||||
 | 
			
		||||
0.2.0 / 2014-01-29
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
 * update range-parser and fresh
 | 
			
		||||
 | 
			
		||||
0.1.4 / 2013-08-11 
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
 * update fresh
 | 
			
		||||
 | 
			
		||||
0.1.3 / 2013-07-08 
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
 * Revert "Fix fd leak"
 | 
			
		||||
 | 
			
		||||
0.1.2 / 2013-07-03 
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
 * Fix fd leak
 | 
			
		||||
 | 
			
		||||
0.1.0 / 2012-08-25 
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * add options parameter to send() that is passed to fs.createReadStream() [kanongil]
 | 
			
		||||
 | 
			
		||||
0.0.4 / 2012-08-16 
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * allow custom "Accept-Ranges" definition
 | 
			
		||||
 | 
			
		||||
0.0.3 / 2012-07-16 
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * fix normalization of the root directory. Closes #3
 | 
			
		||||
 | 
			
		||||
0.0.2 / 2012-07-09 
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * add passing of req explicitly for now (YUCK)
 | 
			
		||||
 | 
			
		||||
0.0.1 / 2010-01-03
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Initial release
 | 
			
		||||
							
								
								
									
										23
									
								
								express-server/node_modules/send/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								express-server/node_modules/send/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
(The MIT License)
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2012 TJ Holowaychuk
 | 
			
		||||
Copyright (c) 2014-2016 Douglas Christopher Wilson
 | 
			
		||||
 | 
			
		||||
Permission is hereby granted, free of charge, to any person obtaining
 | 
			
		||||
a copy of this software and associated documentation files (the
 | 
			
		||||
'Software'), to deal in the Software without restriction, including
 | 
			
		||||
without limitation the rights to use, copy, modify, merge, publish,
 | 
			
		||||
distribute, sublicense, and/or sell copies of the Software, and to
 | 
			
		||||
permit persons to whom the Software is furnished to do so, subject to
 | 
			
		||||
the following conditions:
 | 
			
		||||
 | 
			
		||||
The above copyright notice and this permission notice shall be
 | 
			
		||||
included in all copies or substantial portions of the Software.
 | 
			
		||||
 | 
			
		||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
 | 
			
		||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 | 
			
		||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 | 
			
		||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 | 
			
		||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 | 
			
		||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 | 
			
		||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
							
								
								
									
										301
									
								
								express-server/node_modules/send/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										301
									
								
								express-server/node_modules/send/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,301 @@
 | 
			
		||||
# send
 | 
			
		||||
 | 
			
		||||
[![NPM Version][npm-image]][npm-url]
 | 
			
		||||
[![NPM Downloads][downloads-image]][downloads-url]
 | 
			
		||||
[![Linux Build][travis-image]][travis-url]
 | 
			
		||||
[![Windows Build][appveyor-image]][appveyor-url]
 | 
			
		||||
[![Test Coverage][coveralls-image]][coveralls-url]
 | 
			
		||||
[![Gratipay][gratipay-image]][gratipay-url]
 | 
			
		||||
 | 
			
		||||
Send is a library for streaming files from the file system as a http response
 | 
			
		||||
supporting partial responses (Ranges), conditional-GET negotiation (If-Match,
 | 
			
		||||
If-Unmodified-Since, If-None-Match, If-Modified-Since), high test coverage,
 | 
			
		||||
and granular events which may be leveraged to take appropriate actions in your
 | 
			
		||||
application or framework.
 | 
			
		||||
 | 
			
		||||
Looking to serve up entire folders mapped to URLs? Try [serve-static](https://www.npmjs.org/package/serve-static).
 | 
			
		||||
 | 
			
		||||
## Installation
 | 
			
		||||
 | 
			
		||||
This is a [Node.js](https://nodejs.org/en/) module available through the
 | 
			
		||||
[npm registry](https://www.npmjs.com/). Installation is done using the
 | 
			
		||||
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ npm install send
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## API
 | 
			
		||||
 | 
			
		||||
<!-- eslint-disable no-unused-vars -->
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
var send = require('send')
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### send(req, path, [options])
 | 
			
		||||
 | 
			
		||||
Create a new `SendStream` for the given path to send to a `res`. The `req` is
 | 
			
		||||
the Node.js HTTP request and the `path` is a urlencoded path to send (urlencoded,
 | 
			
		||||
not the actual file-system path).
 | 
			
		||||
 | 
			
		||||
#### Options
 | 
			
		||||
 | 
			
		||||
##### acceptRanges
 | 
			
		||||
 | 
			
		||||
Enable or disable accepting ranged requests, defaults to true.
 | 
			
		||||
Disabling this will not send `Accept-Ranges` and ignore the contents
 | 
			
		||||
of the `Range` request header.
 | 
			
		||||
 | 
			
		||||
##### cacheControl
 | 
			
		||||
 | 
			
		||||
Enable or disable setting `Cache-Control` response header, defaults to
 | 
			
		||||
true. Disabling this will ignore the `maxAge` option.
 | 
			
		||||
 | 
			
		||||
##### dotfiles
 | 
			
		||||
 | 
			
		||||
Set how "dotfiles" are treated when encountered. A dotfile is a file
 | 
			
		||||
or directory that begins with a dot ("."). Note this check is done on
 | 
			
		||||
the path itself without checking if the path actually exists on the
 | 
			
		||||
disk. If `root` is specified, only the dotfiles above the root are
 | 
			
		||||
checked (i.e. the root itself can be within a dotfile when when set
 | 
			
		||||
to "deny").
 | 
			
		||||
 | 
			
		||||
  - `'allow'` No special treatment for dotfiles.
 | 
			
		||||
  - `'deny'` Send a 403 for any request for a dotfile.
 | 
			
		||||
  - `'ignore'` Pretend like the dotfile does not exist and 404.
 | 
			
		||||
 | 
			
		||||
The default value is _similar_ to `'ignore'`, with the exception that
 | 
			
		||||
this default will not ignore the files within a directory that begins
 | 
			
		||||
with a dot, for backward-compatibility.
 | 
			
		||||
 | 
			
		||||
##### end
 | 
			
		||||
 | 
			
		||||
Byte offset at which the stream ends, defaults to the length of the file
 | 
			
		||||
minus 1. The end is inclusive in the stream, meaning `end: 3` will include
 | 
			
		||||
the 4th byte in the stream.
 | 
			
		||||
 | 
			
		||||
##### etag
 | 
			
		||||
 | 
			
		||||
Enable or disable etag generation, defaults to true.
 | 
			
		||||
 | 
			
		||||
##### extensions
 | 
			
		||||
 | 
			
		||||
If a given file doesn't exist, try appending one of the given extensions,
 | 
			
		||||
in the given order. By default, this is disabled (set to `false`). An
 | 
			
		||||
example value that will serve extension-less HTML files: `['html', 'htm']`.
 | 
			
		||||
This is skipped if the requested file already has an extension.
 | 
			
		||||
 | 
			
		||||
##### index
 | 
			
		||||
 | 
			
		||||
By default send supports "index.html" files, to disable this
 | 
			
		||||
set `false` or to supply a new index pass a string or an array
 | 
			
		||||
in preferred order.
 | 
			
		||||
 | 
			
		||||
##### lastModified
 | 
			
		||||
 | 
			
		||||
Enable or disable `Last-Modified` header, defaults to true. Uses the file
 | 
			
		||||
system's last modified value.
 | 
			
		||||
 | 
			
		||||
##### maxAge
 | 
			
		||||
 | 
			
		||||
Provide a max-age in milliseconds for http caching, defaults to 0.
 | 
			
		||||
This can also be a string accepted by the
 | 
			
		||||
[ms](https://www.npmjs.org/package/ms#readme) module.
 | 
			
		||||
 | 
			
		||||
##### root
 | 
			
		||||
 | 
			
		||||
Serve files relative to `path`.
 | 
			
		||||
 | 
			
		||||
##### start
 | 
			
		||||
 | 
			
		||||
Byte offset at which the stream starts, defaults to 0. The start is inclusive,
 | 
			
		||||
meaning `start: 2` will include the 3rd byte in the stream.
 | 
			
		||||
 | 
			
		||||
#### Events
 | 
			
		||||
 | 
			
		||||
The `SendStream` is an event emitter and will emit the following events:
 | 
			
		||||
 | 
			
		||||
  - `error` an error occurred `(err)`
 | 
			
		||||
  - `directory` a directory was requested `(res, path)`
 | 
			
		||||
  - `file` a file was requested `(path, stat)`
 | 
			
		||||
  - `headers` the headers are about to be set on a file `(res, path, stat)`
 | 
			
		||||
  - `stream` file streaming has started `(stream)`
 | 
			
		||||
  - `end` streaming has completed
 | 
			
		||||
 | 
			
		||||
#### .pipe
 | 
			
		||||
 | 
			
		||||
The `pipe` method is used to pipe the response into the Node.js HTTP response
 | 
			
		||||
object, typically `send(req, path, options).pipe(res)`.
 | 
			
		||||
 | 
			
		||||
### .mime
 | 
			
		||||
 | 
			
		||||
The `mime` export is the global instance of of the
 | 
			
		||||
[`mime` npm module](https://www.npmjs.com/package/mime).
 | 
			
		||||
 | 
			
		||||
This is used to configure the MIME types that are associated with file extensions
 | 
			
		||||
as well as other options for how to resolve the MIME type of a file (like the
 | 
			
		||||
default type to use for an unknown file extension).
 | 
			
		||||
 | 
			
		||||
## Error-handling
 | 
			
		||||
 | 
			
		||||
By default when no `error` listeners are present an automatic response will be
 | 
			
		||||
made, otherwise you have full control over the response, aka you may show a 5xx
 | 
			
		||||
page etc.
 | 
			
		||||
 | 
			
		||||
## Caching
 | 
			
		||||
 | 
			
		||||
It does _not_ perform internal caching, you should use a reverse proxy cache
 | 
			
		||||
such as Varnish for this, or those fancy things called CDNs. If your
 | 
			
		||||
application is small enough that it would benefit from single-node memory
 | 
			
		||||
caching, it's small enough that it does not need caching at all ;).
 | 
			
		||||
 | 
			
		||||
## Debugging
 | 
			
		||||
 | 
			
		||||
To enable `debug()` instrumentation output export __DEBUG__:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
$ DEBUG=send node app
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Running tests
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
$ npm install
 | 
			
		||||
$ npm test
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Examples
 | 
			
		||||
 | 
			
		||||
### Small example
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
var http = require('http')
 | 
			
		||||
var parseUrl = require('parseurl')
 | 
			
		||||
var send = require('send')
 | 
			
		||||
 | 
			
		||||
var server = http.createServer(function onRequest (req, res) {
 | 
			
		||||
  send(req, parseUrl(req).pathname).pipe(res)
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
server.listen(3000)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Custom file types
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
var http = require('http')
 | 
			
		||||
var parseUrl = require('parseurl')
 | 
			
		||||
var send = require('send')
 | 
			
		||||
 | 
			
		||||
// Default unknown types to text/plain
 | 
			
		||||
send.mime.default_type = 'text/plain'
 | 
			
		||||
 | 
			
		||||
// Add a custom type
 | 
			
		||||
send.mime.define({
 | 
			
		||||
  'application/x-my-type': ['x-mt', 'x-mtt']
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
var server = http.createServer(function onRequest (req, res) {
 | 
			
		||||
  send(req, parseUrl(req).pathname).pipe(res)
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
server.listen(3000)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Custom directory index view
 | 
			
		||||
 | 
			
		||||
This is a example of serving up a structure of directories with a
 | 
			
		||||
custom function to render a listing of a directory.
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
var http = require('http')
 | 
			
		||||
var fs = require('fs')
 | 
			
		||||
var parseUrl = require('parseurl')
 | 
			
		||||
var send = require('send')
 | 
			
		||||
 | 
			
		||||
// Transfer arbitrary files from within /www/example.com/public/*
 | 
			
		||||
// with a custom handler for directory listing
 | 
			
		||||
var server = http.createServer(function onRequest (req, res) {
 | 
			
		||||
  send(req, parseUrl(req).pathname, {index: false, root: '/www/example.com/public'})
 | 
			
		||||
  .once('directory', directory)
 | 
			
		||||
  .pipe(res)
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
server.listen(3000)
 | 
			
		||||
 | 
			
		||||
// Custom directory handler
 | 
			
		||||
function directory (res, path) {
 | 
			
		||||
  var stream = this
 | 
			
		||||
 | 
			
		||||
  // redirect to trailing slash for consistent url
 | 
			
		||||
  if (!stream.hasTrailingSlash()) {
 | 
			
		||||
    return stream.redirect(path)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // get directory list
 | 
			
		||||
  fs.readdir(path, function onReaddir (err, list) {
 | 
			
		||||
    if (err) return stream.error(err)
 | 
			
		||||
 | 
			
		||||
    // render an index for the directory
 | 
			
		||||
    res.setHeader('Content-Type', 'text/plain; charset=UTF-8')
 | 
			
		||||
    res.end(list.join('\n') + '\n')
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Serving from a root directory with custom error-handling
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
var http = require('http')
 | 
			
		||||
var parseUrl = require('parseurl')
 | 
			
		||||
var send = require('send')
 | 
			
		||||
 | 
			
		||||
var server = http.createServer(function onRequest (req, res) {
 | 
			
		||||
  // your custom error-handling logic:
 | 
			
		||||
  function error (err) {
 | 
			
		||||
    res.statusCode = err.status || 500
 | 
			
		||||
    res.end(err.message)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // your custom headers
 | 
			
		||||
  function headers (res, path, stat) {
 | 
			
		||||
    // serve all files for download
 | 
			
		||||
    res.setHeader('Content-Disposition', 'attachment')
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // your custom directory handling logic:
 | 
			
		||||
  function redirect () {
 | 
			
		||||
    res.statusCode = 301
 | 
			
		||||
    res.setHeader('Location', req.url + '/')
 | 
			
		||||
    res.end('Redirecting to ' + req.url + '/')
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // transfer arbitrary files from within
 | 
			
		||||
  // /www/example.com/public/*
 | 
			
		||||
  send(req, parseUrl(req).pathname, {root: '/www/example.com/public'})
 | 
			
		||||
  .on('error', error)
 | 
			
		||||
  .on('directory', redirect)
 | 
			
		||||
  .on('headers', headers)
 | 
			
		||||
  .pipe(res)
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
server.listen(3000)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## License
 | 
			
		||||
 | 
			
		||||
[MIT](LICENSE)
 | 
			
		||||
 | 
			
		||||
[npm-image]: https://img.shields.io/npm/v/send.svg
 | 
			
		||||
[npm-url]: https://npmjs.org/package/send
 | 
			
		||||
[travis-image]: https://img.shields.io/travis/pillarjs/send/master.svg?label=linux
 | 
			
		||||
[travis-url]: https://travis-ci.org/pillarjs/send
 | 
			
		||||
[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/send/master.svg?label=windows
 | 
			
		||||
[appveyor-url]: https://ci.appveyor.com/project/dougwilson/send
 | 
			
		||||
[coveralls-image]: https://img.shields.io/coveralls/pillarjs/send/master.svg
 | 
			
		||||
[coveralls-url]: https://coveralls.io/r/pillarjs/send?branch=master
 | 
			
		||||
[downloads-image]: https://img.shields.io/npm/dm/send.svg
 | 
			
		||||
[downloads-url]: https://npmjs.org/package/send
 | 
			
		||||
[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
 | 
			
		||||
[gratipay-url]: https://www.gratipay.com/dougwilson/
 | 
			
		||||
							
								
								
									
										1103
									
								
								express-server/node_modules/send/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1103
									
								
								express-server/node_modules/send/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										55
									
								
								express-server/node_modules/send/node_modules/statuses/HISTORY.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								express-server/node_modules/send/node_modules/statuses/HISTORY.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,55 @@
 | 
			
		||||
1.3.1 / 2016-11-11
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Fix return type in JSDoc
 | 
			
		||||
 | 
			
		||||
1.3.0 / 2016-05-17
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Add `421 Misdirected Request`
 | 
			
		||||
  * perf: enable strict mode
 | 
			
		||||
 | 
			
		||||
1.2.1 / 2015-02-01
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Fix message for status 451
 | 
			
		||||
    - `451 Unavailable For Legal Reasons`
 | 
			
		||||
 | 
			
		||||
1.2.0 / 2014-09-28
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Add `208 Already Repored`
 | 
			
		||||
  * Add `226 IM Used`
 | 
			
		||||
  * Add `306 (Unused)`
 | 
			
		||||
  * Add `415 Unable For Legal Reasons`
 | 
			
		||||
  * Add `508 Loop Detected`
 | 
			
		||||
 | 
			
		||||
1.1.1 / 2014-09-24
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Add missing 308 to `codes.json`
 | 
			
		||||
 | 
			
		||||
1.1.0 / 2014-09-21
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Add `codes.json` for universal support
 | 
			
		||||
 | 
			
		||||
1.0.4 / 2014-08-20
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Package cleanup
 | 
			
		||||
 | 
			
		||||
1.0.3 / 2014-06-08
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Add 308 to `.redirect` category
 | 
			
		||||
 | 
			
		||||
1.0.2 / 2014-03-13
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Add `.retry` category
 | 
			
		||||
 | 
			
		||||
1.0.1 / 2014-03-12
 | 
			
		||||
==================
 | 
			
		||||
 | 
			
		||||
  * Initial release
 | 
			
		||||
							
								
								
									
										23
									
								
								express-server/node_modules/send/node_modules/statuses/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								express-server/node_modules/send/node_modules/statuses/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
 | 
			
		||||
The MIT License (MIT)
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2014 Jonathan Ong me@jongleberry.com
 | 
			
		||||
Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com
 | 
			
		||||
 | 
			
		||||
Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
in the Software without restriction, including without limitation the rights
 | 
			
		||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
furnished to do so, subject to the following conditions:
 | 
			
		||||
 | 
			
		||||
The above copyright notice and this permission notice shall be included in
 | 
			
		||||
all copies or substantial portions of the Software.
 | 
			
		||||
 | 
			
		||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
THE SOFTWARE.
 | 
			
		||||
							
								
								
									
										103
									
								
								express-server/node_modules/send/node_modules/statuses/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										103
									
								
								express-server/node_modules/send/node_modules/statuses/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,103 @@
 | 
			
		||||
# Statuses
 | 
			
		||||
 | 
			
		||||
[![NPM Version][npm-image]][npm-url]
 | 
			
		||||
[![NPM Downloads][downloads-image]][downloads-url]
 | 
			
		||||
[![Node.js Version][node-version-image]][node-version-url]
 | 
			
		||||
[![Build Status][travis-image]][travis-url]
 | 
			
		||||
[![Test Coverage][coveralls-image]][coveralls-url]
 | 
			
		||||
 | 
			
		||||
HTTP status utility for node.
 | 
			
		||||
 | 
			
		||||
## API
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
var status = require('statuses')
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### var code = status(Integer || String)
 | 
			
		||||
 | 
			
		||||
If `Integer` or `String` is a valid HTTP code or status message, then the appropriate `code` will be returned. Otherwise, an error will be thrown.
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
status(403) // => 403
 | 
			
		||||
status('403') // => 403
 | 
			
		||||
status('forbidden') // => 403
 | 
			
		||||
status('Forbidden') // => 403
 | 
			
		||||
status(306) // throws, as it's not supported by node.js
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### status.codes
 | 
			
		||||
 | 
			
		||||
Returns an array of all the status codes as `Integer`s.
 | 
			
		||||
 | 
			
		||||
### var msg = status[code]
 | 
			
		||||
 | 
			
		||||
Map of `code` to `status message`. `undefined` for invalid `code`s.
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
status[404] // => 'Not Found'
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### var code = status[msg]
 | 
			
		||||
 | 
			
		||||
Map of `status message` to `code`. `msg` can either be title-cased or lower-cased. `undefined` for invalid `status message`s.
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
status['not found'] // => 404
 | 
			
		||||
status['Not Found'] // => 404
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### status.redirect[code]
 | 
			
		||||
 | 
			
		||||
Returns `true` if a status code is a valid redirect status.
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
status.redirect[200] // => undefined
 | 
			
		||||
status.redirect[301] // => true
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### status.empty[code]
 | 
			
		||||
 | 
			
		||||
Returns `true` if a status code expects an empty body.
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
status.empty[200] // => undefined
 | 
			
		||||
status.empty[204] // => true
 | 
			
		||||
status.empty[304] // => true
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### status.retry[code]
 | 
			
		||||
 | 
			
		||||
Returns `true` if you should retry the rest.
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
status.retry[501] // => undefined
 | 
			
		||||
status.retry[503] // => true
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Adding Status Codes
 | 
			
		||||
 | 
			
		||||
The status codes are primarily sourced from http://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv.
 | 
			
		||||
Additionally, custom codes are added from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes.
 | 
			
		||||
These are added manually in the `lib/*.json` files.
 | 
			
		||||
If you would like to add a status code, add it to the appropriate JSON file.
 | 
			
		||||
 | 
			
		||||
To rebuild `codes.json`, run the following:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
# update src/iana.json
 | 
			
		||||
npm run fetch
 | 
			
		||||
# build codes.json
 | 
			
		||||
npm run build
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
[npm-image]: https://img.shields.io/npm/v/statuses.svg
 | 
			
		||||
[npm-url]: https://npmjs.org/package/statuses
 | 
			
		||||
[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg
 | 
			
		||||
[node-version-url]: https://nodejs.org/en/download
 | 
			
		||||
[travis-image]: https://img.shields.io/travis/jshttp/statuses.svg
 | 
			
		||||
[travis-url]: https://travis-ci.org/jshttp/statuses
 | 
			
		||||
[coveralls-image]: https://img.shields.io/coveralls/jshttp/statuses.svg
 | 
			
		||||
[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master
 | 
			
		||||
[downloads-image]: https://img.shields.io/npm/dm/statuses.svg
 | 
			
		||||
[downloads-url]: https://npmjs.org/package/statuses
 | 
			
		||||
							
								
								
									
										65
									
								
								express-server/node_modules/send/node_modules/statuses/codes.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								express-server/node_modules/send/node_modules/statuses/codes.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,65 @@
 | 
			
		||||
{
 | 
			
		||||
  "100": "Continue",
 | 
			
		||||
  "101": "Switching Protocols",
 | 
			
		||||
  "102": "Processing",
 | 
			
		||||
  "200": "OK",
 | 
			
		||||
  "201": "Created",
 | 
			
		||||
  "202": "Accepted",
 | 
			
		||||
  "203": "Non-Authoritative Information",
 | 
			
		||||
  "204": "No Content",
 | 
			
		||||
  "205": "Reset Content",
 | 
			
		||||
  "206": "Partial Content",
 | 
			
		||||
  "207": "Multi-Status",
 | 
			
		||||
  "208": "Already Reported",
 | 
			
		||||
  "226": "IM Used",
 | 
			
		||||
  "300": "Multiple Choices",
 | 
			
		||||
  "301": "Moved Permanently",
 | 
			
		||||
  "302": "Found",
 | 
			
		||||
  "303": "See Other",
 | 
			
		||||
  "304": "Not Modified",
 | 
			
		||||
  "305": "Use Proxy",
 | 
			
		||||
  "306": "(Unused)",
 | 
			
		||||
  "307": "Temporary Redirect",
 | 
			
		||||
  "308": "Permanent Redirect",
 | 
			
		||||
  "400": "Bad Request",
 | 
			
		||||
  "401": "Unauthorized",
 | 
			
		||||
  "402": "Payment Required",
 | 
			
		||||
  "403": "Forbidden",
 | 
			
		||||
  "404": "Not Found",
 | 
			
		||||
  "405": "Method Not Allowed",
 | 
			
		||||
  "406": "Not Acceptable",
 | 
			
		||||
  "407": "Proxy Authentication Required",
 | 
			
		||||
  "408": "Request Timeout",
 | 
			
		||||
  "409": "Conflict",
 | 
			
		||||
  "410": "Gone",
 | 
			
		||||
  "411": "Length Required",
 | 
			
		||||
  "412": "Precondition Failed",
 | 
			
		||||
  "413": "Payload Too Large",
 | 
			
		||||
  "414": "URI Too Long",
 | 
			
		||||
  "415": "Unsupported Media Type",
 | 
			
		||||
  "416": "Range Not Satisfiable",
 | 
			
		||||
  "417": "Expectation Failed",
 | 
			
		||||
  "418": "I'm a teapot",
 | 
			
		||||
  "421": "Misdirected Request",
 | 
			
		||||
  "422": "Unprocessable Entity",
 | 
			
		||||
  "423": "Locked",
 | 
			
		||||
  "424": "Failed Dependency",
 | 
			
		||||
  "425": "Unordered Collection",
 | 
			
		||||
  "426": "Upgrade Required",
 | 
			
		||||
  "428": "Precondition Required",
 | 
			
		||||
  "429": "Too Many Requests",
 | 
			
		||||
  "431": "Request Header Fields Too Large",
 | 
			
		||||
  "451": "Unavailable For Legal Reasons",
 | 
			
		||||
  "500": "Internal Server Error",
 | 
			
		||||
  "501": "Not Implemented",
 | 
			
		||||
  "502": "Bad Gateway",
 | 
			
		||||
  "503": "Service Unavailable",
 | 
			
		||||
  "504": "Gateway Timeout",
 | 
			
		||||
  "505": "HTTP Version Not Supported",
 | 
			
		||||
  "506": "Variant Also Negotiates",
 | 
			
		||||
  "507": "Insufficient Storage",
 | 
			
		||||
  "508": "Loop Detected",
 | 
			
		||||
  "509": "Bandwidth Limit Exceeded",
 | 
			
		||||
  "510": "Not Extended",
 | 
			
		||||
  "511": "Network Authentication Required"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										110
									
								
								express-server/node_modules/send/node_modules/statuses/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										110
									
								
								express-server/node_modules/send/node_modules/statuses/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,110 @@
 | 
			
		||||
/*!
 | 
			
		||||
 * statuses
 | 
			
		||||
 * Copyright(c) 2014 Jonathan Ong
 | 
			
		||||
 * Copyright(c) 2016 Douglas Christopher Wilson
 | 
			
		||||
 * MIT Licensed
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
'use strict'
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Module dependencies.
 | 
			
		||||
 * @private
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
var codes = require('./codes.json')
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Module exports.
 | 
			
		||||
 * @public
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
module.exports = status
 | 
			
		||||
 | 
			
		||||
// array of status codes
 | 
			
		||||
status.codes = populateStatusesMap(status, codes)
 | 
			
		||||
 | 
			
		||||
// status codes for redirects
 | 
			
		||||
status.redirect = {
 | 
			
		||||
  300: true,
 | 
			
		||||
  301: true,
 | 
			
		||||
  302: true,
 | 
			
		||||
  303: true,
 | 
			
		||||
  305: true,
 | 
			
		||||
  307: true,
 | 
			
		||||
  308: true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// status codes for empty bodies
 | 
			
		||||
status.empty = {
 | 
			
		||||
  204: true,
 | 
			
		||||
  205: true,
 | 
			
		||||
  304: true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// status codes for when you should retry the request
 | 
			
		||||
status.retry = {
 | 
			
		||||
  502: true,
 | 
			
		||||
  503: true,
 | 
			
		||||
  504: true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Populate the statuses map for given codes.
 | 
			
		||||
 * @private
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
function populateStatusesMap (statuses, codes) {
 | 
			
		||||
  var arr = []
 | 
			
		||||
 | 
			
		||||
  Object.keys(codes).forEach(function forEachCode (code) {
 | 
			
		||||
    var message = codes[code]
 | 
			
		||||
    var status = Number(code)
 | 
			
		||||
 | 
			
		||||
    // Populate properties
 | 
			
		||||
    statuses[status] = message
 | 
			
		||||
    statuses[message] = status
 | 
			
		||||
    statuses[message.toLowerCase()] = status
 | 
			
		||||
 | 
			
		||||
    // Add to array
 | 
			
		||||
    arr.push(status)
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
  return arr
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Get the status code.
 | 
			
		||||
 *
 | 
			
		||||
 * Given a number, this will throw if it is not a known status
 | 
			
		||||
 * code, otherwise the code will be returned. Given a string,
 | 
			
		||||
 * the string will be parsed for a number and return the code
 | 
			
		||||
 * if valid, otherwise will lookup the code assuming this is
 | 
			
		||||
 * the status message.
 | 
			
		||||
 *
 | 
			
		||||
 * @param {string|number} code
 | 
			
		||||
 * @returns {number}
 | 
			
		||||
 * @public
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
function status (code) {
 | 
			
		||||
  if (typeof code === 'number') {
 | 
			
		||||
    if (!status[code]) throw new Error('invalid status code: ' + code)
 | 
			
		||||
    return code
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (typeof code !== 'string') {
 | 
			
		||||
    throw new TypeError('code must be a number or string')
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // '403'
 | 
			
		||||
  var n = parseInt(code, 10)
 | 
			
		||||
  if (!isNaN(n)) {
 | 
			
		||||
    if (!status[n]) throw new Error('invalid status code: ' + n)
 | 
			
		||||
    return n
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  n = status[code.toLowerCase()]
 | 
			
		||||
  if (!n) throw new Error('invalid status message: "' + code + '"')
 | 
			
		||||
  return n
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										83
									
								
								express-server/node_modules/send/node_modules/statuses/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										83
									
								
								express-server/node_modules/send/node_modules/statuses/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,83 @@
 | 
			
		||||
{
 | 
			
		||||
  "_from": "statuses@~1.3.1",
 | 
			
		||||
  "_id": "statuses@1.3.1",
 | 
			
		||||
  "_inBundle": false,
 | 
			
		||||
  "_integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=",
 | 
			
		||||
  "_location": "/send/statuses",
 | 
			
		||||
  "_phantomChildren": {},
 | 
			
		||||
  "_requested": {
 | 
			
		||||
    "type": "range",
 | 
			
		||||
    "registry": true,
 | 
			
		||||
    "raw": "statuses@~1.3.1",
 | 
			
		||||
    "name": "statuses",
 | 
			
		||||
    "escapedName": "statuses",
 | 
			
		||||
    "rawSpec": "~1.3.1",
 | 
			
		||||
    "saveSpec": null,
 | 
			
		||||
    "fetchSpec": "~1.3.1"
 | 
			
		||||
  },
 | 
			
		||||
  "_requiredBy": [
 | 
			
		||||
    "/send"
 | 
			
		||||
  ],
 | 
			
		||||
  "_resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
 | 
			
		||||
  "_shasum": "faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e",
 | 
			
		||||
  "_spec": "statuses@~1.3.1",
 | 
			
		||||
  "_where": "D:\\5CHITM\\Diplomarbeit\\smart-shopper\\express-server\\node_modules\\send",
 | 
			
		||||
  "bugs": {
 | 
			
		||||
    "url": "https://github.com/jshttp/statuses/issues"
 | 
			
		||||
  },
 | 
			
		||||
  "bundleDependencies": false,
 | 
			
		||||
  "contributors": [
 | 
			
		||||
    {
 | 
			
		||||
      "name": "Douglas Christopher Wilson",
 | 
			
		||||
      "email": "doug@somethingdoug.com"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "Jonathan Ong",
 | 
			
		||||
      "email": "me@jongleberry.com",
 | 
			
		||||
      "url": "http://jongleberry.com"
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "deprecated": false,
 | 
			
		||||
  "description": "HTTP status utility",
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "csv-parse": "1.1.7",
 | 
			
		||||
    "eslint": "3.10.0",
 | 
			
		||||
    "eslint-config-standard": "6.2.1",
 | 
			
		||||
    "eslint-plugin-promise": "3.3.2",
 | 
			
		||||
    "eslint-plugin-standard": "2.0.1",
 | 
			
		||||
    "istanbul": "0.4.5",
 | 
			
		||||
    "mocha": "1.21.5",
 | 
			
		||||
    "stream-to-array": "2.3.0"
 | 
			
		||||
  },
 | 
			
		||||
  "engines": {
 | 
			
		||||
    "node": ">= 0.6"
 | 
			
		||||
  },
 | 
			
		||||
  "files": [
 | 
			
		||||
    "HISTORY.md",
 | 
			
		||||
    "index.js",
 | 
			
		||||
    "codes.json",
 | 
			
		||||
    "LICENSE"
 | 
			
		||||
  ],
 | 
			
		||||
  "homepage": "https://github.com/jshttp/statuses#readme",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "http",
 | 
			
		||||
    "status",
 | 
			
		||||
    "code"
 | 
			
		||||
  ],
 | 
			
		||||
  "license": "MIT",
 | 
			
		||||
  "name": "statuses",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
    "url": "git+https://github.com/jshttp/statuses.git"
 | 
			
		||||
  },
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "build": "node scripts/build.js",
 | 
			
		||||
    "fetch": "node scripts/fetch.js",
 | 
			
		||||
    "lint": "eslint .",
 | 
			
		||||
    "test": "mocha --reporter spec --check-leaks --bail test/",
 | 
			
		||||
    "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
 | 
			
		||||
    "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
 | 
			
		||||
    "update": "npm run fetch && npm run build"
 | 
			
		||||
  },
 | 
			
		||||
  "version": "1.3.1"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										104
									
								
								express-server/node_modules/send/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										104
									
								
								express-server/node_modules/send/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,104 @@
 | 
			
		||||
{
 | 
			
		||||
  "_from": "send@0.15.6",
 | 
			
		||||
  "_id": "send@0.15.6",
 | 
			
		||||
  "_inBundle": false,
 | 
			
		||||
  "_integrity": "sha1-IPI6nJJbdiq4JwX+L52yUqzkfjQ=",
 | 
			
		||||
  "_location": "/send",
 | 
			
		||||
  "_phantomChildren": {},
 | 
			
		||||
  "_requested": {
 | 
			
		||||
    "type": "version",
 | 
			
		||||
    "registry": true,
 | 
			
		||||
    "raw": "send@0.15.6",
 | 
			
		||||
    "name": "send",
 | 
			
		||||
    "escapedName": "send",
 | 
			
		||||
    "rawSpec": "0.15.6",
 | 
			
		||||
    "saveSpec": null,
 | 
			
		||||
    "fetchSpec": "0.15.6"
 | 
			
		||||
  },
 | 
			
		||||
  "_requiredBy": [
 | 
			
		||||
    "/express",
 | 
			
		||||
    "/serve-static"
 | 
			
		||||
  ],
 | 
			
		||||
  "_resolved": "https://registry.npmjs.org/send/-/send-0.15.6.tgz",
 | 
			
		||||
  "_shasum": "20f23a9c925b762ab82705fe2f9db252ace47e34",
 | 
			
		||||
  "_spec": "send@0.15.6",
 | 
			
		||||
  "_where": "D:\\5CHITM\\Diplomarbeit\\smart-shopper\\express-server\\node_modules\\express",
 | 
			
		||||
  "author": {
 | 
			
		||||
    "name": "TJ Holowaychuk",
 | 
			
		||||
    "email": "tj@vision-media.ca"
 | 
			
		||||
  },
 | 
			
		||||
  "bugs": {
 | 
			
		||||
    "url": "https://github.com/pillarjs/send/issues"
 | 
			
		||||
  },
 | 
			
		||||
  "bundleDependencies": false,
 | 
			
		||||
  "contributors": [
 | 
			
		||||
    {
 | 
			
		||||
      "name": "Douglas Christopher Wilson",
 | 
			
		||||
      "email": "doug@somethingdoug.com"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "James Wyatt Cready",
 | 
			
		||||
      "email": "jcready@gmail.com"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "Jesús Leganés Combarro",
 | 
			
		||||
      "email": "piranna@gmail.com"
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "debug": "2.6.9",
 | 
			
		||||
    "depd": "~1.1.1",
 | 
			
		||||
    "destroy": "~1.0.4",
 | 
			
		||||
    "encodeurl": "~1.0.1",
 | 
			
		||||
    "escape-html": "~1.0.3",
 | 
			
		||||
    "etag": "~1.8.1",
 | 
			
		||||
    "fresh": "0.5.2",
 | 
			
		||||
    "http-errors": "~1.6.2",
 | 
			
		||||
    "mime": "1.3.4",
 | 
			
		||||
    "ms": "2.0.0",
 | 
			
		||||
    "on-finished": "~2.3.0",
 | 
			
		||||
    "range-parser": "~1.2.0",
 | 
			
		||||
    "statuses": "~1.3.1"
 | 
			
		||||
  },
 | 
			
		||||
  "deprecated": false,
 | 
			
		||||
  "description": "Better streaming static file server with Range and conditional-GET support",
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "after": "0.8.2",
 | 
			
		||||
    "eslint": "3.19.0",
 | 
			
		||||
    "eslint-config-standard": "7.1.0",
 | 
			
		||||
    "eslint-plugin-markdown": "1.0.0-beta.6",
 | 
			
		||||
    "eslint-plugin-promise": "3.5.0",
 | 
			
		||||
    "eslint-plugin-standard": "2.3.1",
 | 
			
		||||
    "istanbul": "0.4.5",
 | 
			
		||||
    "mocha": "2.5.3",
 | 
			
		||||
    "supertest": "1.1.0"
 | 
			
		||||
  },
 | 
			
		||||
  "engines": {
 | 
			
		||||
    "node": ">= 0.8.0"
 | 
			
		||||
  },
 | 
			
		||||
  "files": [
 | 
			
		||||
    "HISTORY.md",
 | 
			
		||||
    "LICENSE",
 | 
			
		||||
    "README.md",
 | 
			
		||||
    "index.js"
 | 
			
		||||
  ],
 | 
			
		||||
  "homepage": "https://github.com/pillarjs/send#readme",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "static",
 | 
			
		||||
    "file",
 | 
			
		||||
    "server"
 | 
			
		||||
  ],
 | 
			
		||||
  "license": "MIT",
 | 
			
		||||
  "name": "send",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
    "url": "git+https://github.com/pillarjs/send.git"
 | 
			
		||||
  },
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "lint": "eslint --plugin markdown --ext js,md .",
 | 
			
		||||
    "test": "mocha --check-leaks --reporter spec --bail",
 | 
			
		||||
    "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec",
 | 
			
		||||
    "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot"
 | 
			
		||||
  },
 | 
			
		||||
  "version": "0.15.6"
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user