Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 208 for newHeader (0.12 sec)

  1. cmd/post-policy_test.go

    			t.Fatalf("Test %d: %s: Failed to create HTTP request for PostPolicyHandler: <ERROR> %v", i+1, instanceType, perr)
    		}
    		if testCase.malformedBody {
    			// Change the request body.
    			req.Body = io.NopCloser(bytes.NewReader([]byte("Hello,")))
    		}
    		// Since `apiRouter` satisfies `http.Handler` it has a ServeHTTP to execute the logic of the handler.
    		// Call the ServeHTTP to execute the handler.
    		apiRouter.ServeHTTP(rec, req)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 22 23:07:14 UTC 2024
    - 30.2K bytes
    - Viewed (0)
  2. internal/s3select/jstream/decoder_test.go

    package jstream
    
    import (
    	"bytes"
    	"testing"
    )
    
    func mkReader(s string) *bytes.Reader { return bytes.NewReader([]byte(s)) }
    
    func TestDecoderSimple(t *testing.T) {
    	var (
    		counter int
    		mv      *MetaValue
    		body    = `[{"bio":"bada bing bada boom","id":1,"name":"Charles","falseVal":false}]`
    	)
    
    	decoder := NewDecoder(mkReader(body), 1)
    
    	for mv = range decoder.Stream() {
    		counter++
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  3. docs/debugging/inspect/main.go

    			privateKey = b
    			fmt.Println("Using private key from", *privKeyPath)
    		}
    
    		// Prompt for decryption key if no --key or --private-key are provided
    		if len(privateKey) == 0 && !*stdin {
    			reader := bufio.NewReader(os.Stdin)
    			fmt.Print("Enter Decryption Key: ")
    
    			text, _ := reader.ReadString('\n')
    			// convert CRLF to LF
    			*keyHex = strings.ReplaceAll(text, "\n", "")
    			*keyHex = strings.TrimSpace(*keyHex)
    		}
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 31 14:49:23 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  4. cmd/auth-handler.go

    		}
    
    		// Populate payload to extract location constraint.
    		r.Body = io.NopCloser(bytes.NewReader(payload))
    		region, s3Err = parseLocationConstraint(r)
    		if s3Err != ErrNone {
    			return s3Err
    		}
    
    		// Populate payload again to handle it in HTTP handler.
    		r.Body = io.NopCloser(bytes.NewReader(payload))
    	}
    
    	logger.GetReqInfo(ctx).Region = region
    
    	return s3Err
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 17 16:45:46 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  5. internal/mountinfo/mountinfo_linux.go

    	if err != nil {
    		return nil, err
    	}
    	defer file.Close()
    	return parseMountFrom(file)
    }
    
    func parseMountFrom(file io.Reader) (mountInfos, error) {
    	mounts := mountInfos{}
    	scanner := bufio.NewReader(file)
    	for {
    		line, err := scanner.ReadString('\n')
    		if err == io.EOF {
    			break
    		}
    
    		fields := strings.Fields(line)
    		if len(fields) != expectedNumFieldsPerLine {
    			// ignore incorrect lines.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 4.7K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java

      }
    
      public void testDecoupledLoader() {
        FinalizableReferenceQueue.DecoupledLoader decoupledLoader =
            new FinalizableReferenceQueue.DecoupledLoader() {
              @Override
              URLClassLoader newLoader(URL base) {
                return new DecoupledClassLoader(new URL[] {base});
              }
            };
    
        Class<?> finalizerCopy = decoupledLoader.loadFinalizer();
    
        assertNotNull(finalizerCopy);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  7. internal/bucket/lifecycle/lifecycle_test.go

    		dec := xml.NewDecoder(strings.NewReader(tc.xml))
    		if err := dec.Decode(&got); err != nil || got != tc.expected {
    			if err != nil {
    				t.Fatalf("%d: Failed to unmarshal xml %v", i+1, err)
    			}
    			t.Fatalf("%d: Expected %v but got %v", i+1, tc.expected, got)
    		}
    	}
    }
    
    func TestParseLifecycleConfigWithID(t *testing.T) {
    	r := bytes.NewReader([]byte(`<LifecycleConfiguration>
    								  <Rule>
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu May 23 01:12:48 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  8. cmd/config-current.go

    		logger.Fatal(err, "Unable to generate root secret key using KMS")
    	}
    
    	accessKey, err := auth.GenerateAccessKey(20, bytes.NewReader(aKey))
    	if err != nil {
    		logger.Fatal(err, "Unable to generate root access key")
    	}
    	secretKey, err := auth.GenerateSecretKey(32, bytes.NewReader(sKey))
    	if err != nil {
    		logger.Fatal(err, "Unable to generate root secret key")
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 03 18:23:41 UTC 2024
    - 30.1K bytes
    - Viewed (0)
  9. internal/http/response-recorder.go

    // Body - Return response body.
    func (lrw *ResponseRecorder) Body() []byte {
    	if lrw.Header().Get("Content-Encoding") == "gzip" {
    		if lrw.body.Len() > 1<<20 {
    			return gzippedBody
    		}
    		r, err := gzip.NewReader(&lrw.body)
    		if err != nil {
    			return gzippedBody
    		}
    		defer r.Close()
    		b, _ := io.ReadAll(io.LimitReader(r, 10<<20))
    		return b
    	}
    	// If there was an error response or body logging is enabled
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 17:13:00 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  10. cmd/main.go

    	fmt.Fprintln(banner, color.Blue("License:")+color.Bold(" GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html"))
    	fmt.Fprintln(banner, color.Blue("Copyright:")+color.Bold(" 2015-%s MinIO, Inc.", CopyrightYear))
    	return strings.NewReader(banner.String())
    }
    
    func printMinIOVersion(c *cli.Context) {
    	io.Copy(c.App.Writer, versionBanner(c))
    }
    
    var debugNoExit = env.Get("_MINIO_DEBUG_NO_EXIT", "") != ""
    
    // Main main for minio server.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jul 30 22:59:48 UTC 2024
    - 6.5K bytes
    - Viewed (0)
Back to top