Closed dkarlovi closed 1 year ago
Got something working @dkarlovi
// writer.go
// ...
func NewWriter(buf *bytes.Buffer, rw http.ResponseWriter, rq *http.Request) *Writer {
if rq.URL.Scheme == "" {
if rq.TLS != nil {
rq.URL.Scheme = "https"
} else {
rq.URL.Scheme = "http"
}
}
if rq.URL.Host == "" {
rq.URL.Host = rq.Host
}
return &Writer{
buf: buf,
Rq: rq,
rw: rw,
AsyncBuf: make([]chan []byte, 0),
Done: make(chan bool),
}
}
// ...
// include.go
// ...
if e := i.loadAttributes(b[8:i.length]); e != nil {
return nil, len(b)
}
u, _ := url.Parse(i.src)
i.src = req.URL.ResolveReference(u).String()
// ...
Feel free to close this if you've solved it differently. 👍
Resolved by #7
Fixes #4.