Fixed a printf format error when compiling on 64bit.

git-svn-id: https://shellinabox.googlecode.com/svn/trunk@31 0da03de8-d603-11dd-86c2-0f8696b7b6f9
This commit is contained in:
zodiac 2009-01-07 23:53:14 +00:00
parent 799169b020
commit ee9a860bc2

View file

@ -204,10 +204,10 @@ static int completePendingRequest(struct Session *session,
"HTTP/1.1 200 OK\r\n"
"Content-Type: application/json; "
"charset=utf-8\r\n"
"Content-Length: %d\r\n"
"Content-Length: %ld\r\n"
"\r\n"
"%s",
strlen(json),
(long)strlen(json),
strcmp(httpGetMethod(http),
"HEAD") ? json : "");
free(json);
@ -412,9 +412,9 @@ static void serveStaticFile(HttpConnection *http, const char *contentType,
char *response = stringPrintf(NULL,
"HTTP/1.1 200 OK\r\n"
"Content-Type: %s\r\n"
"Content-Length: %d\r\n"
"Content-Length: %ld\r\n"
"\r\n",
contentType, end - start);
contentType, (long)(end - start));
int len = strlen(response);
if (strcmp(httpGetMethod(http), "HEAD")) {
check(response = realloc(response, len + (end - start)));