code: func (s *rpcServer) httpStatusLine(req *http.Request, code int) string {
  	// Fast path:
  	key := code
  	proto11 := req.ProtoAtLeast(1, 1)
  	if !proto11 {
  		key = -key
  	}
  	s.statusLock.RLock()
  	line, ok := s.statusLines[key]
  	s.statusLock.RUnlock()
  	if ok {
  		return line
  	}
  
  	// Slow path:
  	proto := "HTTP/1.0"
  	if proto11 {
  		proto = "HTTP/1.1"
  	}
  	codeStr := strconv.Itoa(code)
  	text := http.StatusText(code)
  	if text != "" {
  		line = proto + " " + codeStr + " " + text + "\r\n"
  		s.statusLock.Lock()
  		s.statusLines[key] = line
  		s.statusLock.Unlock()
  	} else {
  		text = "status code " + codeStr
  		line = proto + " " + codeStr + " " + text + "\r\n"
  	}
  
  	return line
  }
docs: // httpStatusLine returns a response Status-Line (RFC 2616 Section 6.1)
  // for the given request and response status code.  This function was lifted and
  // adapted from the standard library HTTP server code since it's not exported.