فهرست منبع

Fix for first connection with keep-alive hanging.

mingodad 12 سال پیش
والد
کامیت
d3fbdc8636
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      SquiLu-ourbiz/ourbiz-client.nut

+ 5 - 1
SquiLu-ourbiz/ourbiz-client.nut

@@ -157,6 +157,10 @@ class HTTPConnAuthBase extends HTTPConnBase
                     else str = "x-www-form-urlencoded";
                     else str = "x-www-form-urlencoded";
                     putheader("Content-Type", str);
                     putheader("Content-Type", str);
                 }
                 }
+		
+		//without line bellow for now it takes to long for the first connection
+		putheader("Connection", "close");
+		
                 if(_digest_auth->okToAuthDigest())
                 if(_digest_auth->okToAuthDigest())
                     putheader("Authorization", _digest_auth->auth_digest(method, uri));
                     putheader("Authorization", _digest_auth->auth_digest(method, uri));
                 putheader("Content-Length", bodysize || 0);
                 putheader("Content-Length", bodysize || 0);
@@ -164,7 +168,7 @@ class HTTPConnAuthBase extends HTTPConnBase
                 if(body && bodysize) send( body, bodysize );
                 if(body && bodysize) send( body, bodysize );
                 while( outstanding() )
                 while( outstanding() )
                 {
                 {
-                    if(globals.get("Fl", false)) Fl.check();//check_idle();
+                    if(globals.rawget("Fl", false)) Fl.check();//check_idle();
                     pump();
                     pump();
 		    //os.sleep(0.01);
 		    //os.sleep(0.01);
                 }
                 }