Fix dodgy patch - send correct Content-Length: header.

PR:		ports/99075
Submitted by:	Nikolai Saoukh <nms+freebsd@otdel-1.org>
Approved by:	shaun (me), ahze (mentor)
This commit is contained in:
Shaun Amott
2006-06-20 12:54:52 +00:00
parent 51c5eda23e
commit 43819c31ae
2 changed files with 13 additions and 6 deletions

View File

@@ -7,6 +7,7 @@
PORTNAME= quickie
PORTVERSION= 1.1
PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://${PORTNAME}.sourceforge.net/ \
http://mirror.inerd.com/FreeBSD/distfiles/${PORTNAME}/

View File

@@ -12,12 +12,18 @@
#include <careful.h>
#include <cgi.h>
#include <configuration.h>
@@ -386,7 +391,7 @@
@@ -384,11 +389,8 @@
return;
}
output_stdout op;
op << "Content-Type: text/html\n"
"Content-Length: "
- op << "Content-Type: text/html\n"
- "Content-Length: "
- << st.st_size
+ << (char)st.st_size
<< "\n"
"\n";
- << "\n"
- "\n";
+ op << "Content-Type: text/html\n";
+ op.printf("Content-Length: %llu\n\n", st.st_size);
for (;;)
{
char buffer[1 << 14];