Welcome! Log In Create A New Profile

Advanced

Re: ngx_http_process_header_line function in source code

June 21, 2014 10:35AM
I see your point.
By the way, is there a more appropriate forum or email list I should use for these kinds of questions?
I'm a fairly fresh computer science student who just started working in the industry, and all I'm ever allowed to work on, is Java and C#,
so I decided to do some C hacking on a hobby basis...and chose you poor souls as my subject.
My plan is basically to just stare at the code untill it makes a bit of sense, and ask questions if I see something I think might be an error of some sort, or if I don't understand it, and eventually, maybe I'm even able to contribute something worthwhile.

So, I'm wondering, if there is any more appropriate place where I can ask questions about things I find in the code-base.

For instance, right now I'm staring at ngx_http_parse.c
It seems that the switch (p - m) block at line ~164 is lacking a default label.
So to my naive eyes, it seems it's possible to run ngx_http_parse_request_line() on a request with a method of less than 3 characters or more than 9, and get a ok return value, where the http-method is still in its unmodified initial value of NGX_HTTP_UNKNOWN, which doesen't seem to be handled elsewhere in the code(I tried grepping for it).

Should a default value return NGX_HTTP_PARSE_INVALID_METHOD? Did I actually spot something? Or is it left this way by design?
Subject Author Posted

ngx_http_process_header_line function in source code

alayim June 15, 2014 06:03PM

Re: ngx_http_process_header_line function in source code

Maxim Dounin June 16, 2014 07:32AM

Re: ngx_http_process_header_line function in source code

alayim June 21, 2014 10:35AM

Re: ngx_http_process_header_line function in source code

alayim June 21, 2014 10:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 220
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