From: Dion O. <dol...@us...> - 2005-11-15 11:48:16
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17135/magicajax/Core Modified Files: AjaxCallHelper.cs MagicAjax NET 2.0.csproj MagicAjaxModule.cs Log Message: Code-changes to use SHA1-hashcode for comparing last generated Html with current generated Html. This saves lots of server memory. Also, the 'NoStore' mode doesn't have to use Session anymore to store it's Html data, but instead uses hidden fields on client (so it's now really 'NoStore'). Index: AjaxCallHelper.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/AjaxCallHelper.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AjaxCallHelper.cs 14 Nov 2005 18:50:43 -0000 1.1 --- AjaxCallHelper.cs 15 Nov 2005 11:47:52 -0000 1.2 *************** *** 25,28 **** --- 25,30 ---- using System.Web.UI; using System.Collections; + using System.Security.Cryptography; + using System.Text; namespace MagicAjax *************** *** 275,278 **** --- 277,293 ---- return url; } + + /// <summary> + /// Create a base64 encoded SHA1 sum string of an input string + /// </summary> + /// <param name="str"></param> + /// <returns></returns> + static public string GetBase64SHA1Sum(string input) + { + byte[] inputBytes = UnicodeEncoding.Default.GetBytes(input); + byte[] hashedBytes = new SHA1CryptoServiceProvider().ComputeHash(inputBytes); + return Convert.ToBase64String(hashedBytes); + } + #endregion Index: MagicAjax NET 2.0.csproj =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjax NET 2.0.csproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MagicAjax NET 2.0.csproj 15 Nov 2005 00:30:53 -0000 1.3 --- MagicAjax NET 2.0.csproj 15 Nov 2005 11:47:52 -0000 1.4 *************** *** 35,39 **** <ConfigurationOverrideFile> </ConfigurationOverrideFile> ! <DefineConstants>TRACE;DEBUG;NET_2_0;CLIENTSIDE_PANELSTATE</DefineConstants> <DocumentationFile> </DocumentationFile> --- 35,39 ---- <ConfigurationOverrideFile> </ConfigurationOverrideFile> ! <DefineConstants>TRACE;DEBUG;NET_2_0</DefineConstants> <DocumentationFile> </DocumentationFile> Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MagicAjaxModule.cs 15 Nov 2005 00:30:53 -0000 1.6 --- MagicAjaxModule.cs 15 Nov 2005 11:47:52 -0000 1.7 *************** *** 434,453 **** } - #if CLIENTSIDE_PANELSTATE - //store hash-states of panel controls - foreach (string key in _context.Items.Keys) - { - if (key.StartsWith("__PANELCONTROLSTATE_")) - { - string keyValue = (string)_context.Items[key]; - if (_request[key] != keyValue) - { - //update - AjaxCallHelper.WriteSetFieldScript(key, keyValue); - } - } - } - #endif - #if NET_2_0 // Check if this request is to add/remove/replace a WebPart --- 434,437 ---- |