Title: HTTPS bug fix
Last modified: August 20, 2016

---

# HTTPS bug fix

 *  Resolved [FolioVision](https://wordpress.org/support/users/foliovision/)
 * (@foliovision)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/https-bug-fix/)
 * Hello Stefano,
 * I found a bug in Hyper Cache – it affects https enabled pages on a site. We have
   few of these and in the hyper_cache_invalidate_post() function, the protocol 
   type is stripped incorreclty (just substr()), so we get a wrong md5.
 * cache.php constructs the md5 differently.
 * So the cached file is never cleared when the page is saved.
 * As a quick fix, I changed hyper_cache_invalidate_post() to strip the protocol
   part of URI with a regex, rather than a set number of chars – https:// is longer
   than http://
 * `$link = substr($link, 7);`
 * was replaced with
 * `$link = preg_replace( '~^.*?://~', '', $link );`
 * Thanks,
    Martin
 * [http://wordpress.org/extend/plugins/hyper-cache/](http://wordpress.org/extend/plugins/hyper-cache/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [FolioVision](https://wordpress.org/support/users/foliovision/)
 * (@foliovision)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/https-bug-fix/#post-3351132)
 * Hello Stefano,
 * also – could you please include this or similar fix for the issue in next version?
   We don’t want to be fixing this by hand on each site.
 * Thanks,
    Martin
 *  Thread Starter [FolioVision](https://wordpress.org/support/users/foliovision/)
 * (@foliovision)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/https-bug-fix/#post-3351313)
 * Hello Stefano,
 * thanks for including this fix!
 * Thanks,
    Martin
 *  [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/https-bug-fix/#post-3351316)
 * Hello FolioVision if the issue has been resolved would it be ok if you could 
   close this thread as resolved.
 * Kind regards
 *  Thread Starter [FolioVision](https://wordpress.org/support/users/foliovision/)
 * (@foliovision)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/https-bug-fix/#post-3351317)
 * Hello mbrsolution,
 * sure, I’m closing it now. I’m glad if we helped to improve the plugin.
 * Thanks,
    Martin
 *  [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/https-bug-fix/#post-3351318)
 * Hello FolioVision,
 * It is a pleasure to have someone like yourself helping out and improving the 
   plugin.
 * We all appreciate it very much.
 * Kind regards

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘HTTPS bug fix’ is closed to new replies.

 * ![](https://ps.w.org/hyper-cache/assets/icon-256x256.png?rev=3452725)
 * [Hyper Cache](https://wordpress.org/plugins/hyper-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hyper-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hyper-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/hyper-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hyper-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hyper-cache/reviews/)

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)

 * 5 replies
 * 2 participants
 * Last reply from: [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/https-bug-fix/#post-3351318)
 * Status: resolved