From 3a3daead74927c1871d0dac4bf1df75a8d1ea4dc Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 23 Nov 2011 16:18:53 +0100 Subject: [PATCH] mshtml: Added nsIChannel::SetContentCharset implementation. --- dlls/mshtml/nsio.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 59f9c2fb937..faf40ed15f9 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -802,10 +802,19 @@ static nsresult NSAPI nsChannel_SetContentCharset(nsIHttpChannel *iface, const nsACString *aContentCharset) { nsChannel *This = impl_from_nsIHttpChannel(iface); + const char *data; + char *charset; - FIXME("(%p)->(%s)\n", This, debugstr_nsacstr(aContentCharset)); + TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aContentCharset)); - return NS_ERROR_NOT_IMPLEMENTED; + nsACString_GetData(aContentCharset, &data); + charset = heap_strdupA(data); + if(!charset) + return NS_ERROR_OUT_OF_MEMORY; + + heap_free(This->charset); + This->charset = charset; + return NS_OK; } static nsresult NSAPI nsChannel_GetContentLength(nsIHttpChannel *iface, PRInt32 *aContentLength) -- 2.11.4.GIT