Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

12 check-ins

Merge in latest upstream (20240126)


- main.c
- content-bozo.c Leaf check-in: c9541b58b7 user: atomicules tags: trunk

Bump upstream release to bozohttpd-20240126 Leaf check-in: 69ab72134e user: atomicules tags: upstream
Missed colon from getopt during merge

When I merged in upstream I missed the colon after `h` which means the program
segfaults as soon as I try to set a Cache Control header. This was a bit dumb
of me since I knew about this here:

But it was a messy merge. check-in: 00fe7ad50c user: atomicules tags: trunk

Don't link to libblocklist if not compiling that

This is mostly due to blacklist being renamed to blocklist _somewhere_ (NetBSD
Current? I thought 9.2, but nope). I.e. it's harmless to have `-lblocklist`
_if_ that library actually exists even if we aren't compiling that in. But that
also seems wrong. So let's check the compile options and remove that linker if
we aren't compiling blocklist support in. check-in: 1eccc4f90c user: atomicules tags: trunk

Merge in latest upstream check-in: 1c8136037b user: atomicules tags: trunk
Bump upstream release to 20210227. I may have skipped a few releases check-in: a8d0310bbc user: atomicules tags: upstream
Create new branch named "upstream" check-in: ec9d46659f user: atomicules tags: upstream
Use existing content_map to provide cache control header per file type

Ideally I'd prefer to do it with a regex or partial match on the content type, but everything is already setup for us to piggyback on this instead. I.e. I'd like to do multiple arguments like this:

-h "image" "private, max-age=604800" -h "css" "private, max-age=86400"

or a single argument where we split the string on a comma:

-h "image,css" "private, max-age=604800"

but instead I am happy enough to be able to do:

-h .jpg "private, max-age=604800" -h .png "private, max-age=86400"

It's good enough for what I want to stop here.

- Adds a new cache-bozo.c file
- Adds a new field in the existing map used for the cache control header
- Extends all existing functions as required to reference this new field. check-in: 6d39f799f6 user: atomicules tags: trunk

Set cache-control only for images

A bit of an intermediate commit, just investigating what works. I think really
need to be able to pass in a string and a cache-control header and it'll use
strstr to determine which header to set. I.e so you can pass in:

"image" "max-age=604800"
"css" "max-age=86400"

The bit I'm then missing is how to set a catch all or "owtelse" cache-control?
Maybe look for one argument? check-in: dda2552f49 user: atomicules tags: trunk

Initial work on setting Cache-Control headers

The bit that foxed me was understanding getopts and that the "h" needed a ":"
after it because the option accepts and argument. It'll happily build and run
without this, but segfault when you try to use a "-h" argument.

This definitely and utterly sets a header. It doesn't seem that it's recognised
properly for whatever reason though, e.g here:


and here:


But what can you do?

At the moment this just sets a header everywhere for everything being served.
What would be better would be just setting this on certain file types. check-in: a29fb4fb10 user: atomicules tags: trunk

Add version 20170201 of Bozohttpd check-in: b786821675 user: atomicules tags: trunk
initial empty check-in check-in: 0fe8cd1d44 user: atomicules tags: trunk