The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 03, 2010, 05:43:16 AM

Login with username, password and session length


Pages: 1 2 [3]
  Print  
Author Topic: XMLHttpRequest, IE6, SSL , and 12030 error - what is the solution?  (Read 21444 times)
bitmap
n00b
*
Offline Offline

Posts: 1


View Profile
« Reply #30 on: April 24, 2008, 08:30:13 AM »

Well, my first post. I hope it's not the last!

I've been searching over the net for the solution of this problem in some places they say it can be solve adding some lines in server ssl.conf. I tried and isn't working either.

I've read all the posts you have in here but I didn't really understand what the solution was. I assume that i have to close the connection but I don't know where to do it

I use this xmlhttprequest file:

----------------------------------
   var request = null;

   function createRequest() {
     try {
       request = new XMLHttpRequest();
     } catch (trymicrosoft) {
       try {
         request = new ActiveXObject("Msxml2.XMLHTTP");
       } catch (othermicrosoft) {
         try {
           request = new ActiveXObject("Microsoft.XMLHTTP");
         } catch (failed) {
           request = null;
         }
       }
     }

     if (request == null)
       alert("Error creating request object!");
   }

--------------------------------------

Should I close the request here or when I make the request like:

        var url ="/blabla.php";
   createRequest();
   request.open("POST",url, true);
   request.onreadystatechange = proceselect1;
   request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
   request.send("random="+Math.random()+"&valor="+x);
   request.setRequestHeader('Connection', 'close');

This is where goes my responseXML.

function proceselect1()
{
    if (request.readyState == 3) {
      

    }
        if (request.readyState == 4)
      {
         if(request.status == 200)
         {
            
            alert("hi);
            var resposta=request.responseXML;
         
            
         }
         else{
               
         }
      }
   
}

Well, my the alert("hi") is working but the responseXML is empty...

Sorry for my english, I'm not used to talk about technical things in english Grin
« Last Edit: April 24, 2008, 10:03:17 AM by bitmap » Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 8744



View Profile
« Reply #31 on: April 24, 2008, 10:40:09 AM »

Hey bitmap, welcome to The Cache.

There really wasn't a clean one-size-fits-all solution to the problem, but what you are referencing was actually a server side thing - it is putting a "Connection: Close" header in the response packet, nothing to do with the client request. This is done in PHP, for example, like this:

header('Connection: close');

BEFORE you send anything back to the client at all - if you send even a single space back first, the header will be ignored.

Give that a shot and please report back... this line of discussion has gone rather quiet since everyone sort of made their own fixes.

/perk
Logged

It's the things you learn after you know it all that really count.
-John Wooden
accutanepharmacyy
n00b
*
Offline Offline

Posts: 1


View Profile
« Reply #32 on: December 13, 2009, 03:50:04 AM »

Bang, Perk's turn. All about a zitless future. Accutaneboi is also banned.
« Last Edit: December 13, 2009, 11:15:39 AM by perkiset » Logged
brouleau
n00b
*
Offline Offline

Posts: 4


Down we go!


View Profile
« Reply #33 on: January 07, 2010, 09:36:54 AM »

Using IE 8 on Vista I still see (quite a lot) of these 1203x error crap.

Here is my header (including a close) and IT STILL FAILS, randomly, and of course I am unable to reproduce.
Code:
xmlHttp.open("POST", newDocumentUrl, false);

xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=utf-8");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");

xmlHttp.send(params);
According to Dragonlaird I am still missing the following line, but I am not sure how it applies to me.
Code:
xmlHttp.setRequestHeader("Content-Disposition: form-data; name='YourAppName'");
When I wrote this piece of code I could not find any reference to it being set on any AJAX tutorial sites (so I am not). Therefore, may be it is what I am missing, but could anyone tells me how (and where to set it) using JavaScript with a series of
Code:
"name=value&name=value...& name=value"
in a string as the outgoing param.

Thanks to yall
Logged

You must learn from the mistakes of others. You can't possibly live long enough to make them all yourself. [Samuel Johnson]
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 8744



View Profile
« Reply #34 on: January 07, 2010, 11:40:05 PM »

See, the real issue to me is that every solution I've run across is a magic method ... a missed special thang. The truth of the matter is that if IE was an abortion of a browser and worked like the others, then it'd not be such an issue. The fact that so many people have tried to get past this and yet no answer seems to be a real bullet, tells me that it's kind of luck.

There's got to be some kind of timing issue in IE that causes this, and it's somehow involved with the Windows loop and the page complexity, the processor burden and network speed. That's why no one can really *perfectly* duplicate the problem either.

I've essentially given up on XMLHTTPRequest for SSL. I use either my XHR method or an iFrame method. PIA and bugs me enormously, but it's not worth the problems that I might encounter in a retail situation.
Logged

It's the things you learn after you know it all that really count.
-John Wooden
Pages: 1 2 [3]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!