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

2
votes
1answer
524 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 ...
2
votes
1answer
616 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
498 views

Apache: Force HTTP 1.1 or Persistent/KeepAlive connections for HTTP 1.0 requests

I want to force Keep Alive or Persistent connections for all HTTP requests on my Apache 2.2.3 server running on RHEL 5.8. A lot of web crawlers are using HTTP 1.0 for some reason, and I would like to ...
1
vote
1answer
392 views

Nginx: How to set expiration for 404 responses?

My nginx server acts as a proxy for another server, which sometimes returns 404s. I want the 404 responses to be cacheable, just like 200 responses. However, I cannot use expires, because the ...
1
vote
1answer
466 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
102 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. ...
1
vote
1answer
86 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. ...
1
vote
1answer
552 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 ...
1
vote
1answer
136 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 ...
1
vote
1answer
316 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
1answer
37 views

Measuring HTTP traffic basic on URIs and custom headers

I'm currently working on an API service and one of the requirements is that we measure the amount of data used by each user of the system, and track how many times they use the API. So bandwidth usage ...
0
votes
1answer
319 views

mod_expires doesn't set expiry for images (png,jpeg,gif)

I am using this below configuration in my apache2.conf <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "access plus 6 month" ExpiresByType image/jpg "access plus 6 ...
0
votes
1answer
385 views

Update Cache-Control max-age when srcache returns response from cache

I have configured Nginx to use srcache (along with the redis and redis2 modules). Server-side caching works great. My application responds with the appropriate Expires and Cache-Control headers, and ...
0
votes
1answer
200 views

Inconsistent behavior with Nginx's auth_request_set and more_set_input_headers

I'm trying to use the auth_request module in conjunction with the more_set_input_headers to automatically login my users into web apps. Basically, it works like this: Users have some session cookie ...
0
votes
1answer
167 views

Using Apache variable

I'm trying to use Apache's OpenID authentication module. According to this page, I should be able to use the REMOTE_USER Apache variable to identify the user. I'd like to pass this as a header to an ...
0
votes
1answer
250 views

nginx proxy_pass receive content/status headers when http 4xx

Was having some trouble as chronicled here - http://stackoverflow.com/questions/22570550/play-2-2-1-simpleresult-4xx-response-body-possible-via-cors-xhr But I didn't focus on nginx since the 200 OK ...
0
votes
1answer
91 views

Nginx using mysql result as variable to be used in headers more module

Without going into too much detail we have a requirement for the following: a) Query a simple single column, single row result from mysql. b) Use this variable as part of a more headers module, ...
0
votes
1answer
235 views

Issues with authenticating through HTTP POST

I am currently investigating an issue with our web authentication server not working for a small subset of users. Our method of authentication involves sending a hash through an HTTP POST. My ...
0
votes
1answer
123 views

How to print out all request headers of HTTP requests on the server side?

I have a HAProxy configuration which balances requests to many servers. I want to compare the outgoing request headers when requests go thru HAProxy to the ones I would make directly to my servers. ...
0
votes
1answer
459 views

How do I set up a conditional redirect in Tomcat

I have Tomcat running Jira. I have two DNS names that are attached to this site - mysite.myorg.com and mysite.myorg.net. I want the mysite.myorg.com to redirect all users to mysite.myorg.net since I ...
0
votes
1answer
640 views

nginx expires directive without Cache Control header

Is it possible to use the expires directive in nginx to display the "Expires" header alone without the Cache-control ? Also I've seen some websites whose max-age value decrements over time. Example ...
0
votes
1answer
265 views

GoAccess analytics and HTTP Referer

This is a high-level question regarding using goaccess as a tool for website analytics. I have it set up on an nginx server and parsing the logs just fine, but it seems that many requests to my own ...
0
votes
1answer
1k views

Cache Control Headers with IIS 7.5

I'm trying to wrap my head around client side (web browser) caching and how it works in relation to IIS 7.5 cache control headers. In particular: If we want to force clients to reload cached ...
0
votes
1answer
333 views

Have set Expiration time: Still getting “Query string present but no explicit expiration time”

I have one local Apache instance running with mod_cache (+ disk & mem) enabled, and it seems to cache content from my appserver fine. My app server sets Expiration headers and Last-modified. Yet, ...
0
votes
1answer
432 views

nginx rule to capture header and append value as query string

I have an interesting problem I need to solve in nginx: one of the sites I'm building receives inbound traffic on port 80 (and only port 80) which may have a certain header set in the request. If this ...
3
votes
0answers
577 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
0answers
40 views

Strange faulty 16000d response timing in gdevtools for specific XHR

We have some XHR on our website, that is reported in Google developer tools' network timeline as Receiving for 16035.5 days. There actually is a response, and for sure it does not take as long as ...
1
vote
0answers
17 views

Partial content 206 requests on nginx behind WebAuth

I'm having a troubleshooting an issue that I think is likely due to WebAuth authentication when serving .webm videos. The server I have is nginx 1.6.2. I can make 200 GET requests just fine. I also ...
1
vote
0answers
27 views

