Converted direct use of http module to conditional http or https
Merge pull request #1 from dlkinney/FixAttachmentsOnHTTPSURLs

Converted direct use of http module to conditional http or https