Hi!
I try to connect to SSL + Basic HTTP Auth sites, for example : https://mail.google.com or https://api.del.icio.us When I try : | conn | conn := SSLSocket newConnectionAddress: (NetNameResolver addressForName: 'mail.google.com') port: 443 I obtain a socket with state: SSLConnectionClosed. With sites that do not require HTTP Basic authentication : | conn | conn := SSLSocket newConnectionAddress: (NetNameResolver addressForName: 'www.usaa.com') port: 443 I obtain a SSLSocket with state: SSLConnectionConnected. But don't we need an open socket in order to send the request with the authentication data in the header ? In fact, inside the HttpsSocket>>httpsGetDocumentFromUrl: url args: args accept: mimeType request: requestString we find: sock := HttpsSocket new. sock connectTo: serverAddr port: connectToPort. (sock waitForConnectionUntil: (Time millisecondClockValue + (10000) truncated)) ifTrue: [ sock sendCommand: 'GET ', page, ' HTTP/1.0', String crlf, (mimeType ifNotNil: ['ACCEPT: ', mimeType, String crlf] ifNil: ['']), 'ACCEPT: text/html', String crlf, "Always accept plain text" requestString, "extra user request. Authorization" 'Host: ', serverName, ':', port printString, String crlf. etc.etc. with the possibility to put the authentication header inside the requestString. Has someone any idea how to solve this problem? Thank you. pep |
I hate to say it but I'm getting even worse behaviour. For HTTPS sites that don't require HTTP auth at all, they also fail.
For instance: 'https://www.amazon.com' asUrl retrieveContents content Printit yields: 'error occured retrieving https://www.amazon.com/: Server www.amazon.com is not responding' Ditto for lots of other sites, such as Google. Interestingly, it still works for *some* of the examples from the SSL Workspace provided with the SSL package (https://investing.schwab.com/ and 'https://www.usaa.com') but not others. This implies some sort of cipher or protocol the SSL suite doesn't support. This is pretty bad for us, as we need to do some stuff for a client that involves XML-RPC calls to an SSL server, which I've just discovered doesn't work with the SSL package :( Cheers, Simon On 20 Feb 2009, at 12:57, Pierre-Edouard PORTIER wrote: Hi!
ü Consider your responsibility to the environment - think before you print! Pinesoft Limited are registered in |
Free forum by Nabble | Edit this page |