[ic] To force an http 200 Ok

Gert van der Spoel ic at 3edge.com
Tue Aug 30 15:21:57 EDT 2005

Marco Mescoli writes: 

>> Please describe you real problem. Page accesses usually result in HTTP
> status
>> code 200, unless there is an internal server error or [bounce] etc. 
>> Bye
>> Racke
> Real problem: a sms-machine (send & receive short messagge service) call > my pages with an http post to store sms in mysql (store-sms).
> I must process the input stored sms and put the answer via sms with an 
> http post (send-sms) to the sms-machine.
> If i try the single operation (store-sms) or (send-sms) separately from 
> ic pages all goes well but if  i put all in the same page the 
> sms-machine wait for the "http 200 ok" (ethereal debug) storing more 
> times the same input sms and without sending the sms-answer. 
> No results using http redirect (bounce[]).

If I understand correctly you have the following scenario:
1- script posts data to IC page  (store-sms)
2- IC page receives data and puts it in a database  (store-sms)
3- IC site posts data to script (send-sms) 

The problem is that (1) is waiting for a 200 OK, but in the mean time you 
are trying to post data back and (3) and that is again waiting for a 200 OK 
from the SMS server end. 

The [bounce] tag is not going to work because it sends a 302 back.
[tag op=header] does not work in combination with [bounce]. 

I can think of the following solutions:
1) integrating the store and send process so they are one item and not 
having to wait for eachother. i don't know enough about your set up to know 
if this would be feasible. 

2) have you considered using a meta refresh:
1- script posts data to IC page: storesms.html  (store-sms)
<META HTTP-EQUIV="Refresh" CONTENT="1;url=/catname/sendsms.html?&f1=[cgi 
name=f1 filter=entities]&f2=[cgi name=f2 filter=entities]"> etc 

and the page contains your store sms routines. Perhaps you should put the 
refresh rate to be longer. This should return a 200 OK

2- sendsms.html contains the send-sms code and it receives the params from 
the smspost so you know where to look for the information you have to be 
sending back. 


More information about the interchange-users mailing list