[patches] [daemon 1/1] daemon: Introduce feedback daemon
Georgy Kirichenko
georgy at tarantool.org
Thu Mar 15 11:31:44 MSK 2018
On Sunday, March 11, 2018 7:29:16 PM MSK Ilya Markov wrote:
> >Среда, 7 марта 2018, 20:07 +03:00 от Georgy Kirichenko
> ><georgy at tarantool.org>:
> >
> >Please see comment bellow
> >
> >> + pcall(http.post, self.host, json.encode(feedback),
> >> {timeout=1})>
> >I think you should set corresponding http headers for the post request
>
> What kind of headers? What for?
At least please set content-type header, and it should be nice to check this
header and decode content in your test http server
>
> >> +
> >> + local buf = s:read('\n')
> >> + while not buf:match("version") do
> >> + buf = s:read('\n')
> >> + end
> >
> >I want for a little bit improved http server
> >It should be enough if headers are parsed and checked against required
> >values and a Content-length value is extracted and used for a payload
> >reading.
> I can check length, and parse request headers until empty line is found.
> Then parse request body. I suppose, that might be enough for test.
Yes, it should be ok to just extract headers, search for content length and
read until all request data is read
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20180315/024254ba/attachment.sig>
More information about the Tarantool-patches
mailing list