Skip to content

Commit

Permalink
Fix curl not formating CApath as a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rs committed Sep 13, 2018
1 parent dd2d73a commit 0386891
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions formatter/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ type HeaderCleaner struct {
line []byte
}

var (
capath = []byte(" CApath:")
ccapath = []byte("* CApath:")
)

func (c *HeaderCleaner) Write(p []byte) (n int, err error) {
n = len(p)
cp := c.buf
p = bytes.Replace(p, capath, ccapath, 1) // Fix curl misformatted line
for len(p) > 0 {
idx := bytes.IndexByte(p, '\n')
if idx == -1 {
Expand Down

0 comments on commit 0386891

Please sign in to comment.