Double Slash Breaks CDN
-
I found a bug that breaks links to the social images when hosting in a CDN
wp-about-author.php, line 12: plugin_dir_url()That function returns the url with an ending slash “/”.
wp-about-author.php, line 129: wp_about_author_get_socials()That function creates urls to the images, prefixed with a “/”. So, what this does is create image uri’s like this:
[site_url]/wp-content/plugins/wp-about-author//images/twitter.pngNotice the double slash in front of //images/twitter.png. Under normal hosting conditions, this usually isn’t an issue. apache takes care of it. But, in a CDN like s3+cloudfront, this is broken. e.g.
http://d3v3e9zt7hyzjw.cloudfront.net/wp-content/plugins/wp-about-author//images/twitter.png
vs
http://d3v3e9zt7hyzjw.cloudfront.net/wp-content/plugins/wp-about-author/images/twitter.png
The topic ‘Double Slash Breaks CDN’ is closed to new replies.