You are reading a single comment by @samppa and its replies. Click here to read the full conversation.
  • One difficulty is that on client side ajax I cannot make HTTP request with "Connection:Close" headers since they are forced to keep-alive.

    Here is my client side request function:

    var xhr;
    function httpGetAsync(theUrl, jsonpcb, ok, err) {
    	if (xhr && xhr.readyState != 4) {
    		xhr.abort();
           }
    	xhr = jQuery.ajax({
           type:'GET',
    	   headers: {Connection: close}, // No effect
           url:theUrl,
           cache:false,
    	   timeout: (60000),
    	   jsonpCallback: jsonpcb,
    	   crossDomain: true,
    	   dataType: 'jsonp',
           error: err,
           success: ok,
    	   beforeSend: function( xhr, settings ) {
             xhr.setRequestHeader( "Connection", "close" ); // No effect
    		 settings.headers = {Connection: close}; // No effect
           }
        });
    }
    

    But still in wireshark I can see the request has "Connection : Keep-alive" in HTTP headers.

About

Avatar for samppa @samppa started