Home | History | Annotate | Download | only in cgi

Lines Matching refs:req

106 func (h *Handler) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
112 if len(req.TransferEncoding) > 0 && req.TransferEncoding[0] == "chunked" {
118 pathInfo := req.URL.Path
124 if matches := trailingPort.FindStringSubmatch(req.Host); len(matches) != 0 {
130 "SERVER_NAME=" + req.Host,
132 "HTTP_HOST=" + req.Host,
134 "REQUEST_METHOD=" + req.Method,
135 "QUERY_STRING=" + req.URL.RawQuery,
136 "REQUEST_URI=" + req.URL.RequestURI(),
143 if remoteIP, remotePort, err := net.SplitHostPort(req.RemoteAddr); err == nil {
147 env = append(env, "REMOTE_ADDR="+req.RemoteAddr, "REMOTE_HOST="+req.RemoteAddr)
150 if req.TLS != nil {
154 for k, v := range req.Header {
167 if req.ContentLength > 0 {
168 env = append(env, fmt.Sprintf("CONTENT_LENGTH=%d", req.ContentLength))
170 if ctype := req.Header.Get("Content-Type"); ctype != "" {
221 if req.ContentLength != 0 {
222 cmd.Stdin = req.Body
299 h.handleInternalRedirect(rw, req, loc)
349 func (h *Handler) handleInternalRedirect(rw http.ResponseWriter, req *http.Request, path string) {
350 url, err := req.URL.Parse(path)
373 RemoteAddr: req.RemoteAddr,
374 TLS: req.TLS,