Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for SERVER_PROTOCOL (0.26 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",
    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/cgi/child.go

    	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 {
    		return nil, errors.New("cgi: invalid SERVER_PROTOCOL version")
    	}
    
    	r.Close = true
    	r.Trailer = http.Header{}
    	r.Header = http.Header{}
    
    	r.Host = params["HTTP_HOST"]
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  3. src/net/http/fcgi/fcgi_test.go

    		[]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")),
    },
    	nil)
    
    var cleanUpTests = []struct {
    	input []byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 11 18:51:39 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  4. src/net/http/fcgi/child.go

    	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.
    	// This list is redundant with the default "return true" below.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  5. src/net/http/cgi/host.go

    	if req.TLS != nil {
    		port = "443"
    	}
    	if matches := trailingPort.FindStringSubmatch(req.Host); len(matches) != 0 {
    		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,
    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