- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for writeHeaders (0.15 sec)
-
mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt
path: String, ) { val responseHeaders = listOf( Header(":status", "404"), Header(":version", "HTTP/1.1"), Header("content-type", "text/plain"), ) stream.writeHeaders( responseHeaders = responseHeaders, outFinished = false, flushHeaders = false, ) val out = stream.getSink().buffer() out.writeUtf8("Not found: $path") out.close() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.1K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/api/BaseApiManager.java
response.setContentType(buf.toString()); writeHeaders(response); try (PrintWriter out = new PrintWriter(new OutputStreamWriter(response.getOutputStream(), enc))) { out.print(text); } catch (final IOException e) { throw new IORuntimeException(e); } } protected abstract void writeHeaders(final HttpServletResponse response);
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 4.3K bytes - Viewed (0) -
internal/http/response-recorder.go
return blobBody } // WriteHeader - writes http status code func (lrw *ResponseRecorder) WriteHeader(code int) { if !lrw.headersLogged { lrw.ttfbHeader = time.Now().UTC().Sub(lrw.StartTime) lrw.StatusCode = code lrw.writeHeaders(&lrw.headers, code, lrw.ResponseWriter.Header()) lrw.headersLogged = true lrw.ResponseWriter.WriteHeader(code) } } // Flush - Calls the underlying Flush.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 17:13:00 UTC 2024 - 5.5K bytes - Viewed (0) -
okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackRoundTripTest.kt
assumeFalse( story === Story.MISSING, "Test stories missing, checkout git submodule", ) val newCases = mutableListOf<Case>() for (case in story.cases) { hpackWriter.writeHeaders(case.headersList) newCases += case.copy(wire = bytesOut.readByteString()) } testDecoder(story.copy(cases = newCases)) } companion object { private val RAW_DATA = arrayOf("raw-data")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2K bytes - Viewed (0) -
docs/iam/identity-manager-plugin.go
if token == "" { writeErrorResponse(w, errors.New("token parameter not given")) return } rsp, ok := tokens[token] if !ok { w.WriteHeader(http.StatusForbidden) return } fmt.Printf("Allowed for token: %s user: %s\n", token, rsp.User) w.WriteHeader(http.StatusOK) json.NewEncoder(w).Encode(rsp) return } func main() { http.HandleFunc("/", mainHandler) log.Print("Listening on :8081")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 01 21:31:13 UTC 2024 - 2.1K bytes - Viewed (0) -
cni/pkg/nodeagent/healthServer.go
func healthz(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusOK) } func readyz(installReady, watchReady *atomic.Value) http.HandlerFunc { return func(w http.ResponseWriter, _ *http.Request) { if !installReady.Load().(bool) || !watchReady.Load().(bool) { http.Error(w, http.StatusText(http.StatusServiceUnavailable), http.StatusServiceUnavailable) return } w.WriteHeader(http.StatusOK) }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Apr 15 01:29:35 UTC 2024 - 1.8K bytes - Viewed (0) -
cni/pkg/plugin/cnieventclient_test.go
// Fake out a test HTTP server and use that instead of a real HTTP server over gRPC to validate req/resp flows testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { res.WriteHeader(http.StatusOK) res.Write([]byte("server happy")) })) defer func() { testServer.Close() }() cniC := fakeCNIEventClient(testServer.URL)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Tue Jul 02 18:48:50 UTC 2024 - 4.2K bytes - Viewed (0) -
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) -
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)