Skip to content

Commit

Permalink
Merge 4097b11 into e7e1c0a
Browse files Browse the repository at this point in the history
  • Loading branch information
TechnoBerry committed Oct 5, 2014
2 parents e7e1c0a + 4097b11 commit a4098c3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,24 @@
* Module dependencies.
*/

/** @private */
var etag = require('etag');
/** @private */
var fresh = require('fresh');
/** @private */
var fs = require('fs');
/** @private */
var ms = require('ms');
/** @private */
var path = require('path');
/** @private */
var resolve = path.resolve;

/**
* Module variables.
*/

/** @private */
var maxMaxAge = 60 * 60 * 24 * 365 * 1000; // 1 year

/**
Expand Down Expand Up @@ -75,6 +82,7 @@ module.exports = function favicon(path, options){
};
};

/** @private */
function calcMaxAge(val) {
var num = typeof val === 'string'
? ms(val)
Expand All @@ -85,6 +93,7 @@ function calcMaxAge(val) {
: maxMaxAge
}

/** @private */
function createIcon(buf, maxAge) {
return {
body: buf,
Expand All @@ -95,6 +104,7 @@ function createIcon(buf, maxAge) {
};
}

/** @private */
function createIsDirError(path) {
var error = new Error('EISDIR, illegal operation on directory \'' + path + '\'');
error.code = 'EISDIR';
Expand All @@ -104,6 +114,7 @@ function createIsDirError(path) {
return error;
}

/** @private */
function send(req, res, icon) {
var headers = icon.headers;

Expand Down

0 comments on commit a4098c3

Please sign in to comment.