Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

I have a peculiar problem using the IWeb pointer on the VX4400 and T720 (BREW 1.1). The same code works fine on VX6000 (BREW 2.0). The current problem appeared after I applied a workaround indicated in:
http://brewforums.qualcomm.com/showthread.php?s=&threadid=1398
Quote:There is a know issue with some handsets where certain length requests cause the first part
of the request to be dropped, which results in an HTTP protocol error.
Basically, I was getting a HTTP response code of 400 (BAD REQUEST) when I was doing a GET request on only one particular URL and so I applied the workaround. My IWEB_GetResponse now looks like:

IWEB_GetResponse(m_pIWeb, (m_pIWeb, &m_pIWebRsp, &m_callback, m_pszUrl,
WEBOPT_USERAGENT,"test app (v 1.0)\r\n"FOO_HEADERS_536_OR_SO_PAD, // the macro definition is at the end of this post
WEBOPT_METHOD, "GET",
WEBOPT_STATUSHANDLER, WebStatusNotification,
WEBOPT_END));

However, with the new code, every now and then I get a response code of -1291, which maps to
WEB_ERROR_RECV (WEB_ERROR_BASE+11) /* error reading from socket */

Any idea what could be happening? I tried adding WEBREQUEST_NOKEEPALIVE as an option, having a single IWeb pointer, having a new IWeb pointer for every request... but all with the same result.

Thanks in advance,
Roshan

#define FOO_HEADERS_536_OR_SO_PAD \
"x-00: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-01: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-02: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-03: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-04: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-05: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-06: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-07: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-08: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-09: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-0A: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-0B: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-0C: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-0D: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-0E: 0123456789ABCDEF0123456789ABCDEF\r\n"\
"x-0F: 0123456789ABCDEF0123456789ABCDEF"

I have to to add that I get the same problem. Error -1291.
Tried everything as you did, single IWEB, Destroy and recreation of IWEB for every request. I even tried a different URL and with no succes.
That is quite a problem.
If you managed to solve this problem by now I would be thankfull if you sure.
Thanks in advance.
Guy

I have to to add that I get the same problem. Error -1291.
Tried everything as you did, single IWEB, Destroy and recreation of IWEB for every request. I even tried a different URL and with no succes.
That is quite a problem.
If you managed to solve this problem by now I would be thankfull if you sure.
Thanks in advance.
Guy

Well... I tried again the adding of the above text to the WEBOPT_USERAGENT section and it solved the problem!
Does any one have an idea why?

Well... I tried again the adding of the above text to the WEBOPT_USERAGENT section and it solved the problem!
Does any one have an idea why?

Hi,
I am working on V710 which is a BREW 2.1 phone.
At most time, networking is working well
of course I also did IWeb release and init in each network request as you guys did
and added the strange user agent string in my IWeb,too.
But occasionaly, it returned -1292,
according to doc,
it's #define WEB_ERROR_BADRESPONSE (WEB_ERROR_BASE+12) /* mal-formed headers */
Does the patch make side effect?
Or BREW 2.1 has its special patch for IWeb problem.
Thanks in advance here
Rayman

Hi,
I am working on V710 which is a BREW 2.1 phone.
At most time, networking is working well
of course I also did IWeb release and init in each network request as you guys did
and added the strange user agent string in my IWeb,too.
But occasionaly, it returned -1292,
according to doc,
it's #define WEB_ERROR_BADRESPONSE (WEB_ERROR_BASE+12) /* mal-formed headers */
Does the patch make side effect?
Or BREW 2.1 has its special patch for IWeb problem.
Thanks in advance here
Rayman

The user agent hack is not specific to any version of BREW; it is designed to get around a flaw in the underlying chip software. Do you know what chipset is in the v710?

The user agent hack is not specific to any version of BREW; it is designed to get around a flaw in the underlying chip software. Do you know what chipset is in the v710?

V710 has MSM6100.

V710 has MSM6100.

1) v710 should not require the user agent hack since the underlying chipset software was fixed relatively early in the 6100 release cycle.
2) WEB_ERROR_BADRESPONSE is not related to the user agent hack. This error indicates that IWeb was unable to read valid HTTP headers in the response. This could be due to a buggy server or a dropped TCP connection. Sniffing the TCP packets at the server will be the fastest way to debug this further.

1) v710 should not require the user agent hack since the underlying chipset software was fixed relatively early in the 6100 release cycle.
2) WEB_ERROR_BADRESPONSE is not related to the user agent hack. This error indicates that IWeb was unable to read valid HTTP headers in the response. This could be due to a buggy server or a dropped TCP connection. Sniffing the TCP packets at the server will be the fastest way to debug this further.