@@ -42,7 +42,7 @@ type HttpResponseBlock interface {
42
42
HttpHeader () * http.Header
43
43
}
44
44
45
- var missingEndOfHeaders = errors .New ("missing line separator at end of http headers" )
45
+ var errMissingEndOfHeaders = errors .New ("missing line separator at end of http headers" )
46
46
47
47
type httpRequestBlock struct {
48
48
opts * warcRecordOptions
@@ -335,7 +335,7 @@ func headerBytes(r buffer) ([]byte, error) {
335
335
}
336
336
var err error
337
337
if ! sepFound {
338
- err = missingEndOfHeaders
338
+ err = errMissingEndOfHeaders
339
339
}
340
340
return result .Bytes (), err
341
341
}
@@ -369,7 +369,7 @@ func newHttpBlock(opts *warcRecordOptions, wf *WarcFields, r io.Reader, blockDig
369
369
}
370
370
}
371
371
372
- if herr == missingEndOfHeaders && opts .fixSyntaxErrors {
372
+ if herr == errMissingEndOfHeaders && opts .fixSyntaxErrors {
373
373
// Fix header and update content-length field
374
374
hb = append (hb , '\r' , '\n' )
375
375
l , _ := wf .GetInt64 (ContentLength )
@@ -396,7 +396,7 @@ func newHttpBlock(opts *warcRecordOptions, wf *WarcFields, r io.Reader, blockDig
396
396
payloadDigest : payloadDigest ,
397
397
}
398
398
399
- if herr == missingEndOfHeaders && ! opts .fixSyntaxErrors {
399
+ if herr == errMissingEndOfHeaders && ! opts .fixSyntaxErrors {
400
400
// We have to fix the header for parsing even if we don't fix the record
401
401
hb = append (hb , '\r' , '\n' )
402
402
}
@@ -418,7 +418,7 @@ func newHttpBlock(opts *warcRecordOptions, wf *WarcFields, r io.Reader, blockDig
418
418
payloadDigest : payloadDigest ,
419
419
}
420
420
421
- if herr == missingEndOfHeaders && ! opts .fixSyntaxErrors {
421
+ if herr == errMissingEndOfHeaders && ! opts .fixSyntaxErrors {
422
422
// We have to fix the header for parsing even if we don't fix the record
423
423
hb = append (hb , '\r' , '\n' )
424
424
}
0 commit comments