I just discovered that in Chapter 11 - my code for generating ETags has a bug. The code needs to wrap the ETag in a set of quotes:
string GenerateETag(User u) { byte[] bytes = Encoding.UTF8.GetBytes(u.UserId + u.LastModified.ToString()); byte[] hash = MD5.Create().ComputeHash(bytes); string etag = Convert.ToBase64String(hash); return string.Format("\"{0}\"", etag); }
Comments [0]
Remember Me