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.

learn more… | top users | synonyms

1
vote
3answers
714 views

Use apache to strip off a URL param and add it as a custom HTTP header on a redirect

Let's say my browser issues a request to http://localhost/accounts?memberUuid=<some uuid> I'd like apache2 to pickup that request, add a custom HTTP header with the uuid in it, strip the uuid ...
1
vote
1answer
517 views

How to configure 503 (service unavailable) response header in IIS 7 web.config?

My site is on a shared host and I need to do some maintainance work, which needs downtime. For SEO reasons I need to cause a 503 http response to be sent to clients. How can I do that from my ...
1
vote
1answer
104 views

Serve mirrored (static) web-page with original headers

I have a dynamic webpage which I want to create a "frozen" copy of. Typically I would do something like wget -m http://example.com, and then put the files in the document root of the web-server. ...
2
votes
1answer
3k views

IIS 7 returns HTTP 200 on custom 404 error page

I have successfully set up custom static error pages for IIS7. IIS7 is currently working as a gateway to a Java tomcat application. The issue is that when the 404 error page is served it is served ...
3
votes
1answer
1k views

Apache reverse proxy not preserving headers

Does anyone know if there is something strange going on? It seems that my reverse proxy setup, doesn't preserve the correct caching headers from the original virtualhost. Let me explain... I am ...
5
votes
1answer
1k views

add_header directives in location overwriting add_header directives in server

