[Jwap-info] Re: URL Redirection Header Problems
Brought to you by:
mcdmx,
nikobender
|
From: Domingo M. <dom...@zw...> - 2004-07-07 23:29:30
|
Hi Michel,
Before I wrote to the list I had tested your recomendation:
"if you use the WAPClient class, you can examine the status code provided=
by=20
the "Response" object and if it signals a redirect, take the Location hea=
der=20
and issue another "execute()" call"
The problem is that the Exceptions occur before the Response Object is cr=
eated=20
and therefore, the header information can not be retrieved (which is the =
info=20
needed to implement the "setFollowRedirects"). In fact, the Exceptions oc=
cur=20
before reach s_methodResult_ind(CWSPResult result) and after s_connect_cn=
f()=20
because as you can see it is displayed the text "connected to WAP Gateway=
"=20
but not the associated to the Headers like the length. It seems that the=20
problem is originated in the Class CWSPPDU in the method getPDU:
Class: CWSPPDU
Method: getPDU
-------------------------------------------------
case CWSPPDU.PDU_TYPE_REPLY:
// status=20
long status =3D bin.getUint8();
>>>>>>>>It works fine until here!!!!!!!!!!!!!
// length of header + contenttype
headlength =3D bin.getUintVar();
// decode contenttype
cpos =3D bin.seek(0);
>>>>>>>>>Here it fails. I don't know if headlength and cpos were obtained=
=20
correctly
contenttype =3D getContentType(bin);
----------------------------------------------------
I suggest to test jWAP against the URL http://wap.tmovil.cl which has=20
redirection and is giving problems. If this problem is solved I will crea=
te=20
the method "SetFollowRedirects".
Best Regards,
Domingo Morales.
|