Changeset 32 in code for trunk/morty.go
- Timestamp:
- Nov 24, 2016, 7:46:31 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/morty.go
r31 r32 492 492 if bytes.Equal(http_equiv, []byte("refresh")) && urlIndex != -1 { 493 493 contentUrl := content[urlIndex+4:] 494 // special case of <meta http-equiv="refresh" content="0; url='example.com/url.with.quote.outside'"> 495 if len(contentUrl)>=2 && (contentUrl[0] == byte('\'') || contentUrl[0] == byte('"')) { 496 if contentUrl[0] == contentUrl[len(contentUrl)-1] { 497 contentUrl=contentUrl[1:len(contentUrl)-1] 498 } 499 } 500 // output proxify result 494 501 if uri, err := rc.ProxifyURI(string(contentUrl)); err == nil { 495 502 fmt.Fprintf(out, ` http-equiv="refresh" content="%surl=%s"`, content[:urlIndex], uri)
Note:
See TracChangeset
for help on using the changeset viewer.