- Timestamp:
- Nov 24, 2016, 9:35:37 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/morty.go
r36 r37 214 214 } 215 215 } 216 log.Println("invalid request:", resp.StatusCode()) 216 error_message := fmt.Sprintf("invalid response: %d", resp.StatusCode()) 217 p.serveMainPage(ctx, resp.StatusCode(), errors.New(error_message)) 217 218 return 218 219 } … … 505 506 contentUrl := content[urlIndex+4:] 506 507 // special case of <meta http-equiv="refresh" content="0; url='example.com/url.with.quote.outside'"> 507 if len(contentUrl) >=2 && (contentUrl[0] == byte('\'') || contentUrl[0] == byte('"')) {508 if len(contentUrl) >= 2 && (contentUrl[0] == byte('\'') || contentUrl[0] == byte('"')) { 508 509 if contentUrl[0] == contentUrl[len(contentUrl)-1] { 509 contentUrl =contentUrl[1:len(contentUrl)-1]510 contentUrl = contentUrl[1 : len(contentUrl)-1] 510 511 } 511 512 }
Note:
See TracChangeset
for help on using the changeset viewer.