Using nginx 1.2.1 I am able to add multiple headers using add_header as follows: server { listen 80; server_name localhost; root /var/www; add_header Name1 Value1; <=== ...
2
votes
1answer
625 views

How to remove “Client-Peer” (etc) header in nginx with php-fastcgi

My setup: OS: Ubuntu 11.04 HTTP Server: nginx 1.2.1 compiled with the HttpHeadersMore module processing PHP via php-fastcgi (other irrelevant software - ruby, python, etc) My problem: I'm ...
7
votes
1answer
4k views

What's the use of X-Powered-By, Server and other similar HTTP headers?

What's the use of Server, X-Powered-By and other similar headers? Looks like the consensus is they should be removed so that automatic vulnerability scanners doen't immediately know which version of ...
1
vote
1answer
326 views

Accessing request headers in a Squid redirector

I have a redirector enabled in my Squid config file as follows: url_rewrite_program /etc/squid/redirector.php I need to access the original HTTP request headers from within the redirector. I'm not ...
0
votes
1answer
934 views

NGINX + GZIP - Altering Vary header to include User-Agent

Currently, when nginx is set to gzip outbound content as requested by the client, the "gzip_vary on" setting will set the following header: Vary: Accept-Encoding We would like to modify this to ...
6
votes
1answer
3k views

Nginx : strip header on HTTP, add header on HTTPS

I'm configuring an Nginx server so as to serve as a reverse proxy to serve a Django app (run on Gunicorn). My problem is that I want my site secured with HTTPS, and so I want my Django app to be able ...
-1
votes
1answer
599 views

what is the way to remove the REFERRER header that sent by IIS?

I have an IIS-6 and i want to find a way that the server do not send REFERRER header response. How can i do it ? 10x
4
votes
1answer
2k views

mod_headers not sending headers when file is PHP

I've got my .htaccess file set to the following: Header set MyHeader "I'm Set!" If I go to that directory (http://example.com/test/), which has no default index file, and view the network activity ...
1
vote
1answer
457 views

Sending HTTP headers by webserver or PHP?

It is equally possible to send HTTP headers by webserver or script. I use PHP on Nginx. Is there any different to send HTTP headers (such as Cache-Control) by nginx or PHP? Is it faster to send ...
0
votes
1answer
2k views

NGINX MIME TYPE

I have my nginx conf file so that when ever a mobile device visits my site the url gets rewritten to m.mysite.com I did it by adding the following set $mobile_rewrite do_not_perform; if ...
0
votes
1answer
395 views

Is html or php header needed for gzip?

I use gzip module of nginx to compress documents. When gzip is enabled nginx will automatically send content-ending of gzip with HTTP headers, right? Without adding any PHP header header() or HTML ...
1
vote
1answer
89 views

Strange stuff into Accept-Language header starting with x-ns

We are getting this kind of HTTP header: Accept-Language: fr-CH,x-ns1Ci7OslejNxN,x-ns2af6MxcVGQb2 Can anyone help me knowing where does it come from. It's just by curiosity that I'm asking this. ...
3
votes
0answers
666 views

How to log effective outgoing HTTP requests made by Squid, with headers after adaptation?

I use Squid to modify some HTTP headers sent by clients. For testing purposes, I want to completely delete the 'User-Agent' header. Here is my config : request_header_access User-Agent deny all ...
2
votes
2answers
840 views

In Nginx, block user based on X header value

I have 6 Nginx servers behind load balancer. Of course, if I just try to "deny" based on IP address it does not work as the app servers just see the load balancer IP. However, I learned about the ...
0
votes
1answer
271 views

Apache: Override Accept-Language

I have Chinese clients that provide the following in their http request headers: Accept-Language: zh-cn,zh;q=0.5 This is causing problems with characters being dropped by our load balancer. Is ...
1
vote
2answers
7k views

Using curl to request URL that redirects to relative URL with anchor tag

I'm using curl to request a URL that redirects to a different URL using a Location: line like: Location:/path/to/resource#name As I understand it, that line in the redirect response is invalid per ...
2
votes
2answers
363 views

What sort of magic is my ISP doing?

While trying to setup OpenDNS, and failing to make website filtering actually work, I realized my ISP is doing something nefarious with all HTTP requests. To make a long story short, if there's a ...
3
votes
1answer
875 views

Using curl to make a HEAD request with a hard timeout

I'd like to use curl to send a HTTP HEAD request to a URL to verify that it is working correctly (server is up and sends a successful response). At the end, I need the final HTTP response code ...
0
votes
1answer
58 views

Can I change Apache configuration based on requestHeaders?

I need to configure filter settings (In Apache2) based on RequestContent header. Is it possible? Specifically changes based on the value of one header. (I'm using mod_line_edit to filter html in ...
1
vote
0answers
777 views

nginx + @font-face + Firefox / IE9

Just transferred my site from a shared hosting to Linode's VPS, and I'm also completely new to nginx, so please don't be harsh if I missed something evident ^^ I've got my WordPress site running ...
3
votes
2answers
4k views

How to filter Varnish logs based on XID?

I'm running into infrequent 503 errors which appear hard to pinpoint. Varnishlog is driving me mad, since I can't seem to get the information I want out of it. I'd like to see both the client- and ...
1
vote
1answer
613 views

IIS 7: Expires header for specific files

I have this configuration for all static content on the site in the root directory: <configuration> <system.webServer> <staticContent> <clientCache ...
0
votes
1answer
347 views

max-age doesn't work

I have the same PHP code on two different websites on two different pages. The code simply displays the current time, and sets a http caching header using max-age to 60 seconds. I have a CDN server. ...
6
votes
2answers
4k views

Impact of Connection Close vs Keep-alive

I'm configuring our servers, and due to the nature of our load balancer, we can't send connection keep-alive headers. I'm trying to determine the impact of sending these headers to both the end-user ...
1
vote
1answer
2k views

Conditionally set Content-Disposition header

I have an image gallery on a IIS7 server. I would like to have a button to force download the currently visible image. Maybe something like setting an url parameter: ...
3
votes
4answers
442 views

Static file with HTTP headers?

Is it possible to save a static html file with built in http headers ? So that putting it on any server will work including the http headers? If so how?
15
votes
3answers
13k views

nginx real_ip_header and X-Forwarded-For seems wrong

The wikipedia description of the HTTP header X-Forwarded-For is: X-Forwarded-For: client1, proxy1, proxy2, ... The nginx documentation for the directive real_ip_header reads, in part: This ...
4
votes
2answers
289 views

Obfuscating the server field of an HTTP response header

I'm new to administering a server, and I'm wondering if there is any value in obfuscating the server field for HTTP response headers I'm sending out. Would this prevent hackers from determining which ...
1
vote
1answer
176 views

Meteor server unicode channel problem

When trying to subscribe to a channel named "public" with Meteor, a specialised web server for real-time push using COMET, I get the desired response: <script>ch("public",0)</script> ...
0
votes
1answer
630 views

WSDL server HTTP headers

I am sending request to WSDL server, and I have some funny results. In about 9 of 10 cases I got error from server, however in 1 of 10 I got successful response. Headers from successful response: ...
7
votes
3answers
4k views

nginx passing back custom header

I have the following example location / { proxy_read_timeout 2000; proxy_next_upstream error; proxy_set_header X-Real-IP ...
0
votes
1answer
118 views

Proxy-Connection Header associated with failed connections

I work with microprocessor devices that have/run a micro webserver. I have two of these devices set up so that they can be accessible to/by the Internet - I'll call the devices "A" and "B". ...
1
vote
1answer
137 views

301 redirect, canonical question

I've designed my own 'latest news' page for my site - and I'm trying to keep the URL's clean. (eg) It should look like this : http://www.domain.com/21/this-is-a-clean-url/ When someone links to ...
0
votes
1answer
440 views

In WireShark, what exactly is X-FCCKV2?

When I filtered HTTP traffic in Wireshark I bumped into a X-FCCKV2 HTTP header in the collected info under the Hypertext Transfer Protocol. I've researched it on Google but found nothing. What does ...
3
votes
3answers
1k views

Is it possible to route requests to different applications via Content-Type?

I'm designing a JSON API, and I'd like to version the API using content negotiation of some kind. I'm currently planning on using Vendor MIME Types to do this. While I can definitely do this at the ...
0
votes
1answer
436 views

Cannot remove server in response headers (Amazon AWS)

I cannot remove the "Server" header from the response headers. I am using Amazon EC2. I have added this in Apache config: ServerSignature Off Header unset Server RequestHeader unset Server It does ...
3
votes
1answer
5k views

How do I alter the Last-Modified header on NGNIX?

My server returns the following headers: Cache-Control:no-cache Connection:keep-alive Date:Thu, 07 Jul 2011 10:41:57 GMT Expires:Thu, 01 Jan 1970 00:00:01 GMT Last-Modified:Thu, 07 Jul 2011 08:06:32 ...
1
vote
1answer
349 views

Force connection close lighttpd

I have a M2M project that sends out the following headers. HTTP/1.1 Accept-Language: zh-cn Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) Host: ...
0
votes
2answers
172 views

How to set multiple HTTP headers

Likewise in Apache is there a way you can setup multiple headers in nginx? location ~.*\.(css|html|js)$ { expires 30d; I currently have that set, but I was thinking to make js and css ...
9
votes
11answers
923 views

.htaccess doesn't redirect to www-prefixed page properly

I'm trying to redirect an url without www. to www.version (example.com to www.example.com). I use the usual RewriteCond %{HTTP_HOST} ^example\.com [nc] RewriteRule (.*) http://www.example.com/$1 ...
5
votes
2answers
3k views

Is the Last-Modified HTTP header required for browser caching?

When I unset the Last-Modified header in Apache (ETags are also disabled), Firefox (4.01) will not cache any file regardless of whether I set a future Expires header or enable the Cache-Control ...
0
votes
2answers
868 views

http headers necessary ensure cloudfront distributed files don't get browser cached

I have a Rails-generated JS file that I want to distribute via CloudFront (using my Rails app on EC2 as the origin server). Does anyone know which headers I should use in the response for my JS file ...
1
vote
2answers
2k views

nginx status code 200 and 304

I'm using nginx + passenger. I'm trying to understand the nginx response 200 and 304. What does this both means? Sometimes, it responses back in 304 and others only 200. Reading the YUI blog, it seems ...
0
votes
1answer
1k views

Strange HTTP response headers being sent to Internet Explorer 8 only

So here's something I find puzzling. I'm working on a Javascript that needs to parse XML data and I'm using jQuery's $.ajax to fetch and parse the data. It's working great everywhere except when I ...
0
votes
2answers
473 views

If a server returns Cache-Control=public with no Max-Age or Expires, can a proxy cache it forever?

If a server returns Cache-Control=public with no Max-Age or Expires, can a proxy server cache it forever? Do proxies or the spec have a built-in default for these values? Is it always wrong for a ...