Fix and add some minor changes to XML extSource

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