Reverting Peter Hartley's last patch.

git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@303 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez
2008-01-27 01:23:54 +00:00
parent c28942f6fe
commit 5bc8cae4ea
4 changed files with 13 additions and 64 deletions

View File

@@ -1221,7 +1221,6 @@ process_request( IN http_message_t * req,
// init
request_doc = NULL;
finfo.content_type = NULL;
finfo.extra_headers = NULL;
alias_grabbed = FALSE;
err_code = HTTP_INTERNAL_SERVER_ERROR; // default error
using_virtual_dir = FALSE;
@@ -1388,22 +1387,18 @@ process_request( IN http_message_t * req,
goto error_handler;
}
const char *extra_headers = finfo.extra_headers ? finfo.extra_headers
: "";
if( RespInstr->IsRangeActive && RespInstr->IsChunkActive ) {
// Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT
// Transfer-Encoding: chunked
if (http_MakeMessage(
headers, resp_major, resp_minor,
"R" "T" "GKD" "s" "tcS" "Xc" "sCc",
"R" "T" "GKD" "s" "tcS" "XcCc",
HTTP_PARTIAL_CONTENT, // status code
finfo.content_type, // content type
RespInstr, // range info
"LAST-MODIFIED: ",
&finfo.last_modified,
X_USER_AGENT,
extra_headers) != 0 ) {
X_USER_AGENT) != 0 ) {
goto error_handler;
}
} else if( RespInstr->IsRangeActive && !RespInstr->IsChunkActive ) {
@@ -1412,15 +1407,14 @@ process_request( IN http_message_t * req,
// Transfer-Encoding: chunked
if (http_MakeMessage(
headers, resp_major, resp_minor,
"R" "N" "T" "GD" "s" "tcS" "Xc" "sCc",
"R" "N" "T" "GD" "s" "tcS" "XcCc",
HTTP_PARTIAL_CONTENT, // status code
RespInstr->ReadSendSize, // content length
finfo.content_type, // content type
RespInstr, // range info
"LAST-MODIFIED: ",
&finfo.last_modified,
X_USER_AGENT,
extra_headers) != 0 ) {
X_USER_AGENT) != 0 ) {
goto error_handler;
}
@@ -1429,13 +1423,12 @@ process_request( IN http_message_t * req,
// Transfer-Encoding: chunked
if (http_MakeMessage(
headers, resp_major, resp_minor,
"RK" "TD" "s" "tcS" "Xc" "sCc",
"RK" "TD" "s" "tcS" "XcCc",
HTTP_OK, // status code
finfo.content_type, // content type
"LAST-MODIFIED: ",
&finfo.last_modified,
X_USER_AGENT,
extra_headers) != 0 ) {
X_USER_AGENT) != 0 ) {
goto error_handler;
}
@@ -1445,14 +1438,13 @@ process_request( IN http_message_t * req,
// Transfer-Encoding: chunked
if (http_MakeMessage(
headers, resp_major, resp_minor,
"R" "N" "TD" "s" "tcS" "Xc" "sCc",
"R" "N" "TD" "s" "tcS" "XcCc",
HTTP_OK, // status code
RespInstr->ReadSendSize, // content length
finfo.content_type, // content type
"LAST-MODIFIED: ",
&finfo.last_modified,
X_USER_AGENT,
extra_headers) != 0 ) {
X_USER_AGENT) != 0 ) {
goto error_handler;
}
} else {
@@ -1460,13 +1452,12 @@ process_request( IN http_message_t * req,
// Transfer-Encoding: chunked
if (http_MakeMessage(
headers, resp_major, resp_minor,
"R" "TD" "s" "tcS" "b" "Xc" "sCc",
"R" "TD" "s" "tcS" "XcCc",
HTTP_OK, // status code
finfo.content_type, // content type
"LAST-MODIFIED: ",
&finfo.last_modified,
X_USER_AGENT,
extra_headers) != 0 ) {
X_USER_AGENT) != 0 ) {
goto error_handler;
}
}
@@ -1495,7 +1486,6 @@ process_request( IN http_message_t * req,
error_handler:
free( request_doc );
ixmlFreeDOMString( finfo.content_type );
ixmlFreeDOMString( finfo.extra_headers );
if( err_code != UPNP_E_SUCCESS && alias_grabbed ) {
alias_release( alias );
}