Commit a9b116b7 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Merge from trunk and bump version to 0.9.1.

git-svn-id: http://www.varnish-cache.org/svn/branches/0.9/varnish-cache@805 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 9bc791c9
This diff is collapsed.
Installation Instructions
Varnish uses the GNU autotools. To build and install Varnish, simply
run the 'configure' script in the top-level directory, then run 'make'
and 'make install'.
Additional 'configure' options of interest:
--enable-developer-warnings
enable strict warnings (default is NO)
--enable-debugging-symbols
enable debugging symbols (default is NO)
--enable-werror use -Werror (default is NO)
# $Id$
SUBDIRS = include lib bin
EXTRA_DIST = LICENSE autogen.sh
This is an alpha release of the Varnish high-performance HTTP
accelerator.
Please read the following web page before trying out Varnish:
http://varnish.projects.linpro.no/wiki/AlphaReadme
Technical questions about Varnish and this release should be addressed
to <varnish-dev@projects.linpro.no>.
For more information about the project, see:
http://varnish.projects.linpro.no/wiki
......@@ -30,7 +30,9 @@
#include <sys/types.h>
#include <sys/socket.h>
#ifndef HAVE_SRANDOMDEV
#include "compat/srandomdev.h"
#endif
#include "heritage.h"
#include "shmlog.h"
......@@ -422,7 +424,6 @@ accept_f(int fd)
static void *
vca_main(void *arg)
{
unsigned u;
struct kevent ke;
int i;
struct sess *sp;
......
......@@ -118,8 +118,8 @@ pass_chunked(struct sess *sp, int fd, struct http *hp)
sp->wrk->acct.bodybytes += WRK_Write(sp->wrk, p, j);
WRK_Flush(sp->wrk);
p += j;
assert(u >= j);
u -= j;
assert(u >= 0);
if (u == 0)
break;
p = bp = buf;
......
......@@ -2,6 +2,8 @@
+libh mgt_event.h
-header(../../config.h)
// Fix strchr() semtics, it can only return NULL if arg2 != 0
-sem(strchr, 1p, type(1), 2n == 0 ? (@p < 1p) : (@p < 1p || @p == 0 ))
......
......@@ -17,7 +17,9 @@
#include <err.h> /* XXX */
#ifndef HAVE_SETPROCTITLE
#include "compat/setproctitle.h"
#endif
#include "heritage.h"
#include "mgt.h"
......
......@@ -13,7 +13,10 @@
#include <string.h>
#include <unistd.h>
#ifndef HAVE_VASPRINTF
#include "compat/vasprintf.h"
#endif
#include "cli_priv.h"
#include "cli.h"
#include "vsb.h"
......@@ -263,7 +266,7 @@ mgt_cli_callback(struct ev *e, int what)
if (p == NULL)
return (0);
*p = '\0';
fprintf(stderr, "CLI <%s>\n", cp->buf);
fprintf(stderr, "CLI <%s>\n", cp->buf);
vsb_clear(cp->cli->sb);
cli_dispatch(cp->cli, cli_proto, cp->buf);
vsb_finish(cp->cli->sb);
......
......@@ -11,7 +11,9 @@
#include <string.h>
#include <unistd.h>
#ifndef HAVE_ASPRINTF
#include "compat/asprintf.h"
#endif
#include "vsb.h"
#include "queue.h"
......
......@@ -23,7 +23,9 @@
#include <string.h>
#include <unistd.h>
#ifndef HAVE_ASPRINTF
#include "compat/asprintf.h"
#endif
#include "shmlog.h"
#include "cache.h"
......
......@@ -13,7 +13,9 @@
#include <string.h>
#include <unistd.h>
#ifndef HAVE_STRLCPY
#include "compat/strlcpy.h"
#endif
#include "heritage.h"
#include "mgt.h"
......@@ -67,34 +69,38 @@ accept_filter(int fd)
}
#endif
int
open_tcp(const char *port)
static int
try_sock(int family, const char *port, struct addrinfo **resp)
{
struct addrinfo hints, *res;
int ret, sd, val;
int ret, sd;
memset(&hints, 0, sizeof hints);
hints.ai_family = AF_INET6;
hints.ai_family = family;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE;
if ((ret = getaddrinfo(NULL, port, &hints, &res)) != 0) {
fprintf(stderr, "getaddrinfo failed: %s\n", gai_strerror(ret));
ret = getaddrinfo(NULL, port, &hints, &res);
if (ret != 0)
return (-1);
}
sd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
if (sd < 0 && errno == EPROTONOSUPPORT) {
if (sd < 0)
freeaddrinfo(res);
hints.ai_family = AF_INET;
if ((ret = getaddrinfo(NULL, port, &hints, &res)) != 0) {
fprintf(stderr, "getaddrinfo failed: %s\n", gai_strerror(ret));
return (-1);
}
sd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
}
else
*resp = res;
return (sd);
}
int
open_tcp(const char *port)
{
int sd, val;
struct addrinfo *res;
sd = try_sock(AF_INET6, port, &res);
if (sd < 0)
sd = try_sock(AF_INET, port, &res);
if (sd < 0) {
perror("socket()");
freeaddrinfo(res);
fprintf(stderr, "Failed to get listening socket\n");
return (-1);
}
val = 1;
......@@ -127,6 +133,7 @@ open_tcp(const char *port)
#ifdef HAVE_ACCEPT_FILTERS
accept_filter(sd);
#endif
freeaddrinfo(res);
heritage.socket = sd;
return (0);
}
......@@ -397,7 +397,8 @@ main(int argc, char *argv[])
* but do not answer. That, on the other hand, would eliminate the
* possibility of doing a "no-glitch" restart of the child process.
*/
open_tcp(portnumber);
if (open_tcp(portnumber))
exit (2);
VSL_MgtInit(SHMLOG_FILENAME, 8*1024*1024);
......
......@@ -3,7 +3,7 @@
AC_PREREQ(2.59)
AC_COPYRIGHT([Copyright (c) 2006 Linpro AS / Verdens Gang AS])
AC_REVISION([$Id$])
AC_INIT([Varnish], [0.9], [varnish-dev@projects.linpro.no])
AC_INIT([Varnish], [0.9.1], [varnish-dev@projects.linpro.no])
AC_CONFIG_SRCDIR(include/varnishapi.h)
AM_CONFIG_HEADER(config.h)
......
......@@ -34,7 +34,7 @@ HTTPH("Accept-Ranges", H_Accept_Ranges, 2, 3, HTTPH_R_PASS|HTTPH_A_PASS|HTTPH_R
HTTPH("Age", H_Age, 2, 0, 0, 0, 0) /* RFC2616 14.6 */
HTTPH("Allow", H_Allow, 2, 0, 0, 0, 0) /* RFC2616 14.7 */
HTTPH("Authorization", H_Authorization, 1, 0, 0, 0, 0) /* RFC2616 14.8 */
HTTPH("Cache-Control", H_Cache_Control, 3, 3, HTTPH_R_PASS|HTTPH_A_PASS|HTTPH_R_FETCH|HTTPH_A_INS, 0, 0) /* RFC2616 14.9 */
HTTPH("Cache-Control", H_Cache_Control, 3, 3, HTTPH_R_PASS|HTTPH_R_FETCH, 0, 0) /* RFC2616 14.9 */
HTTPH("Connection", H_Connection, 3, 3, HTTPH_R_PASS|HTTPH_A_PASS|HTTPH_R_FETCH|HTTPH_A_INS, 0, 0) /* RFC2616 14.10 */
HTTPH("Content-Encoding", H_Content_Encoding, 2, 0, 0, 0, 0) /* RFC2616 14.11 */
HTTPH("Content-Langugae", H_Content_Language, 2, 0, 0, 0, 0) /* RFC2616 14.12 */
......
......@@ -2,7 +2,7 @@
INCLUDES = -I$(top_srcdir)/include
lib_LIBRARIES = libcompat.a
noinst_LIBRARIES = libcompat.a
libcompat_a_SOURCES = \
asprintf.c \
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment