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)