Haproxy: reject traffic by user agent from file

I am trying to reject connections from specific user agents (by matching a substring of the user-agent header) using an haproxy ACL with -f option to read from a file. However it is not working, it ...
1
vote
0answers
120 views

How to change http header using nginx

We have a problem that a backend system requires the parameters of the Content-Type http header to be in a certain order. For example (note the position of the type="text/xml"): Content-Type: ...
1
vote
0answers
146 views

Can not I properly configure expires headers for apache

I am trying to configure caching for static js/css/img on apache2 (I am using ubuntu). I do not want to use .htaccess due to this answer. So I tried the following: enabled modexpires modified ...
1
vote
0answers
46 views

Apache configured for HSTS, but SSLLabs/Chrome not acknowledging

I'm setting up a webserver and I've been checking it against SSLLabs and Chrome 31 to make sure the security is up to snuff. However neither Chrome nor SSLLabs seems to believe that strict transport ...
1
vote
0answers
777 views

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 ...
1
vote
0answers
97 views

nginx: how to serve files in gzip format when client accepts “Accept-Encoding: gzip” and inflated otherwise?

I have a folder full of .gz files and would like to serve them transparently inflated if requested by a client that does not send Accept-Encoding: gzip in the request and as-is (gzip'd) otherwise. I ...
1
vote
0answers
750 views

IE 10 HTTP 401 Error on AJAX POST

I've been chasing down an issue and decided to make the most basic reproduction of the issue possible in hopes that a simplified question will help me resolve this. I am receiving a 401 error when ...
1
vote
0answers
362 views

Why pragma: no-cache does not work anymore on IE?

On my employer web server, we have 200+ PHP applications with this kind of code to allow download of a file : header('Content-Disposition: attachment; filename="file.pdf"'); header('Expires: 0'); ...
1
vote
0answers
2k 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 ~* ...
1
vote
0answers
751 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 ...
1
vote
0answers
436 views

Apache HTTP: Conditionally Set the Last-Modified header

I want to set the Last-Modified date with one of these values: If the request header has the If-Modified-Since value, use this value Else use current date How can I configure this in apache's ...
0
votes
0answers
26 views

Enable charset header in nginx 301

I have nginx redirecting http requests to https. Currently the header in the redirect is Content-Type: text/html. I want it to be Content-Type: text/html;charset=utf-8. Here it says I need a custom ...
0
votes
0answers
35 views

Set Headers for JSON in Apache proxy

Hello I try set header JSON in Apache proxy. I need this for test login in website. Below I put my apache config. <VirtualHost *:80> ServerName zx.xxxxxxx.xxxxxx.fr ServerAdmin ...
0
votes
0answers
25 views

Setting an Apache header's value based on a mapping?

Suppose I have an environment variable REMOTE_ROLES having a comma-separated list of value(s), e.g., "A, B, C". I want to set an HTTP request header X-Remote-Roles to a comma-separated list of those ...
0
votes
0answers
32 views

Apache configuration redirect using only redirect, not rewrite

PS: this is the 2nd part of the question originally posted here. I'd like to disable the HSTS header completely for specific virtual hosts. I have (per recommendation) a redirect in the 443 container ...
0
votes
0answers
96 views

handling CORS preflight request in Apache

I have a AngularJS app deployed using Yeoman. Cakephp RESTful backend. The Angular app sends in OPTIONS preflight requests, which the backend responds with forbidden (403), in nginx to solve this ...
0
votes
0answers
83 views

Override PHP Cache-Control Header from Apache config?

PHP is setting the Cache-Control header in multiple places. I don't want to break my code upgrade path, but I'd like to change the Cache-Control header in Apache config instead. However, it looks like ...
0
votes
0answers
53 views

google webmaster soft 404 on 301

I'm looking through google webmaster that my page is generating soft 404 errors (https://support.google.com/webmasters/answer/181708?hl=en) google says: We recommend that you always return a 404 (Not ...
0
votes
0answers
30 views

How to set header for non-self-referencing URI in Apache?

I have to cache web pages with URL path teacher and student like so: <LocationMatch "^/(teacher|student)/"> Header set Cache-Control "private, max-age=60" </LocationMatch> However, ...
0
votes
0answers
148 views

MS TMG - forward original user ip in request

How can we configure our TMG to pass original user's IP in HTTP request? We need it for additional security in application, but we see only TMG's IP. How can we setup X-Forwarded-For or another field? ...
0
votes
0answers
81 views

Where do I specifiy custom HTTP range-header entities and the necessary logic behind an entitiy?

I have a large JSON file which consists of xyz records. I'm looking for a way to retrieve parts of the file and have been reading the http-specs on how to define HTTP range-headers in Apache. The ...
0
votes
0answers
63 views

Apache rendering page as plain/text with leading 0

I'm having an intermittent issue with an Apache Server( 2.0.44 ) rendering output as plain/text. The header has the correct Content type, but on occasion the Header and page content is output as ...