I'm writing a program that uses pistache as a rest server and I noticed that the incoming Pistache::Rest::Request object's body() function returns a string which is missing the first CRLF. If I send a request which contains a form-data parameter (multipart/form-data content type) then the first boundary starts with "--" instead of "\r\n--". By rfc7578 the boundary consists of "\r\n--" plus the text specified in the header parameter "boundary". Im not getting the first CRLF, it starts with "--" instead.
The sending side correctly sends the two sets of CRLF., so my assumption is that the parser in pistache cuts request into header and body at the wrong place. The first CRLF is the separator from between the header and the body, but the second one is part of the body.
We're all a little tied up with the V0.1 release presently, but this looks like it should be fairly straight forward for anyone who wants to submit a PR.
Hello!
I'm writing a program that uses pistache as a rest server and I noticed that the incoming Pistache::Rest::Request object's body() function returns a string which is missing the first CRLF. If I send a request which contains a form-data parameter (multipart/form-data content type) then the first boundary starts with "--" instead of "\r\n--". By rfc7578 the boundary consists of "\r\n--" plus the text specified in the header parameter "boundary". Im not getting the first CRLF, it starts with "--" instead. The sending side correctly sends the two sets of CRLF., so my assumption is that the parser in pistache cuts request into header and body at the wrong place. The first CRLF is the separator from between the header and the body, but the second one is part of the body.