Closed random-rage closed 1 year ago
Hi @random-rage Just to compare I checked same configuration for apache and there a no problem, there is only one header content-type
. I diged a bit more with Nginx and looks like issue is with include fastcgi_params;
and to be more precise fastcgi_param CONTENT_TYPE $content_type;
. I debug RR and when RR received request from nginx headers are already duplicated so it's mean nginx sent it twice
Looks like RR is not main problem here. fyi @rustatian
I will try to play with it a bit more, to find root cause but for me smells like nginx misconfiguration
Hey :wave:
Yeah, I also guessed that the reason is misconfiguration. RR (and more specifically, the stdlib) can add a Content-Type
header automatically, but if there is no such header in the request.
@random-rage Hey :wave:
I've double-checked this issue, looks like this headers comes twice from the NGINX
. You may try to remove include fastcgi_params;
or configure the headers more precisely.
@random-rage Hey π I've double-checked this issue, looks like this headers comes twice from the
NGINX
. You may try to removeinclude fastcgi_params;
or configure the headers more precisely.
Hello.
When I delete include fastcgi_params;
line, the request is not passed to PHP
at all.
If you think that everything is fine with RR, please add a description of this feature to the documentation https://roadrunner.dev/docs/app-server-nginx-with-rr/current/en
Well, you can remove include fastcgi_params;
but documentations says some params are required https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html so you need to set up manually. I tested it and works as expected.
I tested it with pure implementation of GO (without RR) and result was exactly the same - duplicated headers.
No duplicates π₯².
What happened?
When I use FastCGI with Nginx configuration as in the RR documentation
include fastcgi_params;
, which implies adding the parameterfastcgi_param CONTENT_TYPE $content_type;
, theContent-Type
header is duplicated.Nginx config:
Version (rr --version)
2023.2.2
How to reproduce the issue?
.rr.yaml:
PHP Script:
cURL request:
Relevant log output