From d38909aa5b2158642f5a17f0a0552dc37bab93d9 Mon Sep 17 00:00:00 2001 From: Markus Stoll Date: Mon, 27 Apr 2015 11:16:18 +0200 Subject: [PATCH] fixes for CGI and IIS --- Utilities/Adaptors/CGI/WebObjects.c | 2 +- Utilities/Adaptors/IIS/WebObjects.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Utilities/Adaptors/CGI/WebObjects.c b/Utilities/Adaptors/CGI/WebObjects.c index 98bacf8291e..c393cc77251 100644 --- a/Utilities/Adaptors/CGI/WebObjects.c +++ b/Utilities/Adaptors/CGI/WebObjects.c @@ -147,7 +147,7 @@ static void sendResponse(HTTPResponse *resp) #ifndef PROFILE /* resp->content_valid will be 0 for HEAD requests and empty responses */ if (resp->content_valid) { - int count; + long count; while (resp->content_read < resp->content_length && (resp->flags & RESP_LENGTH_INVALID) != RESP_LENGTH_INVALID) { diff --git a/Utilities/Adaptors/IIS/WebObjects.c b/Utilities/Adaptors/IIS/WebObjects.c index 538982bc113..6984ef4b8c5 100644 --- a/Utilities/Adaptors/IIS/WebObjects.c +++ b/Utilities/Adaptors/IIS/WebObjects.c @@ -200,7 +200,7 @@ static void sendResponse(EXTENSION_CONTROL_BLOCK *p, HTTPResponse *resp) /* resp->content_valid will be 0 for HEAD requests and empty responses */ if (resp->content_valid) { - int count; + long count; while (resp->content_read < resp->content_length && (resp->flags & RESP_LENGTH_INVALID) != RESP_LENGTH_INVALID && browserStatus == 0) { @@ -567,7 +567,7 @@ static int readContentData(HTTPRequest *req, void *dataBuffer, int dataSize, int length = (char *)WOMALLOC(32); if (length) { - sprintf(length,"%d",req->content_length); + sprintf(length,"%ul",req->content_length); req_addHeader(req, CONTENT_LENGTH, length, STR_FREEVALUE); } if (p->lpszContentType != NULL)