- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 32 for MIMEHeader (0.09 sec)
-
src/net/textproto/reader.go
} strs = make([]string, hint) } m := make(MIMEHeader, hint) // Account for 400 bytes of overhead for the MIMEHeader, plus 200 bytes per entry. // Benchmarking map creation as of go1.20, a one-entry MIMEHeader is 416 bytes and large // MIMEHeaders average about 200 bytes per entry. maxMemory -= 400 const mapEntryOverhead = 200
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 22.1K bytes - Viewed (0) -
src/mime/multipart/writer_test.go
var buf strings.Builder w := NewWriter(&buf) if err := w.SetBoundary("MIMEBOUNDARY"); err != nil { t.Fatalf("Error setting mime boundary: %v", err) } header := textproto.MIMEHeader{ "A": {"2"}, "B": {"5", "7", "6"}, "C": {"4"}, "M": {"3"}, "Z": {"1"}, } part, err := w.CreatePart(header) if err != nil { t.Fatalf("Unable to create part: %v", err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 17:36:47 UTC 2022 - 4.1K bytes - Viewed (0) -
src/net/http/fs.go
} func (r httpRange) contentRange(size int64) string { return fmt.Sprintf("bytes %d-%d/%d", r.start, r.start+r.length-1, size) } func (r httpRange) mimeHeader(contentType string, size int64) textproto.MIMEHeader { return textproto.MIMEHeader{ "Content-Range": {r.contentRange(size)}, "Content-Type": {contentType}, } } // parseRange parses a Range header string as per RFC 7233.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 09 17:06:47 UTC 2024 - 31.1K bytes - Viewed (0) -
cmd/handler-utils_test.go
}, } // Validate if the extracting headers. for i, testCase := range testCases { metadata := make(map[string]string) err := extractMetadataFromMime(context.Background(), textproto.MIMEHeader(testCase.header), metadata) if err != nil && !testCase.shouldFail { t.Fatalf("Test %d failed to extract metadata: %v", i+1, err) } if err == nil && testCase.shouldFail {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Feb 22 06:26:06 UTC 2024 - 6.1K bytes - Viewed (0) -
src/net/http/response.go
return nil, badStringError("malformed HTTP version", resp.Proto) } // Parse the response headers. mimeHeader, err := tp.ReadMIMEHeader() if err != nil { if err == io.EOF { err = io.ErrUnexpectedEOF } return nil, err } resp.Header = Header(mimeHeader) fixPragmaCacheControl(resp.Header) err = readTransfer(resp, r) if err != nil { return nil, err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 11.1K bytes - Viewed (0) -
src/mime/multipart/formdata_test.go
name := strings.Repeat("a", 10<<20) w, _ := fw.CreateFormField(name) w.Write([]byte("value")) }, }, { name: "large MIME header", f: func(fw *Writer) { h := make(textproto.MIMEHeader) h.Set("Content-Disposition", `form-data; name="a"`) h.Set("X-Foo", strings.Repeat("a", 10<<20)) w, _ := fw.CreatePart(h) w.Write([]byte("value")) }, }, { name: "many parts",
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 05 18:31:56 UTC 2024 - 14K bytes - Viewed (0) -
src/net/http/httptrace/trace.go
// for "100 Continue" responses, even if Got100Continue is also defined. // If it returns an error, the client request is aborted with that error value. Got1xxResponse func(code int, header textproto.MIMEHeader) error // DNSStart is called when a DNS lookup begins. DNSStart func(DNSStartInfo) // DNSDone is called when a DNS lookup ends. DNSDone func(DNSDoneInfo)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 8.1K bytes - Viewed (0) -
src/mime/multipart/multipart.go
type Part struct { // The headers of the body, if any, with the keys canonicalized // in the same fashion that the Go http.Request headers are. // For example, "foo-bar" changes case to "Foo-Bar" Header textproto.MIMEHeader mr *Reader disposition string dispositionParams map[string]string // r is either a reader directly reading from mr, or it's a // wrapper around such a reader, decoding the
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 16:12:35 UTC 2024 - 14.1K bytes - Viewed (0) -
src/net/http/clientserver_test.go
t.Helper() for _, h := range []string{"Content-Length", "Transfer-Encoding"} { if v, ok := header[h]; ok { t.Errorf("%s is %q; must not be sent", h, v) } } } var respCounter uint8 trace := &httptrace.ClientTrace{ Got1xxResponse: func(code int, header textproto.MIMEHeader) error { switch respCounter { case 0:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 46.6K bytes - Viewed (0) -
src/net/mail/message.go
// If there are no values associated with the key, Get returns "". // To access multiple values of a key, or to use non-canonical keys, // access the map directly. func (h Header) Get(key string) string { return textproto.MIMEHeader(h).Get(key) } var ErrHeaderNotPresent = errors.New("mail: header not in message") // Date parses the Date header field. func (h Header) Date() (time.Time, error) { hdr := h.Get("Date") if hdr == "" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 11:31:03 UTC 2024 - 23.5K bytes - Viewed (0)