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

List:       helix-server-cvs
Subject:    [Server-cvs] engine/dataflow/pub http.h,1.16,1.17
From:       dcollins () helixcommunity ! org
Date:       2009-10-29 20:14:05
Message-ID: 200910292125.n9TLP5CX005014 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/server/engine/dataflow/pub
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv21392/pub

Modified Files:
	http.h 
Log Message:
Synopsis
========
HTTP Byte-Range support enhancements and related changes

Branches: HEAD
Reviewer: Chytanya


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

This enhances/rewrites the HTTP/1.1 byte-range support to permit multiple
ranges in a single HTTP request.  For example, the request might ask for:
    Range: bytes=50-60,90-95,120-

This would result in bytes 50 through 60, 90 through 95, and 120 through
the end of the file being sent.

Adjacent and overlapping ranges are merged, per RFC.  Examples (all
three result in bytes 50 through 80 being returned as a single range
rather than two ranges):
    Range: bytes=50-60,55-80
    Range: bytes=60-70,50-80
    Range: bytes=50-60,61-80

Another example, retrieving the first 10 bytes and the last 5 byte of the file:
    Range: bytes=0-10,-5

If (and only if) after merging range request more than one range
is actually being returned, the result is encoded as a multi-part
MIME message.  Each segment is prefixed with a MIME marker, the
contained mime/type, and range information.  For the requested range
"bytes=50-60,150-" on a 200-byte file:

[Attachment #2 (text/html)]

...data...
[Attachment #3 (text/html)]

...data...

The HTTP Content-Length header includes the size of the MIME overhead
in addition to the data sgments.  Since this field needs to be sent
to the client before we have read the range segments from the disk,
we pre-compute the MIME headers so that we can calculate the
total content length.

[...]

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

server-restricted/protocol/http/httprange.cpp [new]
server-restricted/protocol/http/pub/httprange.h [new]
server-restricted/protocol/http/httmobilecheck.cpp [new]
server-restricted/protocol/http/pub/httpmobilecheck.h [new]
server-restricted/protocol/http/Umakefil
server-restricted/protocol/http/linux2.pcf [new]
server-restricted/protocol/http/unix.pcf [new]
server-restricted/protocol/http/win32.pcf [new]
server/protocol/http/Umakefil
server/protocol/http/httpprot.cpp
server/protocol/http/pub/httpprot.h
server/engine/dataflow/http.cpp
server/engine/dataflow/pub/http.h
SERVER_CURRENT_COMMON_restricted.bif


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

Unit Tests:
- N/A.

Integration Tests:
- Verified that various byte-range requests were honored using curl.

Leak Tests:
- Not performed.

Performance Tests:
- Not performed.

Platforms Tested: linux-rhel5-i686
Build verified: linux-rhel5-i686


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



Index: http.h
===================================================================
RCS file: /cvsroot/server/engine/dataflow/pub/http.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- http.h	14 Oct 2009 20:47:51 -0000	1.16
+++ http.h	29 Oct 2009 20:14:03 -0000	1.17
@@ -204,6 +204,7 @@
     IHXPostDataHandler*             m_pPostHandler;
     BOOL                            m_bNeedHandler;
     IHXBuffer*                      m_pPostDataBuffer;
+    UINT32                          m_ulReadSize;
 };
 
 #endif  // _HTTP_H_


_______________________________________________
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