Fix and add some minor changes to XML extSource

 - xml extSource can send html header if it is set in configuration
 - fix closing of SSL connection