- Timestamp:
- Oct 27, 2016, 2:47:30 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/morty.go
r13 r14 475 475 } 476 476 477 if bytes.Equal(http_equiv, []byte("refresh")) && bytes.Index(content, []byte(";url=")) != -1 { 478 parts := bytes.SplitN(content, []byte(";url="), 2) 479 if uri, err := proxifyURI(rc, string(parts[1])); err == nil { 480 fmt.Fprintf(out, ` http-equiv="refresh" content="%s;%s"`, parts[0], uri) 477 urlIndex := bytes.Index(bytes.ToLower(content), []byte("url=")) 478 if bytes.Equal(http_equiv, []byte("refresh")) && urlIndex != -1 { 479 contentUrl := content[urlIndex+4:] 480 if uri, err := proxifyURI(rc, string(contentUrl)); err == nil { 481 fmt.Fprintf(out, ` http-equiv="refresh" content="%surl=%s"`, content[:urlIndex], uri) 481 482 } 482 483 } else {
Note:
See TracChangeset
for help on using the changeset viewer.