PDA

View Full Version : [Solved] - Form submission fails when using HTTPS



Yvanlefou
11 Jan 2012, 2:55 PM
Hello,

I'm testing sencha touch to write a web application for iOS and Android mobiles. The web server where the application is deployed runs under tomcat 6 with HTTPS protocol activated.

So i'm encountering a very special problem on my iPhone 4 : when a form is submitted via https everything works fine. But if I close Safari and open it again, the form submission will fail and always return a http status code 0.

If I want to submit the form again, I have to clean Safari's cache.

The same operation done but using http protocol won't cause any problem. I can quit and relaunch Safari without any problem.

I made complementary tests using Chrome and Safari. Both work fine when using https protocol.

It seems that https network cause Safari mobile and/or sencha crash ...

Has someone encountered a similar problem ? Have you any idea ?

Thanks for your help.

Best regards.

Sameer Khan
11 Jan 2012, 11:34 PM
you r doing form submission right...Here which form u r using? i mean javascript dynamic form or sencha form submit...If u call form.submit() on dynamic javascript form, it will work fine...But if n/w is low then it fails bcz there is no exception handling on it...

I want to know how u r doing form submission...

Yvanlefou
12 Jan 2012, 1:37 AM
I'm using sencha touch Ext.form.FormPanel with ajax submission.

The submit is trigerred by the submit method : myform.submit({method:'POST'});

Thanks for your answer

Yvanlefou
15 Jan 2012, 5:35 AM
I looked a bit why form submission didn't work when safari is relaunched. It's very strange : when the form is submitted, some TCP packets are exchanged between iPhone and Tomcat. But these packets don't trigger any action on tomcat ...


I finally found a workaround. I construct the Sencha form with attribute standardSubmit=true. The submition is then succesfull on http and https protocol even when safari is relaunched.


Thanks for your help.