[ic] To force an http 200 Ok

Gert van der Spoel ic at 3edge.com
Wed Aug 31 11:58:34 EDT 2005


Marco Mescoli writes: 

>> 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.
> 
> 1) I cannot figure how is it implementable
> 2) Good idea. Tested but the http client of sms-machine is raw and not
> follow meta refresh. 
> 
> My DIRTY UGLY solution: my IC page sms-send is called with looping unix
> command line wget
> and inside of this page i test the database for new incoming sms and when
> there is a new one
> i post to the sms-machine the outgoing sms.
> Now i test it better but, for now, seems work. 
> 
> The problem is my ignorance in perl language, it is not the best solution
> use IC tags
> or scripting languages triggered from http client to solve these problems. 
> 
> Thanks to all.

In a previous question you had asked about the post action from within an IC 
page .... Was this question related to the same issue of trying to receive 
data from the sms-machine and after processing it in the database sending 
back data? 

Too bad the meta trick didn't work ... There is probably a nicer way with 
some ITL and Perl to make it work using only one page. Is there a particular 
reason why you want to use IC to perform this job instead of writing a 
separate (perl) script which uses things like LWP::Useragent, DBD::mysql to 
do the job? Just curious :) 

Anyway at least you found something that works. Perfecting it is of less 
priority ;) 

CU, 

Gert 




More information about the interchange-users mailing list