MHFRunL() fails with -7361
| Thu, 2006-04-20 17:13 | |
|
Hi ,
I am calling a URL with an HTTP connection . However , the MHFRunL fails with status code -7361 . In httperr.h it refers to KHTTPErrorBase . The URL I pass is of the form : http://www.hostname.com/somefile.txt How do I fix this error ? Thanks a lot ![]() |
|







Forum posts: 1
Hi,
I struggled with MHFRunL failing with status code -7360. It turned out that I hadn't set the "Content-Type" in the HTTP header. Adding the following line solved the problem:
SetHeaderL(hdr, HTTP::EContentType, KContentMimeType);The above post's reference to httperr.h lead me to the solution. In httperr.h -7360 is defined as:
const TInt KErrHttpEntityHeaderMissingContentType = KErrHttpMissingHeaderBasewhere:
const TInt KHttpErrorBase = -7200;const TInt KErrHttpMissingHeaderBase = KHttpErrorBase - 160
Hope this saves time for someone in the future.
BTW -7361 is defined as:
const TInt KErrHttpGeneralHeaderMissingHost = KErrHttpMissingHeaderBase - 1;Forum posts: 82
Hi
Go to this link:
http://www.newlc.com/Symbian-OS-Error-Codes.html
You will find all error codes...
In your case:
KErrHttpGeneralHeaderMissingHost -7361 The request URI was relative, but no Host header was set to indicate a server to connect to
You have not set the host header....
In you IssueHTTPGetL and IssueHTTPPostL, have this line:
SetHeaderL(hdr, HTTP::EHost,uri.Extract(EUriHost));
alongwith other SetHeader calls you are making...It will solve the problem...
Br
Gurpreet
www.mobisy.com