openbsd-ports/net/rrdtool/patches/patch-cgilib-0_4_cgi_c
2004-06-08 20:21:24 +00:00

17 lines
732 B
Plaintext

$OpenBSD: patch-cgilib-0_4_cgi_c,v 1.1 2004/06/08 20:21:24 danh Exp $
--- cgilib-0.4/cgi.c.orig 2002-02-26 05:21:17.000000000 -0500
+++ cgilib-0.4/cgi.c 2004-06-08 15:00:25.000000000 -0400
@@ -254,8 +254,11 @@ char *cgiGetValue(s_cgi **parms, const c
void cgiRedirect (const char *url)
{
+ unsigned long length;
+
+ length = 77 + (strlen(url) * 2);
if (url && strlen(url)) {
- printf ("Content-type: text/html\nContent-length: %d\n", 77+(strlen(url)*2));
+ printf ("Content-type: text/html\nContent-length: %lu\n", length);
printf ("Status: 302 Temporal Relocation\n");
printf ("Location: %s\n\n", url);
printf ("<html>\n<body>\nThe page has been moved to <a href=\"%s\">%s</a>\n</body>\n</html>\n", url, url);