fluffy – Diff between revs 1 and 3
?pathlinks?
Rev 1 | Rev 3 | |||
---|---|---|---|---|
Line 67... | Line 67... | |||
67 | |
67 | |
|
68 | const ifModifiedSince = Object |
68 | const ifModifiedSince = Object |
|
69 | .getOwnPropertyNames(self.request.headers) |
69 | .getOwnPropertyNames(self.request.headers) |
|
70 | .filter((header) => header.toUpperCase() === |
70 | .filter((header) => header.toUpperCase() === |
|
- | 71 | 'If-Modified-Since'.toUpperCase()); |
||
- | 72 | |
||
- | 73 | // Set content type. |
||
Line 71... | Line 74... | |||
71 | 'If-Modified-Since'.toUpperCase()); |
74 | self.response.setHeader('Content-Type', type); |
|
72 | |
75 | |
|
73 | if ((ifNoneMatch.length !== 0 && |
76 | if ((ifNoneMatch.length !== 0 && |
|
74 | self.request.headers[ifNoneMatch].toUpperCase() === etag.toUpperCase()) || |
77 | self.request.headers[ifNoneMatch].toUpperCase() === etag.toUpperCase()) || |
|
Line 123... | Line 126... | |||
123 | < tz(stat.mtime).tz('UTC'))) { tz()> |
126 | < tz(stat.mtime).tz('UTC'))) { tz()> |
|
124 | < tz(stat.mtime).tz('UTC'))) { .tz('UTC')> |
127 | < tz(stat.mtime).tz('UTC'))) { .tz('UTC')> |
|
125 | < tz(stat.mtime).tz('UTC'))) { .add(expires, 'seconds')> |
128 | < tz(stat.mtime).tz('UTC'))) { .add(expires, 'seconds')> |
|
126 | < tz(stat.mtime).tz('UTC'))) { .format("ddd, DD MMM YYYY HH:mm:ss z")> |
129 | < tz(stat.mtime).tz('UTC'))) { .format("ddd, DD MMM YYYY HH:mm:ss z")> |
|
127 | < tz(stat.mtime).tz('UTC'))) { );> |
130 | < tz(stat.mtime).tz('UTC'))) { );> |
|
- | 131 | < tz(stat.mtime).tz('UTC'))) { > |
||
- | 132 | < tz(stat.mtime).tz('UTC'))) { // Set content type.> |
||
- | 133 | < tz(stat.mtime).tz('UTC'))) { self.response.setHeader('Content-Type', type);> |
||
- | 134 | < tz(stat.mtime).tz('UTC'))) { > |
||
128 | < tz(stat.mtime).tz('UTC'))) { // Send the resource.> |
135 | < tz(stat.mtime).tz('UTC'))) { // Send the resource.> |
|
129 | < tz(stat.mtime).tz('UTC'))) { self.emit('log', {> |
136 | < tz(stat.mtime).tz('UTC'))) { self.emit('log', {> |
|
130 | < tz(stat.mtime).tz('UTC'))) { message: 'Client: ' +> |
137 | < tz(stat.mtime).tz('UTC'))) { message: 'Client: ' +> |
|
131 | < tz(stat.mtime).tz('UTC'))) { self.client.address + ':' +> |
138 | < tz(stat.mtime).tz('UTC'))) { self.client.address + ':' +> |
|
132 | < tz(stat.mtime).tz('UTC'))) { self.client.port +> |
139 | < tz(stat.mtime).tz('UTC'))) { self.client.port +> |