[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-server-cvs
Subject:    [Server-cvs] log/tmplgpln base_log.cpp,1.47,1.48
From:       dcollins () helixcommunity ! org
Date:       2009-11-30 19:05:47
Message-ID: 200911302018.nAUKIQp2012021 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/server/log/tmplgpln
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv25182/server/log/tmplgpln

Modified Files:
	base_log.cpp 
Log Message:
Synopsis
========
Templatized-logging related updates for HTTP/1.1

Branches: SERVER_CURRENT_RN (HEAD)
Reviewer: Jamie


Description
===========

This updates server's templatized-logging support based on the HTTP/1.1
spec.  There are some differences from the spec (described below) which
are by-design and should result in spec updates.

1. The Range header for each GET request is made available via:
       %Client.*.Session.*.Clip.*.Range%
   In the spec, this was called ByteRange, but it makes more sense to just
   log the full Range header as-is, whether it is a byte-range or not.
   Also, this needs to be recorded for each GET at the Clip level rather
   than at the Session level since it can be different for each GET in
   a persistent connection.

2. The Persistent Connection Identifier (which is the same for all
   log entries in a single persistent connection) is available as:
       %Client.*.ConnId%
   I didn't add a seperate template variable for this since it
   seems to be redundant.

3. The following variable provides the URL from the first HTTP request:
       %Client.*.Session.*.PlayerRequestedURL%

I also fixed an assert in httpprot.cpp related to processing byte-range requests.


Files Affected
==============

common/include/hxpiids.h
common/include/hxstats.h
server/engine/context/server_stats.cpp
server/engine/context/pub/server_stats.h
server/log/tmplgpln/base_log.cpp
server/protocol/http/httpbaseproto.cpp
server/protocol/http/httpprot.cpp
server/protocol/http/pub/httpbaseproto.h


Testing Performed
=================

Unit Tests:
- N/A

Integration Tests:
- Used telnet and curl to simulate various types of connections.
- Configured templates using the admin system, exercizing the above variables.

Leak Tests:
- N/A

Performance Tests:
- N/A

Platforms Tested: win32-i386-vc7
Build verified: win32-i386-vc7


QA Hints
========
* N/A


Index: base_log.cpp
===================================================================
RCS file: /cvsroot/server/log/tmplgpln/base_log.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- base_log.cpp	2 Nov 2009 22:25:55 -0000	1.47
+++ base_log.cpp	30 Nov 2009 19:05:45 -0000	1.48
@@ -1367,6 +1367,7 @@
     char* szTemp = NULL;
     IHXSessionStats3* pSessionStats3 = NULL;
     IHXSessionStats4* pSessionStats4 = NULL;
+    IHXClipStats3* pClipStats3 = NULL;
 
     HX_ASSERT(pClientStats);
 
@@ -1384,6 +1385,10 @@
         pSessionStats->QueryInterface(IID_IHXSessionStats3, (void **)&pSessionStats3);
         pSessionStats->QueryInterface(IID_IHXSessionStats4, (void **)&pSessionStats4);
     }
+    if (pClipStats)
+    {
+        pClipStats->QueryInterface(IID_IHXClipStats3, (void **)&pClipStats3);
+    }
 
     if (!strncasecmp(szArg, 
                      FORMAT_CLIPSTATS_ROOT,
@@ -1452,6 +1457,10 @@
         {
             pVal = pClipStats->GetStartTime();
         }
+        else if (!strcasecmp(szTemp, "Range") && pClipStats3)
+        {
+            pVal = pClipStats3->GetRange();
+        }
 
         else // Try integer values.
         { 
@@ -2041,6 +2050,7 @@
         }        
     }
 
+    HX_RELEASE(pClipStats3);
     HX_RELEASE(pSessionStats3);
     HX_RELEASE(pSessionStats4);
 


_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic