Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for REQUEST_METHOD (0.19 sec)

  1. src/net/http/cgi/child_test.go

    package cgi
    
    import (
    	"bufio"
    	"bytes"
    	"net/http"
    	"net/http/httptest"
    	"strings"
    	"testing"
    )
    
    func TestRequest(t *testing.T) {
    	env := map[string]string{
    		"SERVER_PROTOCOL": "HTTP/1.1",
    		"REQUEST_METHOD":  "GET",
    		"HTTP_HOST":       "example.com",
    		"HTTP_REFERER":    "elsewhere",
    		"HTTP_USER_AGENT": "goclient",
    		"HTTP_FOO_BAR":    "baz",
    		"REQUEST_URI":     "/path?a=b",
    		"CONTENT_LENGTH":  "123",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 14 15:42:03 UTC 2020
    - 5.2K bytes
    - Viewed (0)
  2. src/net/http/proxy_test.go

    			t.Fatalf("{%q, %q, %q} cache key = %q; want %q", tt.proxy, tt.scheme, tt.addr, got, tt.key)
    		}
    	}
    }
    
    func ResetProxyEnv() {
    	for _, v := range []string{"HTTP_PROXY", "http_proxy", "NO_PROXY", "no_proxy", "REQUEST_METHOD"} {
    		os.Unsetenv(v)
    	}
    	ResetCachedEnvironment()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 05:30:49 UTC 2020
    - 1.2K bytes
    - Viewed (0)
  3. src/net/http/cgi/child.go

    // The returned Request's Body field is not populated.
    func RequestFromMap(params map[string]string) (*http.Request, error) {
    	r := new(http.Request)
    	r.Method = params["REQUEST_METHOD"]
    	if r.Method == "" {
    		return nil, errors.New("cgi: no REQUEST_METHOD in environment")
    	}
    
    	r.Proto = params["SERVER_PROTOCOL"]
    	var ok bool
    	r.ProtoMajor, r.ProtoMinor, ok = http.ParseHTTPVersion(r.Proto)
    	if !ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  4. src/net/http/cgi/host_test.go

    		"env-PATH_INFO":         "",
    		"env-QUERY_STRING":      "foo=bar&a=b",
    		"env-REMOTE_ADDR":       "1.2.3.4",
    		"env-REMOTE_HOST":       "1.2.3.4",
    		"env-REMOTE_PORT":       "1234",
    		"env-REQUEST_METHOD":    "GET",
    		"env-REQUEST_URI":       "/test.cgi?foo=bar&a=b",
    		"env-SCRIPT_FILENAME":   os.Args[0],
    		"env-SCRIPT_NAME":       "/test.cgi",
    		"env-SERVER_NAME":       "example.com",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 18:29:59 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  5. src/net/http/cgi/cgi_main.go

    	for i := range p {
    		p[i] = byte(b)
    	}
    	return len(p), nil
    }
    
    // childCGIProcess is used by integration_test to complete unit tests.
    func childCGIProcess() {
    	if os.Getenv("REQUEST_METHOD") == "" {
    		// Not in a CGI environment; skipping test.
    		return
    	}
    	switch os.Getenv("REQUEST_URI") {
    	case "/immediate-disconnect":
    		os.Exit(0)
    	case "/no-content-type":
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  6. src/net/http/fcgi/fcgi_test.go

    	// set up request 1
    	makeRecord(typeBeginRequest, 1,
    		[]byte{0, byte(roleResponder), 0, 0, 0, 0, 0, 0}),
    	// add required parameters to request 1
    	makeRecord(typeParams, 1, nameValuePair11("REQUEST_METHOD", "GET")),
    	makeRecord(typeParams, 1, nameValuePair11("SERVER_PROTOCOL", "HTTP/1.1")),
    	makeRecord(typeParams, 1, nil),
    	// begin sending body of request 1
    	makeRecord(typeStdin, 1, []byte("0123456789abcdef")),
    },
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 11 18:51:39 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  7. src/vendor/golang.org/x/net/http/httpproxy/proxy.go

    	// ignored.
    	NoProxy string
    
    	// CGI holds whether the current process is running
    	// as a CGI handler (FromEnvironment infers this from the
    	// presence of a REQUEST_METHOD environment variable).
    	// When this is set, ProxyForURL will return an error
    	// when HTTPProxy applies, because a client could be
    	// setting HTTP_PROXY maliciously. See https://golang.org/s/cgihttpproxy.
    	CGI bool
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 09 00:09:40 UTC 2024
    - 10K bytes
    - Viewed (0)
  8. src/net/http/cgi/integration_test.go

    		"env-PATH_INFO":         "",
    		"env-QUERY_STRING":      "foo=bar&a=b",
    		"env-REMOTE_ADDR":       "1.2.3.4",
    		"env-REMOTE_HOST":       "1.2.3.4",
    		"env-REMOTE_PORT":       "1234",
    		"env-REQUEST_METHOD":    "GET",
    		"env-REQUEST_URI":       "/test.go?foo=bar&a=b",
    		"env-SCRIPT_FILENAME":   os.Args[0],
    		"env-SCRIPT_NAME":       "/test.go",
    		"env-SERVER_NAME":       "example.com",
    		"env-SERVER_PORT":       "80",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 07 18:42:44 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  9. src/net/http/fcgi/child.go

    	// Exclude things supported by net/http natively:
    	switch s {
    	case "CONTENT_LENGTH", "CONTENT_TYPE", "HTTPS",
    		"PATH_INFO", "QUERY_STRING", "REMOTE_ADDR",
    		"REMOTE_HOST", "REMOTE_PORT", "REQUEST_METHOD",
    		"REQUEST_URI", "SCRIPT_NAME", "SERVER_PROTOCOL":
    		return false
    	}
    	if strings.HasPrefix(s, "HTTP_") {
    		return false
    	}
    	// Explicitly include FastCGI-specific things.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  10. src/net/http/cgi/host.go

    		port = matches[1]
    	}
    
    	env := []string{
    		"SERVER_SOFTWARE=go",
    		"SERVER_PROTOCOL=HTTP/1.1",
    		"HTTP_HOST=" + req.Host,
    		"GATEWAY_INTERFACE=CGI/1.1",
    		"REQUEST_METHOD=" + req.Method,
    		"QUERY_STRING=" + req.URL.RawQuery,
    		"REQUEST_URI=" + req.URL.RequestURI(),
    		"PATH_INFO=" + pathInfo,
    		"SCRIPT_NAME=" + root,
    		"SCRIPT_FILENAME=" + h.Path,
    		"SERVER_PORT=" + port,
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 20:46:32 UTC 2024
    - 10.4K bytes
    - Viewed (0)
Back to top