openresty / lua-nginx-module

Embed the Power of Lua into NGINX HTTP servers
https://openresty.org/
11.34k stars 2.03k forks source link

bugfix: remove extra spaces at the end of the request field name #2241

Closed lynch1981 closed 1 year ago

lynch1981 commented 1 year ago

According to RFC7230 second paragraph of section-[3.2.4] (https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4).
No whitespace is allowed between the header field-name and colon.

I just remove the extra space at the end of the request field-name for user convenience.

Nginx won't complain about headers like this, so the response part does not need to be processed.

fix #2140 Thanks @ram2012k.

I hereby granted the copyright of the changes in this pull request to the authors of this lua-nginx-module project.

ram2012k commented 1 year ago

@lynch1981 i already created pull request for it long ago https://github.com/openresty/lua-nginx-module/pull/2149

lynch1981 commented 1 year ago

@lynch1981 i already created pull request for it long ago #2149 Yes, i saw it. I found a simpler solution. can you help me review the codes? thanks so much