fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

print raw file (#903)

When adding a `format=raw` to a request `/print`, we receive the raw Content data file in response

Co-authored-by: Keegan Carruthers-Smith <keegan.csmith@gmail.com>

+7
+7
web/server.go
··· 615 615 616 616 f := result.Files[0] 617 617 618 + if qvals.Get("format") == "raw" { 619 + w.Header().Set("Content-Type", "text/plain; charset=utf-8") 620 + w.Header().Set("X-Content-Type-Options", "nosniff") 621 + _, _ = w.Write(f.Content) 622 + return nil 623 + } 624 + 618 625 byteLines := bytes.Split(f.Content, []byte{'\n'}) 619 626 strLines := make([]string, 0, len(byteLines)) 620 627 for _, l := range byteLines {