Hi All,
I'm trying to POST some multipart form data to my server using a Browser Control.
The PostUrlL();
Method Panics with KERN-EXEC 3
as soon as it is invoked.
Here's a snippet similar to the one I'm using in my code.
// These LITerals are copied to pointer vars below
_LIT8(K_txt_Boundary, "0xABeR1122EEFFx0");
_LIT8(K_CT_MultipartFormData,"multipart/form-data");
HBufC *url = HBufC::NewL(URL_SIZE);
HBufC8 *contentType = HBufC::NewL(CONTENT_TYPE_SIZE);
HBufC8 *bufPostData = HBufC::NewL(POST_DATA_SIZE);
HBufC8 *boundary = HBufC::NewL(BOUNDARY_SIZE);
// Check allocation was successful
// and copy required data to allocated space.
TAny *any = NULL;
TRAPD(error, iBrowser->PostUrlL(
*url,
*contentType,
*bufPostData,
boundary,
any)
);
iBrowser
, the browser control handle is created as follows:
I'm ommiting error checking, but I do TRAP the function call within which the following snippet is placed.
iBrowserCapabilties = TBrCtlDefs::ECapabilityDisplayScrollBar
| TBrCtlDefs::ECapabilityLoadHttpFw
| TBrCtlDefs::ECapabilityGraphicalHistory
| TBrCtlDefs::ECapabilityGraphicalPage
| TBrCtlDefs::ECapabilityClientResolveEmbeddedURL
| TBrCtlDefs::ECapabilityCursorNavigation
| TBrCtlDefs::ECapabilityClientNotifyURL;
iBrowserObserver = CBrowserObserver::NewL(this);
iBrowser = CreateBrowserControlL(
iAppView,
aRect,
iBrowserCapabilties,
TBrCtlDefs::ECommandIdBase,
NULL, // Soft keys
iBrowserObserver, // Link Resolver
NULL,
NULL // Layout change
);
iBrowser->SetBrowserSettingL(TBrCtlDefs::ESettingsCookiesEnabled, ETrue);
I've cross checked to see if any of the pointer vars are NULL by logging their contents, they all seem to be fine, except for the any pointer which is intentional. (The document says it's reserved for future use, so I believe NULL should be an appropriate value).
I've also verified that iBrowser
is a valid instance of a browser control. As mentiond above, I'm TRAP
ing the function which contains the code to create the browser control
The call PostUrlL();
fails with panic KERN-EXEC 3
.
Any pointers, suggestions or alternatives are welcomed.
Thanks,
xk0der