Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign allocations for line protocol #20

Open
fntlnz opened this issue Oct 14, 2018 · 0 comments
Open

Redesign allocations for line protocol #20

fntlnz opened this issue Oct 14, 2018 · 0 comments

Comments

@fntlnz
Copy link
Collaborator

fntlnz commented Oct 14, 2018

I'm very unsure about the usage of the buffer here:

(void)ngx_sprintf(buf->last,
"%V,server_name=%V "
"method=\"%V\",status=%i,bytes_sent=%O,body_"
"bytes_sent=%O,header_"
"bytes_sent=%z,request_length=%O,uri=\"%V\",extension=\"%"
"V\",content_type=\"%V\",request_time=%V",
&measurement, &m->server_name, &m->method, m->status,
m->bytes_sent, m->body_bytes_sent, m->header_bytes_sent,
m->request_length, &m->uri, &m->extension, &m->content_type,
&m->request_time);

I have the feeling that it doesn't handle very well its boundaries, opening this to convert that to a mix of ngx_palloc and ngx_memcpy that then are used to create an ngx_str_t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant