|
-
December 5th, 2008, 04:51 AM
#1
[RESOLVED] Getting Error :- 404
Hello Everyone,
I am working on client server application.
i am Using HttpSendRequest() function with passing headers as the parameters.
I am getting Error 404.
Code snipet :-
nResult = HttpSendRequest(m_hInternet, headers,
wcslen(headers),szHeader,wcslen(szHeader));
headers :- wsprintf(headers,TEXT("Content-Type: %s\r\nContent-Length:
%d\r\nAccept-Encoding: deflate\r\nUncompressed-Content-Length: %d\r\nContent-Encoding: deflate"),
SYNCML_CONTENT_TYPE,&dwOptionalLength,&dwOptionalLength);
PWSTR szHeader = L"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><SyncML><SyncHdr>
<VerDTD>1.1</VerDTD><VerProto>SyncML/1.1</VerProto><SessionID>1</SessionID>
<MsgID>1</MsgID><Target><LocURI>http://192.168.179.164:8080/funambol/ds</LocURI></Target><Source>
<LocURI></LocURI></Source><Cred><Meta>
<Type xmlns=\"syncml:metinf\">syncml:auth-basic</Type></Meta><Data>ZZ3Vlc3Q=</Data></Cred><Meta>
<MaxMsgSize>250000</MaxMsgSize>
<MaxObjSize>4000000</MaxObjSize></Meta><SyncHdr><SyncBody><Final/></SyncBody></SyncML>";
Can anyone suggest what i am doing wrong.
Any more information needed tell me.
Thanks in advance.
-
December 5th, 2008, 12:37 PM
#2
Re: Getting Error :- 404
well that is the error for url or page not found.
ahoodin
To keep the plot moving, that's why.

-
December 6th, 2008, 05:51 AM
#3
Re: Getting Error :- 404
If i am using 'GET' instead of 'POST' in HttpOpenRequest i am not getting any Error.
I am suspecting that there is a problem in Headers what ever i am sending in sendRequest().
Can anyone tell me where i can find the proper Header information.like <LocURI> what data needs to send? With examples.
-
December 8th, 2008, 12:34 PM
#4
Re: Getting Error :- 404
Problem is Solved.
Header length were wrong
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|