You Are Here:

Community: Wiki

This page was last modified on 23 June 2009, at 13:07.

KIS001442 - Content Disposition Header in an HTTP response is not retrieved properly

From Forum Nokia Wiki



ID KIS001442 Creation date June 23, 2009
Platform S60 5th Edition Devices Nokia 5800 XpressMusic
Category Symbian C++ Subcategory Networking


Keywords (APIs, classes, methods, functions): HTTP Headers, EContentDisposition


Description

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 )
{
case THTTPEvent::EGotResponseHeaders:
{
RHTTPResponse resp = aTransaction.Response();<br>
RHTTPHeaders hdr = resp.GetHeaderCollection();
RStringPool strP = iSession.StringPool();
RStringF contentDisp = strP.StringF(HTTP::EContentDisposition, RHTTPSession::GetTable());<br>
THTTPHdrVal tempHdrVal;
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
field.Close();
}
contentDisp.Close();
}
break;

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.

Solution

No Known Solution.

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia