We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Nginx::Request#content_type doesn't return Content-Type of request.
It looks Nginx::Request#content_type() and Nginx::Request#content_type=() are for HTTP response, not HTTP request. Very confusing name to me.
location /foo { mruby_content_handler_code ' r = Nginx::Request.new Nginx.rputs "content_type: " + r.content_type Nginx.return Nginx::HTTP_OK '; }
% curl -v -H "Content-Type: text/plain" http://127.0.0.1:58080/foo * About to connect() to 127.0.0.1 port 58080 (#0) * Trying 127.0.0.1... * Connected to 127.0.0.1 (127.0.0.1) port 58080 (#0) > GET /foo HTTP/1.1 > User-Agent: curl/7.29.0 > Host: 127.0.0.1:58080 > Accept: */* > Content-Type: text/plain > < HTTP/1.1 200 OK < Date: Thu, 29 Nov 2018 04:53:26 GMT < Content-Length: 14 < Connection: keep-alive < hoge: fuga < Server: global_ngx_mruby < * Connection #0 to host 127.0.0.1 left intact
From src/http/ngx_http_mruby_request.c
NGX_MRUBY_DEFINE_METHOD_NGX_GET_REQUEST_MEMBER_STR(content_type, r->headers_out.content_type); NGX_MRUBY_DEFINE_METHOD_NGX_SET_REQUEST_MEMBER_STR(content_type, r->headers_out.content_type);
The text was updated successfully, but these errors were encountered:
Thank you for your opinion. Do you have ideas about names?
Sorry, something went wrong.
@matsumotory Can you give me some time to think about it?
I'm have been improving docs/class_and_method/README.md on https://github.com/yyamano/ngx_mruby/blob/doc-improvement/docs/class_and_method/README.md and playing with unfamiliar methods. I'd like to get a clear picture before renaming.
Yes! Thanks always.
No branches or pull requests
Nginx::Request#content_type doesn't return Content-Type of request.
It looks Nginx::Request#content_type() and Nginx::Request#content_type=() are for HTTP response, not HTTP request. Very confusing name to me.
From src/http/ngx_http_mruby_request.c
The text was updated successfully, but these errors were encountered: