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

4
votes
2answers
760 views

How to set cache to never expire and minimize requests in Nginx?

I have a cache invalidation system in place, so I need to set the cache for css|js to never expire. I tried this location ~* \.(js|css)$ { # |png|jpg|jpeg|gif|ico expires max; #log_not_found ...
0
votes
1answer
440 views

IIS 6 Header too big, how to tune this iis setting

IIS 6 seems to be limited (by default at least) to an http header of 16k. I have a 3rd party tool that is talking to the web server (ajax) and sending an http header that is bigger than that. Since I ...
0
votes
1answer
168 views

FirePHP on Apache2 cause 502 error

I've got a problem with FirePHP. FirePHP doesn't work anymore on my Server (Debian 6 Squeeze with Apache2). When I am loading my site in my Firefox with FirePHP enabled, I receive an 502 error and an ...
1
vote
2answers
262 views

Can Apache2 be configured to return both HTTP 1.0 and 1.1?

I'm trying to figure out a caching issue. We are currently using a CMS with built in caching. We can then delete the cached copy via the control panel and the uncached page will be served until we ...
5
votes
3answers
323 views

Is my webserver allowing pre-fetching?

I have an image based website that hosts multiple galleries. When a user clicks one of the images the views property for the particular image is incremented. However, I noticed when using Firefox ...
1
vote
3answers
537 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
403 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 ...
0
votes
0answers
1k views

PHP and Apache using Access-Control-Allow-Origin with AJAX

I am attempting to configure my development environment to allow CORS. The crux of the problem is when making a cross-domain ajax request with custom headers (x-requested-with etc) newer browsers ...
1
vote
1answer
98 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. ...
0
votes
1answer
2k 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 ...
5
votes
1answer
718 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
385 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 ...
6
votes
1answer
2k 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
225 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
719 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
2k 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
450 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
1
vote
1answer
988 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 ...
2
votes
1answer
503 views

HTTP GET get HTTP/1.1 0 response code

Occasionally GET requests to my IIS7 server get a response code of HTTP/1.1 0 I've been trying to find some information on this, but so far I'm coming up empty. I've only seen this sort of behavior ...
1
vote
1answer
394 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
1k 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
369 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
82 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
472 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
634 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
183 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
4k 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
342 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 ...
2
votes
1answer
602 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 ...
1
vote
0answers
1k views

Leverage browser caching on nginx

I am using nginx for my webserver. I am trying to set an expiry date or a maximum age in the HTTP headers for static resources but it doesnt work. This is what i am using; location ~* ...
0
votes
1answer
52 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
653 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
3k 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
487 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
274 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
2k 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 ...
0
votes
1answer
1k 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
408 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?
8
votes
3answers
7k 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 ...
0
votes
0answers
411 views

transfer-encoding:Chunked How to disable, shared host

If I view a TXT file on my shared host it has a content-length. I need the server to generate a TXT file from a GET request. I have changed the mime type to treat .txt as .php files. When I try and ...
4
votes
2answers
221 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
108 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
488 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: ...
6
votes
3answers
2k 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
90 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
129 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
380 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
989 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
312 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
4k 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 ...