Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
Content Disposition Header in an HTTP response is not retrieved properly (Known Issue)
S60 5th Edition
When downloading attachments, the name of the attachment can be found by reading the header HTTP::EContentDisposition in the HTTP response. However, in S60 5th Edition devices, the header cannot be read fully and only a partial header string is retrieved.
How to reproduce
The WebClient application available in the SDK can be used to download an attachment and the following code snippet can be used to read the EContentDisposition header once the HTTP response is received.
void CWebClientEngine::MHFRunL( RHTTPTransaction aTransaction,
const THTTPEvent& aEvent )
switch ( aEvent.iStatus )
RHTTPResponse resp = aTransaction.Response();<br>
RHTTPHeaders hdr = resp.GetHeaderCollection();
RStringPool strP = iSession.StringPool();
RStringF contentDisp = strP.StringF(HTTP::EContentDisposition, RHTTPSession::GetTable());<br>
TInt err = headers.GetField(contentDisp, 0, tempHdrVal);
if (err == KErrNone)
RStringF field = tempHdrVal.StrF();
const TDesC8& fieldValDesC = field.DesC(); //the buffer fieldValDesC<br> //doesn't contain the entire header information
Expected Result: The descriptor fieldValDesC, in the above code, should contain the entire header information, including the attachment name.
Actual Result: The descriptor fieldValDesC contains only partial information and doesn't contain the attachment name.
No Known Solution.