Skip to content
Myr

refactored options() helper

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

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent a9992b5 · Browse files · 1 file+1 added−5 removed
This commit

State

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

Diff stats

1 file+1 added−5 removed

  • other:+1 added−5 removed

1 file+1 added−5 removed

modified:lib/router/index.js+1 added-5 removed
258 unmodified lines
259260function options(req, res, routes) {261 var pathname = parse(req.url).pathname262 , body = optionsFor(pathname, routes).join(',');263 res.writeHead(200, {264 'Content-Length': body.length265 , 'Allow': body266 });267 res.end(body);263 res.send(body, { Allow: body });264}265266/**267 * Return OPTIONS array for the given `path`, matching `routes`.
96 unmodified lines