summaryrefslogtreecommitdiff
path: root/main.c
AgeCommit message (Collapse)Author
2021-11-18Looking for a good way to parse binary dataMax Christian Pohle
2021-11-17That is much better nowMax Christian Pohle
2021-11-16First refactoring roundMax Christian Pohle
Still open: Split the header/body parser, but this is more complicated, so maybe some automated tests first.
2021-11-16Basic functionality is finally thereMax Christian Pohle
We can: * skip HTTP status header * read the HTTP headers * find a boundary of multipart form data and if there was a boundary * parse further 'chunks', separated by this boundary, each with a HTTP header All of that was tested with text fields and binary data. This server implementation is insecure. Please do not use it for anything connected to the internet. It is simple though and can serve local daemons. TODO: callback to a parser function.
2021-11-14Now that I can parse individual fields I see potential optimizations.Max Christian Pohle
Well-- If I had read the entire input stream into the buffer, I would afterwards be able to change the buffer in memory and append \0 in places, where a name/value pair exists and that would every second pair a name and avoid many unnecessary memcpy.
2021-11-14changed everythingMax Christian Pohle
* threads removed for now, because that was unrelyable and sometimes the connection could not be established. Investigation why is pending. * used openfd to open the socket, because working with a FILE structure is much more straight forward * added several parsing functions down to the level of detail, so that every chunk of multipart form data can be processed individually. The header parsing of these parts is still missing though.
2021-11-10http answer implementedMax Christian Pohle
2021-01-18Implemented a serverMax Christian Pohle
..