> I have enabled content encoding on my THTTPServer:
> And return content to my client using AnswerString
>      pClientCnx->AnswerString(Flags,
>                               "200 OK",
>                               "application/json",
>                               sResponseHeader,
>                               sResponseBody);
> However if my client includes "Accept-Encoding: gzip" in its 
> request header the OnHttpContentEncode event is not called.

>  if (ContType = '') or (Pos ('text/', ContType) > 0) or (Pos 
> ('xml', ContType) > 0) then begin    { only compress textual stuff }

Not used JSON myself, but I'd guess if it's a compressable response then
'application/json' needs to added to that line so compression is not skipped.


To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to