~slowjo

Recent activity

[PATCH kimchi v2] fix site configs with path in uri 6 hours ago

From Jonathan Halmen to ~emersion/public-inbox

This actually makes site configs such as the following work

site foo.example.org/foo {
  file_server /path/to/index/html/
}
---
The last patch actually didn't work correctly unless a trailing slash
would be added in the config. Making sure there is going to be one is
probably better than requiring it in the config.

 directives.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/directives.go b/directives.go
[message trimmed]

[PATCH kimchi] fix site configs with path in uri 6 hours ago

From Jonathan Halmen to ~emersion/public-inbox

---
This actually makes site configs such as the following work

site foo.example.org/foo {
  file_server /path/to/index/html/
}

 directives.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/directives.go b/directives.go
index 7c29464..952b474 100644
--- a/directives.go
+++ b/directives.go
[message trimmed]

Re: [PATCH kimchi v3] allow wildcard sites 6 hours ago

From Jonathan Halmen to ~emersion/public-inbox

I haven't had the time to implement your proposed solution, wanted to do
that today, but I got stuck setting up working test-cases.

> foo.example.org/foo {
> file_server /srv/http/foo.example.org
> }
> *.example.org/bar {
> file_server /srv/http/fallback.example.org
> }
> :80/asdf {
> file_server /srv/http/fallback
> }
>
> We'll want to route:

[PATCH kimchi v3] allow wildcard sites 7 days ago

From Jonathan Halmen to ~emersion/public-inbox

closes: https://todo.sr.ht/~emersion/kimchi/14
---
This now works better. I'm unsure whether the NewServeMux function is
the best way to actually allocate a new Mux, or if it could be done more
easily as well. Also the naming of the new types could be improved.

 server.go | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 52 insertions(+), 2 deletions(-)

diff --git a/server.go b/server.go
index 18b8520..b169d83 100644
--- a/server.go
+++ b/server.go
@@ -7,6 +7,7 @@ import (
[message trimmed]

Re: [PATCH kimchi v2] allow wildcard sites 7 days ago

From Jonathan Halmen to ~emersion/public-inbox

On Tue Nov 24, 2020 at 2:07 PM CET, Simon Ser wrote:
> > This might not be the way you want this implemented, but with my limited
> > testing it seems to work.
>
> Thanks for working on this, definitely something I'd like to get
> merged.
>
> Does this patch work? New entries get added to wildcard, but I don't
> see where wildcard.ServeHTTP is called from?

I have not done extensive testing[0], but it does work.

The first time the wildcardHandler gets called, it adds itself to the
Listener.Mux with the matching pattern set to "/" in order to match

[PATCH kimchi v2] allow wildcard sites 11 days ago

From Jonathan Halmen to ~emersion/public-inbox

closes: https://todo.sr.ht/~emersion/kimchi/14
---
This might not be the way you want this implemented, but with my limited
testing it seems to work.
v2 because i seem to have messed something up the first time around.

 directives.go | 34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/directives.go b/directives.go
index 96b153c..d56d42b 100644
--- a/directives.go
+++ b/directives.go
@@ -44,6 +44,11 @@ func parseConfig(srv *Server, cfg scfg.Block) error {
[message trimmed]

[PATCH kimchi] allow wildcard sites 11 days ago

From Jonathan Halmen to ~emersion/public-inbox

closes: https://todo.sr.ht/~emersion/kimchi/14
---
This might not be the way you want this implemented, but with my limited
testing it seems to work.
 directives.go | 36 +++++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/directives.go b/directives.go
index 96b153c..72a74d4 100644
--- a/directives.go
+++ b/directives.go
@@ -44,6 +44,11 @@ func parseConfig(srv *Server, cfg scfg.Block) error {
 
 func parseSite(srv *Server, dir *scfg.Directive) error {

[PATCH] fix default port 14 days ago

From Jonathan Halmen to ~emersion/public-inbox

---
 directives.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/directives.go b/directives.go
index 1b3967b..e2a8372 100644
--- a/directives.go
+++ b/directives.go
@@ -42,7 +42,7 @@ func parseSite(srv *Server, dir *scfg.Directive) error {
		case "", "http", "http+insecure":
			if host, port, err = net.SplitHostPort(u.Host); err != nil {
				host = u.Host
				port = ":http"
				port = "http"
[message trimmed]

[PATCH kimchi] fix default port 14 days ago

From Jonathan Halmen to ~emersion/public-inbox

without configuring a port in the config file, a port of "::http" would
be tried previously

[PATCH shouldiusethreads.com] fix footnote 4 link 6 months ago

From Jonathan Halmen to ~sircmpwn/public-inbox

---
 index.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.html b/index.html
index 7f4a979..9e73154 100644
--- a/index.html
+++ b/index.html
@@ -64,7 +64,7 @@ main {
  approach is more useful, too, because often the user of the program may have
  a more novel idea about how to distribute work, and if they can invoke the
  worker processes themselves, they're empowered to try it
  out<sup><a href="note-4">4</a></sup>. This is easier to test and debug for
  out<sup><a href="#note-4">4</a></sup>. This is easier to test and debug for
[message trimmed]