Skip to content
Discussion options

You must be logged in to vote

how hard would it be to extend dumbproxy to cache files?

This function is responsible for handling of plaintext non-tunneled requests:

func (s *ProxyHandler) HandleRequest(wr http.ResponseWriter, req *http.Request, username string) {
req.RequestURI = ""
forwardReqBody := newH1ReqBodyPipe()
origBody := req.Body
req.Body = forwardReqBody.Body()
go func() {
s.forward(req.Context(), username, wrapH1ReqBody(origBody), forwardReqBody)
}()
if req.ProtoMajor == 2 {
req.URL.Scheme = "http" // We can't access :scheme pseudo-header, so assume http
req.URL.Host = req.Host
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@voltagex
Comment options

Answer selected by voltagex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants