Feat: readme in shared folder

This commit is contained in:
HFO4
2020-01-31 15:12:15 +08:00
parent cc2c3b3f0f
commit 4f0c2bbb29
4 changed files with 49 additions and 0 deletions

View File

@@ -243,6 +243,9 @@ func (instance NopRSCloser) SetContentLength(size int64) {
// Read 实现 NopRSCloser reader
func (instance NopRSCloser) Read(p []byte) (n int, err error) {
if instance.status.IgnoreFirst && len(p) == 512 {
return 0, io.EOF
}
return instance.body.Read(p)
}