- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 49 for writeHeaders (0.16 sec)
-
docs/auditlog/auditlog-echo.go
defer r.Body.Close() if err != nil { log.Printf("Error reading request body: %v", err) w.WriteHeader(http.StatusBadRequest) return } log.Printf(">>> %s %s\n", r.Method, r.URL.Path) var out bytes.Buffer json.Indent(&out, body, "", " ") log.Printf("%s\n", out.String()) w.WriteHeader(http.StatusOK) } func main() { flag.Parse() http.HandleFunc("/", mainHandler)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 01 21:31:13 UTC 2024 - 1.5K bytes - Viewed (0) -
src/archive/tar/fuzz_test.go
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jan 13 18:06:33 UTC 2022 - 2.2K bytes - Viewed (0) -
src/archive/tar/writer.go
return tw.err } tw.pad = 0 return nil } // WriteHeader writes hdr and prepares to accept the file's contents. // The Header.Size determines how many bytes can be written for the next file. // If the current file is not fully written, then this returns an error. // This implicitly flushes any padding necessary before writing the header. func (tw *Writer) WriteHeader(hdr *Header) error { if err := tw.Flush(); err != nil { return err
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Oct 02 14:22:59 UTC 2024 - 19.6K bytes - Viewed (0) -
cmd/handler-api.go
if contextCanceled(ctx) { w.WriteHeader(499) return } f.ServeHTTP(w, r) case <-r.Context().Done(): globalHTTPStats.addRequestsInQueue(-1) // When the client disconnects before getting the S3 handler // status code response, set the status code to 499 so this request // will be properly audited and traced. w.WriteHeader(499) default:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 26 17:07:10 UTC 2024 - 10.4K bytes - Viewed (0) -
docs/iam/access-manager-plugin.go
func init() { flag.StringVar(&keyFile, "key-file", "", "Path to TLS cert key file") flag.StringVar(&certFile, "cert-file", "", "Path to TLS cert file") } func writeErrorResponse(w http.ResponseWriter, err error) { w.WriteHeader(http.StatusBadRequest) json.NewEncoder(w).Encode(map[string]string{ "error": fmt.Sprintf("%v", err), }) } type Result struct { Result bool `json:"result"` }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 08 17:15:20 UTC 2024 - 2.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 11.8K bytes - Viewed (0) -
src/archive/tar/tar_test.go
ModTime: time.Now().Round(time.Second), PAXRecords: map[string]string{"uid": "2097152"}, Format: FormatPAX, Typeflag: TypeReg, } if err := tw.WriteHeader(hdr); err != nil { t.Fatalf("tw.WriteHeader: %v", err) } if _, err := tw.Write(data); err != nil { t.Fatalf("tw.Write: %v", err) } if err := tw.Close(); err != nil { t.Fatalf("tw.Close: %v", err) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jul 25 00:25:45 UTC 2024 - 23.9K bytes - Viewed (0) -
src/archive/tar/example_test.go
{"todo.txt", "Get animal handling license."}, } for _, file := range files { hdr := &tar.Header{ Name: file.Name, Mode: 0600, Size: int64(len(file.Body)), } if err := tw.WriteHeader(hdr); err != nil { log.Fatal(err) } if _, err := tw.Write([]byte(file.Body)); err != nil { log.Fatal(err) } } if err := tw.Close(); err != nil { log.Fatal(err) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Nov 16 16:54:08 UTC 2017 - 1.4K bytes - Viewed (0) -
internal/grid/manager.go
gridLogIf(context.Background(), err, err.Error()) w.WriteHeader(http.StatusInternalServerError) } }() if debugPrint { fmt.Printf("grid: Got a %s request for: %v\n", req.Method, req.URL) } ctx := req.Context() if err := authReq(req); err != nil { gridLogOnceIf(ctx, fmt.Errorf("auth %s: %w", req.RemoteAddr, err), req.RemoteAddr) w.WriteHeader(http.StatusForbidden) return }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 10.6K bytes - Viewed (0) -
build-logic/documentation/src/main/groovy/gradlebuild/docs/FindBrokenInternalLinks.java
} private void reportErrors(Map<File, List<Error>> errors, File reportFile) { try (PrintWriter fw = new PrintWriter(new FileWriter(reportFile))) { writeHeader(fw); if (errors.isEmpty()) { fw.println("All clear!"); return; } for (Map.Entry<File, List<Error>> e : errors.entrySet()) {
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Wed Aug 21 08:08:05 UTC 2024 - 9.4K bytes - Viewed (0)