Questions tagged [http-headers]

HTTP header fields are components of the message header of requests and responses in the Hypertext Transfer Protocol (HTTP). They define the operating parameters of an HTTP transaction.

HTTP header fields are components of the message header of requests and responses in the Hypertext Transfer Protocol (HTTP). They define the operating parameters of an HTTP transaction.

Refer to RFC 2616

624 questions
3
votes
4 answers

nginx downloads empty file when requested on port 80 (instead of redirecting to port 443)

my nginx webserver does not do, what he should. All http:// requests to the server should be redirected with http 301 to https://, it worked fine for the last few days, until it stopped working without any changes. Nginx returns an empty file with…
3
votes
1 answer

Is it possible to set the Status-Line header with Apache's Header directive?

My searches have turned up blank... I'm trying to change the 403 Forbidden status of the response to a 404 Not Found status with this line: Header set Status-Line "HTTP/1.1 404" "expr=%{REQUEST_STATUS} == 403" However, this is having no effect. I…
3
votes
3 answers

How to set "Expires" and "Cache-Control" headers on Nginx server?

I have a php website running on a DigitalOcean droplet (nginx server), and I also use Cloudflare. Recently, my website was hit by something that I yet did not understand.. as my CPU usage was usually 1-2% and it went to 100% for a few hours…
codemode
  • 169
  • 1
  • 2
  • 8
3
votes
1 answer

Is there a response header which indicates an old IP?

I have a website which has recently migrated to a new server. The old server has a proxy_pass in place in the nginx config to ensure any requests that land there due to old DNS get routed to the new server. It's been a few days now and I'm still…
Evan Mattson
  • 133
  • 3
3
votes
1 answer

apache2 - Why caching of a static file is not happening?

I am working on to cache static files in a SugarCRM environment, which is not happening as I would like to. I have narrowed it to one specific case, and I would like to know why this is so. On the Chrome browser, I am trying to access this URL…
rsmoorthy
  • 601
  • 4
  • 7
3
votes
1 answer

Can I compare a variable set by auth_request_set after the auth_request has returned in nginx?

I've got a location block with an auth_request like this location /somepath { auth_request /authorize; auth_request_set $header_variable $upstream_http_custom_header; proxy_path http://backendaddress; } What I want to do is, if the…
Glenn Slaven
  • 2,400
  • 2
  • 30
  • 42
3
votes
1 answer

Why does my apache refuse the "Content-Security-Policy" headers?

I'm currently in the process of implementing Content-Security-Policies. But my apache refused to accept the config settings. The apache2 versions I am currently using are: 2.2.22 and 2.4.7. Neither of those apache2 versions seem to work. My config…
Riemu
  • 113
  • 2
  • 2
  • 7
3
votes
1 answer

multiple post requests using wget and same base-url

wget has nice option that lets you allow downloading multiple files from same location (I mean combination of --base and --input-file) Advantage of this, is that if possible wget tries to reuse opened socket/connection. I was wondering if it's…
GiM
  • 131
  • 1
  • 1
  • 2
3
votes
1 answer

Is setting a Content Security Policy incompatible with Joomla's admin page?

I'd like to set a content security policy header for a Joomla website running on Apache 2.4. Using this configuration from h5bp and setting Header set Content-Security-Policy "script-src 'self'; object-src 'self'" gives me a blank page for the…
Tom Brossman
  • 301
  • 4
  • 13
3
votes
2 answers

Is it possible to set SSL/TLS version HTTP header with Apache which an backend application can use?

There is one service on a virtual machine with a dedicated IP that required to be accessible via SSLv3 (WinXP with IE6 clients). I moved that service several several years ago to a that virtual machine to be able to disable SSLv3 for all the other…
burnersk
  • 2,056
  • 5
  • 27
  • 39
3
votes
2 answers

nginx - Change error_page based on proxy_pass response

Is it possible to change the fallback error_page based on the response of the upstream proxy? upstream serverA { server servera.com; } upstream serverB { server serverb.com; } location / { proxy_set_header X-Real-IP $remote_addr; …
Nathan Lee
  • 131
  • 1
  • 1
  • 5
3
votes
3 answers

Why is SPDY breaking 'Vary: Accept-Encoding' in Nginx 1.4.3?

I've compiled Nginx 1.4.3 from source with the SPDY module. However when SPDY is enabled, it seems to break my 'Vary: Accept-Encoding' header. My Nginx…
Elijah Paul
  • 557
  • 1
  • 8
  • 19
3
votes
1 answer

Amazon ELB not Passing "X-Forwarded-For" to IIS

ELB is setup to accept public HTTPS (443) connections and send them on as HTTP (80) to the EC2 instances. The EC2 instances run an IIS app that needs to know the user's IP address. According to everything I've read on this site and elsewhere, ELB is…
Chad Decker
  • 355
  • 1
  • 7
  • 12
3
votes
1 answer

Why does nginx not send the Content-Length header when the request is HEAD?

I am using CURL to test HEAD requests to my nginx server. The file being served is a simple PHP file. If I use GET: $ curl -XGET http://test.com/phpinfo.php -I HTTP/1.1 200 OK Date: Tue, 09 Apr 2013 00:35:35 GMT Content-Type: text/html Connection:…
F21
  • 706
  • 3
  • 11
  • 20
3
votes
1 answer

Lowercase headers

One thing I've noticed about CloudFlare and Google's web servers are that they both use lowercase response headers. Is this just for looks, or does it actually provide a performance increase? I'm considering doing it for my custom nginx build, but…
Kevin Smith
  • 151
  • 1
  • 4