Merge pull request #37 from dalf/url_fragment
[fix] URI fragment are not encoded in the mortyurl git-svn-id: file:///srv/svn/repo/yukari/trunk@52 f3bd38d9-da89-464d-a02a-eb04e43141b5
This commit is contained in:
parent
b45f6c0afe
commit
46c188539b
4
morty.go
4
morty.go
@ -284,7 +284,11 @@ func (p *Proxy) RequestHandler(ctx *fasthttp.RequestCtx) {
|
||||
responseBody = resp.Body()
|
||||
}
|
||||
|
||||
if bytes.Contains(contentType, []byte("xhtml")) {
|
||||
ctx.SetContentType("text/html; charset=UTF-8")
|
||||
} else {
|
||||
ctx.SetContentType(fmt.Sprintf("%s; charset=UTF-8", contentInfo[0]))
|
||||
}
|
||||
|
||||
switch {
|
||||
case bytes.Contains(contentType, []byte("css")):
|
||||
|
Loading…
x
Reference in New Issue
Block a user