For those who were excitedly following my datacash dilemna (probably only dom) you may be pleased to know that I have solved it. :)
Ending up having to recreate the entire environment on my local machine so I could then packet sniff the HTTP connection I found the only difference between the programatic request (that failed) and the web page request (that succeeded) was that the web page one had "Content-Type: application/x-www-form-urlencoded" in it. On finding the bit of the API that added this in to my program it would now appear to work.
I guess my main problem was that the test program I was running against obviously is a bit more clever than the datacash one (open source in better than closed code shocker) and so if the content type is not present it assumes or does clever recognition things.
Anyway, the upshot of it is that after a nice bit of packet sniffing I found the root cause and just have to change the source code properly (I just hacked together test code just now so I need to check that the changes I made are decent).
I have to say I think that it also helped to take a bit of time away from the problem since I seemed to be going round in circles before. Thanks also to Dom for helping me get my thoughts straight. Most helpful. :)
Ending up having to recreate the entire environment on my local machine so I could then packet sniff the HTTP connection I found the only difference between the programatic request (that failed) and the web page request (that succeeded) was that the web page one had "Content-Type: application/x-www-form-urlencoded" in it. On finding the bit of the API that added this in to my program it would now appear to work.
I guess my main problem was that the test program I was running against obviously is a bit more clever than the datacash one (open source in better than closed code shocker
Anyway, the upshot of it is that after a nice bit of packet sniffing I found the root cause and just have to change the source code properly (I just hacked together test code just now so I need to check that the changes I made are decent).
I have to say I think that it also helped to take a bit of time away from the problem since I seemed to be going round in circles before. Thanks also to Dom for helping me get my thoughts straight. Most helpful. :)
(no subject)
Date: 2002-07-09 09:15 am (UTC)(no subject)
Date: 2002-07-09 01:49 pm (UTC)So... are you king now ?
(no subject)
Date: 2002-07-09 02:39 pm (UTC)I probably wouldn't have found it on my own. The fact was though that it worked perfectly from the web browser but not from the program so the only way I could find out what difference existed was to look at what data they were sending.
And I dare say you could access the header if you wanted to. You certainly *should* be able to but I dare say in most cases you either a) assumed the incoming format or b) had a pre-written module to put the form elements into a dictionary or hash or whatever it might be called.