Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for mustGetRequestID (0.21 sec)

  1. cmd/api-headers_test.go

    package cmd
    
    import (
    	"testing"
    )
    
    func TestNewRequestID(t *testing.T) {
    	// Ensure that it returns an alphanumeric result of length 16.
    	id := mustGetRequestID(UTCNow())
    
    	if len(id) != 16 {
    		t.Fail()
    	}
    
    	var e rune
    	for _, char := range id {
    		e = char
    
    		// Ensure that it is alphanumeric, in this case, between 0-9 and A-Z.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 1.1K bytes
    - Viewed (0)
  2. cmd/api-headers.go

    	xhttp "github.com/minio/minio/internal/http"
    	xxml "github.com/minio/xxml"
    )
    
    // Returns a hexadecimal representation of time at the
    // time response is sent to the client.
    func mustGetRequestID(t time.Time) string {
    	return fmt.Sprintf("%X", t.UnixNano())
    }
    
    // setEventStreamHeaders to allow proxies to avoid buffering proxy responses
    func setEventStreamHeaders(w http.ResponseWriter) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.9K bytes
    - Viewed (1)
  3. cmd/generic-handlers.go

    		// part of the log entry, Error response XML and auditing.
    		// Set custom headers such as x-amz-request-id for each request.
    		w.Header().Set(xhttp.AmzRequestID, mustGetRequestID(UTCNow()))
    		if globalLocalNodeName != "" {
    			w.Header().Set(xhttp.AmzRequestHostID, globalLocalNodeNameHex)
    		}
    		h.ServeHTTP(w, r)
    	})
    }
    
    // criticalErrorHandler handles panics and fatal errors by
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 11 01:08:52 GMT 2024
    - 20.7K bytes
    - Viewed (0)
Back to top