Proxied request header names in SPDY are always lowercase

cubicdaiya nginx-forum at
Sat Nov 1 14:06:53 UTC 2014


I have a question about the behavior of proxing SPDY to HTTP with nginx.

First, there is a configuration like the following.

    upstream app {
        keepalive 32;

    server {
        listen 443 ssl spdy;

        proxy_set_header Connection "";
        proxy_http_version 1.1;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Host  $host;
        proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        location / {
             proxy_pass http://app;

Next, send a request to with spdycat.

# spdycat is a command like curl for SPDY.
spdycat \
   --spdy3-1 \
   -H "User-Agent: spdycat" \
   -H "X-VERSION: 1.3.1" \

In this case, a proxied request to app is the following according to `#
ngrep -W byline port 80 -d lo`

GET / HTTP/1.1
X-Forwarded-Proto: https
accept: */*
accept-encoding: gzip, deflate
user-agent: spdycat
x-version: 1.3.1

Even if request-header names are uppercase, proxied them become lowercase.

According to SPDY Protocol - Draft

 * All header names must be lowercase.

Is this specific to a proxied request-header names to HTTP?
Or is there a solution except for the following workaround?

proxy_set_header User-Agent $http_user_agent;
proxy_set_header X-Version $http_x_version;

Thanks in advance!

Posted at Nginx Forum:,254506,254506#msg-254506

More information about the nginx mailing list