commit - f8bcc13822154d8558246c9f994cf43c413a5714
commit + 4842c72d9f3f45478cb641e15a3272e541fb8a18
blob - 5e2ba5770fcd420374804073b8b738615c5bddfb
blob + 6fbb21b436433f1f6f6b1c13f13e989e9b45550e
--- fcgi.c
+++ fcgi.c
memset(h, 0, sizeof(*h));
h->version = FCGI_VERSION_1;
- h->type = type;
+ h->type = type;
h->req_id1 = (id >> 8);
h->req_id0 = (id & 0xFF);
h->content_len1 = (size >> 8);
const char *value)
{
struct fcgi_header h;
- uint32_t namlen, vallen, padlen;
+ uint32_t namlen, vallen, padlen;
uint8_t s[8];
size_t size;
char padding[8] = { 0 };
blob - fd34c2e457ab3113dbeabb4a7ef7f3c205d5da15
blob + ae292d068d98fafc10dc7b221f260588029e1fc6
--- iri.c
+++ iri.c
if (i == path)
return 0;
for (j = i-2; j != path && *j != '/'; j--)
- /* noop */ ;
+ /* noop */ ;
if (*j == '/')
j++;
i += incr;
strlcpy(buf, i->schema, len);
strlcat(buf, "://", len);
- strlcat(buf, i->host, len);
+ strlcat(buf, i->host, len);
strlcat(buf, "/", len);
if (i->path != NULL)
blob - 5391f038386f96dda8089f79be85e139c196f025
blob + 8857c4bddebee91e41395d77faa01e4bb7162a36
--- sandbox.c
+++ sandbox.c
void
sandbox_executor_process(void)
{
- log_notice(NULL, "Sandbox disabled! "
+ log_notice(NULL, "Sandbox disabled! "
"Please report issues upstream instead of disabling the sandbox.");
}
#endif
#ifdef __NR_ioctl
/* allow ioctl on fd 1, glibc doing stuff? */
- SC_ALLOW_ARG(__NR_ioctl, 0, 1),
+ SC_ALLOW_ARG(__NR_ioctl, 0, 1),
/* allow FIONREAD needed by libevent */
SC_ALLOW_ARG(__NR_ioctl, 1, FIONREAD),
#endif
}
for (i = 0; i < FCGI_MAX; i++) {
- f = &fcgi[i];
+ f = &fcgi[i];
if (f->path != NULL) {
if (unveil(f->path, "rw") == -1)
fatal("unveil %s", f->path);
blob - 9bd17a3b1da2ae9f1891650063a9abe289c49717
blob + 88fcc70c80863b3e541bfda8e38e619ef431af1c
--- server.c
+++ server.c
fmt_sbuf(const char *fmt, struct client *c, const char *path)
{
size_t i;
- char buf[32];
+ char buf[32];
memset(buf, 0, sizeof(buf));
for (i = 0; *fmt; ++fmt) {
c->diroff = 0;
c->off = 0;
- start_reply(c, SUCCESS, "text/gemini");
+ start_reply(c, SUCCESS, "text/gemini");
evbuffer_add_printf(EVBUFFER_OUTPUT(c->bev),
"# Index of %s\n\n", c->iri.path);
return;
c->type != REQUEST_FCGI &&
!strcmp(meta, "text/gemini") &&
(lang = vhost_lang(c->host, c->iri.path)) != NULL) {
- rr = evbuffer_add_printf(evb, ";lang=%s", lang);
+ rr = evbuffer_add_printf(evb, ";lang=%s", lang);
if (rr == -1)
goto err;
if (r + rr > 1027)
blob - acba5eb45ce0ea1d4e5e8c767280af1e1197d97a
blob + 72545b2fb5c90507e54d3820e0cc433dbe3e4daa
--- utf8.c
+++ utf8.c
{
uint32_t cp = 0, state = 0;
- for (; *p->iri; p->iri++)
+ for (; *p->iri; p->iri++)
if (!utf8_decode(&state, &cp, *p->iri))
break;
blob - 9a67ff6db934aabd4f882442af37332ab1487393
blob + 1a9a0e02a53f92f03e9f755f7df44522c8f3479c
--- utils.c
+++ utils.c
host);
if ((pkey = EVP_PKEY_new()) == NULL)
- fatal("couldn't create a new private key");
+ fatal("couldn't create a new private key");
if ((rsa = RSA_new()) == NULL)
fatal("couldn't generate rsa");
X509_set_issuer_name(x509, name);
if (!X509_sign(x509, pkey, EVP_sha256()))
- fatal("couldn't sign the certificate");
+ fatal("couldn't sign the certificate");
if ((f = fopen(keypath, "w")) == NULL)
fatal("fopen(%s): %s", keypath, strerror(errno));