Re: httpd(8) - Internal Server error (500) on invalid request

2021-10-23 Thread Sebastian Benoit
Matthias Pressfreund(m...@fn.de) on 2021.10.23 17:16:18 +0200: > On 2021-10-21 16:38, Sebastian Benoit wrote: > > > > This diff makes httpd return "505 HTTP Version Not Supported" > > for < 0.9 and > 1.9 http versions. Anything from 1.1 to 1.9 is > > interpreted as 1.1. This is what nginx does

Re: httpd(8) - Internal Server error (500) on invalid request

2021-10-23 Thread Matthias Pressfreund
On 2021-10-21 16:38, Sebastian Benoit wrote: > > This diff makes httpd return "505 HTTP Version Not Supported" > for < 0.9 and > 1.9 http versions. Anything from 1.1 to 1.9 is > interpreted as 1.1. This is what nginx does too. I don't understand why an invalid HTTP version sent by the client

Re: httpd(8) - Internal Server error (500) on invalid request

2021-10-21 Thread Sebastian Benoit
Claudio Jeker(cje...@diehard.n-r-g.com) on 2021.10.21 17:19:02 +0200: > > + version = http_version_num(desc->http_version); > > I woud prefer if this code would store the version not in > desc->http_version until after the strdup(). The way these strdup work is > just wonky.

Re: httpd(8) - Internal Server error (500) on invalid request

2021-10-21 Thread J. K.
Hi, On 21.10.21 13:31, Claudio Jeker wrote: >> >> Hi, >> >> yes. The server should probably answer with a "Bad Request" instead. >> >> Fix below. ok? > > OK claudio@ > Thanks for the quick fix! Another question, to httpd(8). Tried the following query. Used an invalid HTTP Version number

Re: httpd(8) - Internal Server error (500) on invalid request

2021-10-21 Thread Claudio Jeker
On Thu, Oct 21, 2021 at 04:38:43PM +0200, Sebastian Benoit wrote: > J. K.(openbsd.l...@krottmayer.com) on 2021.10.21 14:10:16 +0200: > > Another question, to httpd(8). Tried the following query. > > Used an invalid HTTP Version number (typo). > > > > $ telnet 10.42.42.183 80 > > [Shortened] > >

Re: httpd(8) - Internal Server error (500) on invalid request

2021-10-21 Thread Sebastian Benoit
J. K.(openbsd.l...@krottmayer.com) on 2021.10.21 14:10:16 +0200: > Another question, to httpd(8). Tried the following query. > Used an invalid HTTP Version number (typo). > > $ telnet 10.42.42.183 80 > [Shortened] > GET / HTTP/1.2 > [content] > > httpd provide here the site. Without checking the

Re: httpd(8) - Internal Server error (500) on invalid request

2021-10-21 Thread Stuart Henderson
On 2021-10-21, J. K. wrote: > A request from me (for this list): > I'm still having troubles with the OpenBSD mailing list. My DKIM key > will always be removed. Don't know why. My DMARC setting is restrict. > No issues with Google as example. > > Don't want to break or spam the list. > > Can

Re: httpd(8) - Internal Server error (500) on invalid request

2021-10-21 Thread Claudio Jeker
On Thu, Oct 21, 2021 at 01:21:33PM +0200, Sebastian Benoit wrote: > J. K.(openbsd.l...@krottmayer.com) on 2021.10.21 11:55:47 +0200: > > Hi, > > > > I don't know if this is a real issue from OpenBSD's httpd(8). > > Tried some requests to httpd(8) for the purpose of education. > > > > Simple

Re: httpd(8) - Internal Server error (500) on invalid request

2021-10-21 Thread Sebastian Benoit
J. K.(openbsd.l...@krottmayer.com) on 2021.10.21 11:55:47 +0200: > Hi, > > I don't know if this is a real issue from OpenBSD's httpd(8). > Tried some requests to httpd(8) for the purpose of education. > > Simple tried the following request: > > $ telnet 10.42.42.183 80 > Trying 10.42.42.183...