Skip to content

Commit

Permalink
v.1.0.0
Browse files Browse the repository at this point in the history
* node test chat client
* minor fixes and typos
  • Loading branch information
Nikos M committed May 13, 2016
1 parent 601a2ac commit 04d403b
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/RT.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ RT.XHR = function XHR( send, abort ){
if ( XHR.DONE !== xhr.readyState ) return null;
return true===decoded ? xhr._headers : xhr._rawHeaders;
};
xhr.getResponseHeader = function( key ) {
xhr.getResponseHeader = function( key, lowercased ) {
if ( (null == key) || (XHR.DONE !== xhr.readyState) ) return null;
var headers = xhr._headers || {};
if ( false !== lowercased ) key = key.toLowerCase( );
return headers[HAS](key) ? headers[key] : null;
};
xhr.dispose = function( ) {
Expand Down Expand Up @@ -209,9 +210,14 @@ RT.XHR.create = isXPCOM
if ( null != payload )
{
payload = String( payload );
$hr$.setHeader( 'Content-Length', payload.length.toString() );
$hr$.setHeader( 'Content-Length', String(payload.length) );
$hr$.write( payload );
}
/*else
{
$hr$.setHeader( 'Content-Length', '0' );
$hr$.write( '' );
}*/
$hr$.end( );
},
function( ) {
Expand Down
Loading

0 comments on commit 04d403b

Please sign in to comment.