-/* $OpenBSD: httpd.c,v 1.11 2014/08/01 21:59:56 reyk Exp $ */
+/* $OpenBSD: httpd.c,v 1.12 2014/08/02 09:54:13 reyk Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
while (i[1] == '/')
i++;
continue;
- } else if (i[1] == '.' && i[2] == '.' &&
+ } else if (i[1] == '.' && i[2] == '.' &&
(i[3] == '/' || i[3] == '\0')) {
/* b) revert '..' to previous directory */
i += 3;
-/* $OpenBSD: server_fcgi.c,v 1.7 2014/08/01 18:26:32 florian Exp $ */
+/* $OpenBSD: server_fcgi.c,v 1.8 2014/08/02 09:54:13 reyk Exp $ */
/*
* Copyright (c) 2014 Florian Obser <florian@openbsd.org>
int
server_fcgi(struct httpd *env, struct client *clt)
{
+ uint8_t buf[FCGI_RECORD_SIZE];
+ char hbuf[MAXHOSTNAMELEN];
struct server_config *srv_conf = clt->clt_srv_conf;
struct http_descriptor *desc = clt->clt_desc;
struct sockaddr_un sun;
- struct fcgi_record_header *h;
+ struct fcgi_record_header *h;
struct fcgi_begin_request_body *begin;
struct kv *kv, key;
size_t len;
int fd, total_len;
const char *errstr = NULL;
- uint8_t buf[FCGI_RECORD_SIZE];
- char hbuf[MAXHOSTNAMELEN];
char *request_uri;
if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
void
server_fcgi_read(struct bufferevent *bev, void *arg)
{
- struct client *clt = (struct client *) arg;
- struct fcgi_record_header *h;
- uint8_t buf[FCGI_RECORD_SIZE];
- size_t len;
+ uint8_t buf[FCGI_RECORD_SIZE];
+ struct client *clt = (struct client *) arg;
+ struct fcgi_record_header *h;
+ size_t len;
len = bufferevent_read(bev, &buf, clt->clt_fcgi_toread);
/* XXX error handling */
-/* $OpenBSD: server_file.c,v 1.23 2014/08/02 09:46:51 reyk Exp $ */
+/* $OpenBSD: server_file.c,v 1.24 2014/08/02 09:54:13 reyk Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
}
t = st.st_mtime;
- localtime_r(&t, &tm);
+ localtime_r(&t, &tm);
strftime(tmstr, sizeof(tmstr), "%d-%h-%Y %R", &tm);
namewidth = 51 - strlen(dp->d_name);