In regards to the recent threads about the fact that whenever we call ExpandTemplate(), it calls ContentTypeHeader() by default which adds a header. Thus, this is causing a problem if you call ExpandTemplate() a second time as another header will be added.
The workaround is this. Create a class such as the following one. When calling ExpandTemplate(), pass that header if you don't want ExpandTemplate() to create another one when it is calling ContentTypeHeader().
lcHtml=...
loHeader=CREATEOBJECT('ExpandTemplateHeader')
lcHtml=lcHtml+Response.ExpandTemplate(gcClientFat+tcTemplate,loHeader)
DEFINE CLASS ExpandTemplateHeader AS RELATION
lPassedHTMLObject=.F.
FUNCTION GetOutput()
RETURN ''
ENDFUN
ENDDEFINE