[JDEV] HELP!!!!

Max Horn max at quendi.de
Mon May 21 08:31:11 CDT 2001


<snip>

>Everything is fine up to this. Then i send the
>following packet
>
>PUT http://hostname:5222/ HTTP/1.0
>Content-Length: 143
>User-Agent: test
>Host: hostname:5222
>
><iq type="set" id="01"><query
>xmlns=\"jabber:iq:auth\"><username>xxx</username><password>xxx123</password><resource>rrr</resource></query></iq>
>
>
>Here i'm not getting any respone from the
>server.Getting hanged up.
>
>What is the problem??Is there any problem in server
>set up or i'm sending wrong request to server??I have
>also tried without the put header for the above
>request.But the same problem.Any one have any idea??Pl
>help me

The problem is, you are sending another HTTP request on a new socket, 
which is wrong.

You are supposed to keep open the socket that you used to transmit 
the initial data; and then, once you send & received the HTTP stuff, 
you just treat it like a completly normal socket as used for 
non-proxy Jabber communication.

To be more concret, after the initial connect, you should *not* close 
the socket, and transmit the iq:auth over it, so just send:

<iq type="set" id="01"><query
xmlns=\"jabber:iq:auth\"><username>xxx</username><password>xxx123</password><resource>rrr</resource></query></iq>




HTH,

Max
-- 
-----------------------------------------------
Max Horn
C++/ObjC/Java Developer

email: <mailto:max at quendi.de>
phone: (+49) 6151-494890



More information about the JDev mailing list