Welcome! Log In Create A New Profile

Advanced

Re: nginx POST field data processing (Was Re: Introducing Nginx Guts blog)

January 24, 2011 01:14PM
Hi, agentzh.

->Please please do not capitalize my nick.
Oh, Sorry.I did not know.

"You mean reading one field requires parsing through the whole request
body? Yeah, it's currently designed this way, just like nginx's
$arg_FIELD always walk through the whole query string buffer every
time. One may argue that query strings can not be huge while request
bodies can be of megas of bytes, and I agree it's suboptimal for big
chunk of data when there's lots of fields to be processed :)"

I mean, is better to my purpose, read all fields in one pass.
Preferably storing in array of ngx_str_t.

"Putting data into nginx variables requires an additional data copy.
Are you suggesting any other places that introduces unnecessary data
copies?"

ngx_str_t var to each post field, I mean, array of ngx_str_t
I agree. ngx_str_t is not the best place, but,I'm currently using.
Of course one ngx_str_t for each post field (maybe more memory use...)

"Putting data into nginx variables requires an additional data copy.
Are you suggesting any other places that introduces unnecessary data
copies?"

Maybe array of ngx_str_t.
Drawback: name of field? Yes, to store name field, more ngx_str_t, more memory.

"Nginx variables do have their own memory footprint and for the sake of
ngx_form_input's UI, it's inevitable :"

I agree. Sorry,my inexperience,I was not thinking straight.

"POST fields are (usually) encoded as URI components, are you
suggesting in-place URI decoding? (In-place request body processing
may have bad side-effects that you do not want.) Also...how about the
POST body is big enough for nginx to put it onto temporary disk files?"
Of course,I had forgotten POST FIELDS like input files...

Please,did not want to belittle your module.
For me, wasenough pointer to fields posts.
r->header_in->pos solve my needs.
Maybe one pointer like r->post_fieldswould be great.

Thanky you for the patience and attention.

Ranier Vilela
PS. Sorry, my english is terrible. ;)


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

nginx POST field data processing (Was Re: Introducing Nginx Guts blog)

agentzh 2697 January 23, 2011 10:50PM

Re: nginx POST field data processing (Was Re: Introducing Nginx Guts blog)

Ranier 1475 January 24, 2011 01:14PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 116
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready