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.
@samppa started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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:
But still in wireshark I can see the request has "Connection : Keep-alive" in HTTP headers.