-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
It's a bit weird to POST to a fileserver, but some of our users have a configuration which likes to try it quite frequently 🙃
Although we have an error template #5698 (comment) clients see an empty response body, with a 404 status. This wouldn't be much of a problem because nobody sees it, but it also causes caddy to log an error (to stderr or stdout) which spams up the journal.
{"level":"error","ts":1691295507.1841986,"logger":"http.log.error","msg":"error handling handler error","request":{"remote_ip":"<my_ip>","remote_port":"60788","client_ip":"<my_ip>","proto":"HTTP/2.0","method":"POST","host":"xonotic.org","uri":"/foo","headers":{"User-Agent":["curl/7.88.1"],"Accept":["*/*"],"Content-Length":["6"],"Content-Type":["application/x-www-form-urlencoded"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"xonotic.org"}},"duration":0.000209028,"error":"{id=hu8vqnzjr} fileserver.(*FileServer).ServeHTTP (staticfiles.go:422): HTTP 405","first_error":{"msg":"{id=5fgwbu868} fileserver.(*FileServer).notFound (staticfiles.go:607): HTTP 404","status":404,"err_id":"5fgwbu868","err_trace":"fileserver.(*FileServer).notFound (staticfiles.go:607)"}}
Triggering that was curl -v -d 'cheese' https://xonotic.org/foo
It looks to me like it doesn't try to execute the template, but fails before getting that far.
This happens in 2.6.4 and 2.7.3.