[TYPO3-v4] ExtDirect Exceptions using HTTPS

Steffen Gebert steffen at steffen-gebert.de
Sat Jan 15 16:46:35 CET 2011


Hi,

I already talked to Stefan and we agreed that the Exception handling has 
to be improved a bit.

I always encounter an ExtDirect Exception "Unable to connect to server" 
in one installation directly after accessing the backend (thus unusable).

Who else has this problem? Funny thing: It only happens when using 
HTTPS. Plain-text works...

I investigated a bit (EDIT: while writing this..), it's in the 
ExtDirect.StateProvider.js. Minor thing is the log entry in the console 
"response is undefined". That's because of this code:

 > TYPO3.ExtDirectStateProvider.ExtDirect.getState(o, function(response, 
options) {
 >   if (response.success) {
 >     this.onReadSuccess(response, options);
 >   } else {
 >     this.onReadFailure(response, options);
 >   }

Reason:
Ext.direct.RemotingProvider::onData()
gives e as argument, to the getState() callback, but does not define the 
field response:
 > var e = new Ext.Direct.ExceptionEvent({
 >   data: e,
 >   transaction: t,
 >   code: Ext.Direct.exceptions.TRANSPORT,
 >   message: 'Unable to connect to the server.',
 >   xhr: xhr
 > })

However, I was not able to find out, why the ExtDirect call returns 
13030 as HTTP status and thus fails until now (as I only looked to the 
XHR tab).

Now the main issue:
===================
Accessing with HTTPS, there are other requests made by ExtDirect:
OPTIONS (not GET or POST) calls to ajax.php using HTTP (not HTTPS!), 
which have are answered with status code 303 See Other (because I'm not 
logged in for unencrypted BE access - Location header directs to /typo3/).

I don't know, why ExtDirect does this. Anybody knows? Googling for 
"ExtDirect OPTIONS" leads my to the TYPO3 Wiki (seems like good content ;-))

The request is:
http://example.com/typo3/ajax.php?ajaxID=ExtDirect::route&namespace=TYPO3.ExtDirectStateProvider

Headers are attached

Feedback welcome!

Kind regards
Steffen

-- 
Steffen Gebert
TYPO3 Core Team Member

Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: response.txt
URL: <http://lists.typo3.org/pipermail/typo3-project-v4/attachments/20110115/c86e0b8f/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: request.txt
URL: <http://lists.typo3.org/pipermail/typo3-project-v4/attachments/20110115/c86e0b8f/attachment-0001.txt>


More information about the TYPO3-project-v4 mailing list