Hi Arne, When the client sends a request which looks like this: GET / HTTP/1.1 Host: example.com Company: Acme The server you're using will always create the following environment: { 'HTTP_COMPANY' => 'Acme', 'HTTP_HOST' => 'example.com', … } If the client sends a request which looks like this: GET / HTTP/1.1 Host: example.com Http-Company: Acme Then the environment will look like this: { 'HTTP_HTTP_COMPANY' => 'Acme', 'HTTP_HOST' => 'example.com', … }. So yes: If you're using Rack directly, you will need to use HTTP_COMPANY on the server-side, and that will correspond to the "Company" header sent from the client. // Magnus Holm On Mon, Oct 24, 2016 at 10:16 AM, Olivar Plays wrote: > Hello, > > I have a small question about the behaviour of Rack when it comes to > headers send by clients. > Are these always prefixed with HTTP_ ? Or do I need to tell my clients to > explicitly send them as HTTP_ ? > > Example, I'm checking on every request in my Rails application whether the > HTTP_COMPANY header is present, and has the correct value. > But I've been running into issues with detecting them. > Right now I have the client app send the headers as COMPANY, and my Rails > app checks as HTTP_COMPANY. > Is this the intended behaviour, or will this go wrong again when the > client suddenly submits the header as HTTP_COMPANY? > > e.g is Rack smart enough not to prefix HTTP_COMPANY with HTTTP_ again? > > Kind regards, > Arne > > -- > > --- > You received this message because you are subscribed to the Google Groups > "Rack Development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rack-devel+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "Rack Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to rack-devel+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.