The INetLibURLCrack function tries to very intelligently break apart URLs,
but it is clearly a little buggy. Presumably, GETs with URL encoded
variables was not really fleshed out. Most PQAs POST a form, then use
simple GETs. As to the exact breakdown, if you have CW6 you can actually
have a look at the source for INetLibURLCrack. In a CW project, add
INet.LIB from \<CW6 base>\Palm VII Support\Libraries. Then right click on
INet.lib in your project and select Disassemble. You'll get a 68000
assembly listing of the module. If you search for INetLibURLCrack, you'll
get a few hits, then the actual function. It is pretty straight forward,
with lots of calls to Str functions. This very well may not match the
production VII roms, but when I looked at it awhile back the code in the LIB
matched a problem I was seeing on a real VII.
I'm not sure how 'safe' the error is. Reading past the end of a block is
safer than writing past the end of the block, but neither is desirable. You
could probably avoid the problem all together by doing a POST instead of a
GET. However, instead of URLOpen you would need to make a number of calls.
Let me know if you need a sample.
-jjf
-----Original Message-----
From: Khanh Tran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 13, 2000 4:39 PM
To: Palm Developer Forum
Subject: RE: Question about INetLibURLOpen
Thanks for the suggestion Joe! It's true that the problem goes away with
most URL's. But there's one strange thing that I still can't figure out.
Here are some URL's that I've tried:
http://myserver.com/somepath?variable1=800-429-5955&variable2=303-555-6666
http://myserver.com/somepath?variable1=800-429-5955&variable2=abcdefghigkl
http://myserver.com/somepath?variable1=abcdefghigkl&variable2=303-555-6666
The 1st request is what the server expects (it simply sends the 2 phone
numbers in a GET request). Yet the INetLibURLOpen call spits the memory
manager error when executed (although the request went through okay like I
mentioned before).
The 2nd & 3rd requests however get executed with no problem. After trying
several combinations, I saw a pattern where the error would occur if there
are more than a certain number of digits in the request! This makes no
sense to me at all. Would somebody have any idea of what's happening here??
Thanks so much!
Khanh.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Fitzpatrick, Joe
Sent: Wednesday, July 12, 2000 5:57 PM
To: Palm Developer Forum
Subject: RE: Question about INetLibURLOpen
The INet 'Crack URL' routine sometimes gets fooled and reads past the end of
the string. See if the problem goes away with a complete and non-ambiguous
URL (ex. http://www.myserver.com/index.html).
Good Luck,
-jjf
-----Original Message-----
From: Khanh Tran [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 12, 2000 4:39 PM
To: Palm Developer Forum
Subject: Question about INetLibURLOpen
Hi all!
I've been getting an error after issuing the INetLibURLOpen call, I hope
someone who's seen the same thing can help me out. After I step through
this call in the debugger:
INetLibURLOpen (inetInfoBlock.inetRefNum,
inetInfoBlock.inetHan,
(BytePtr) myRequest,
NULL, // don't need to index in cache
&inetInfoBlock.inetSockH,
-1,
flags);
it came back with the following error:
"(The program) has just read directly from memory manager data structures."
However the program did go on and sent out the URL request, and the response
coming back from the socket looks correct too. I did check all the
parameters to make sure there's no memory issue with any of them.
I'm really baffled as what might be the cause to this problem. Any light
you can shed on this will be greatly appreciated.
Thanks so much!
Khanh Tran.
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/