Fixing defect 318, 319 - added null check for content, and wrapped HTTP

Client with SSL.