@@ -56,7 +56,7 @@ module.exports = function(compiler, options) {
56
56
if ( typeof options . log !== "function" ) options . log = console . log . bind ( console ) ;
57
57
if ( typeof options . warn !== "function" ) options . warn = console . warn . bind ( console ) ;
58
58
if ( typeof compiler . outputPath === "string" && compiler . outputPath . lastIndexOf ( "/" , 0 ) !== 0 ) {
59
- throw new Error ( ' `output.path` needs to be an absolute path or "/".' ) ;
59
+ throw new Error ( " `output.path` needs to be an absolute path or `/`." ) ;
60
60
}
61
61
62
62
// store our files in memory
@@ -160,13 +160,13 @@ module.exports = function(compiler, options) {
160
160
}
161
161
162
162
function handleRangeHeaders ( content , req , res ) {
163
- res . setHeader ( ' Accept-Ranges' , ' bytes' ) ;
163
+ res . setHeader ( " Accept-Ranges" , " bytes" ) ;
164
164
if ( req . headers . range ) {
165
165
var ranges = parseRange ( content . length , req . headers . range ) ;
166
166
167
167
// unsatisfiable
168
168
if ( - 1 == ranges ) {
169
- res . setHeader ( ' Content-Range' , ' bytes */' + content . length ) ;
169
+ res . setHeader ( " Content-Range" , " bytes */" + content . length ) ;
170
170
res . statusCode = 416 ;
171
171
}
172
172
@@ -176,8 +176,8 @@ module.exports = function(compiler, options) {
176
176
res . statusCode = 206 ;
177
177
var length = content . length ;
178
178
res . setHeader (
179
- ' Content-Range' ,
180
- ' bytes ' + ranges [ 0 ] . start + '-' + ranges [ 0 ] . end + '/' + length
179
+ " Content-Range" ,
180
+ " bytes " + ranges [ 0 ] . start + "-" + ranges [ 0 ] . end + "/" + length
181
181
) ;
182
182
183
183
content = content . slice ( ranges [ 0 ] . start , ranges [ 0 ] . end + 1 ) ;
@@ -196,7 +196,7 @@ module.exports = function(compiler, options) {
196
196
} , req ) ;
197
197
}
198
198
199
- if ( req . method !== ' GET' ) {
199
+ if ( req . method !== " GET" ) {
200
200
return goNext ( ) ;
201
201
}
202
202
0 commit comments