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
2
votes
0 answers

Haproxy don't capture added header

I can add new header in haproxy with the "http response add-header" function and it's done successfully because i can see those added headers in my http packet when i use Wireshark. The problem is i can't capture them. I use the "capture response…
Computron
  • 29
  • 3
2
votes
1 answer

On-the-fly decoding HTTP bodies on Linux?

My wish is to monitor HTTP exchanges between my server and a browser. At present time, I use the localhost because I'm developping the app. I installed and used tcpflow and found it quite useful but the body of the response is encrypted (no https, I…
dom_beau
  • 139
  • 1
  • 3
2
votes
2 answers

How to replace the host variable in a header in nginx

I am trying to replace the host variable in the header in nginx configuration, such that some.random.sub.example.net becomes net-some.random.sub.example.com. i have tried the following : if ($host ~* "^([^.]+(\.[^.]+)*)\.example.net$"){ set $sub…
2
votes
2 answers

What's the purpose of spammy HTTP referers?

In the logs of my website, there's a lot of visits with a HTTP referer set to spam-like websites (usually Russian sites, I've noticed). I assume what they're doing is just using a web crawler to visit any site they find with the HTTP referer as…
user280917
2
votes
0 answers

Error: No 'Access-Control-Allow-Origin' header is present on the requested resource. (NGINX)

I am using NGINX and I am receiving that error in the browser's console. I am so frustrated. According to my boss, I need to set up cors which what I did and still I am getting the same error. This is the full error OPTIONS…
Reacting
  • 223
  • 1
  • 3
  • 8
2
votes
0 answers

HAProxy: Limmit concurrent connections based on HTTP header field

I try to limit the number of concurrent connections using HAProxy stick-tables based on HTTP header fields. I could find plenty of examples using IP addresses, but this doesn't work in my case. Our application differs user account solely on the HTTP…
Ralph
  • 33
  • 5
2
votes
1 answer

Debug Nginx caching

I want to determine when I am getting cache hits or misses. Preferably, this would be a header, like X-Cache: HIT or X-Cache: MISS How can I do this with Nginx (a reverse proxy for the upstream server)?
Paul Draper
  • 317
  • 5
  • 24
2
votes
1 answer

Does Nginx respect maxage from upstream server?

I see the proxy_cache_valid directive, but that confuses me. In HTTP, doesn't the upstream server specify this with Cache-Control and maxage? How do I get Nginx's cache to use maxage ?
Paul Draper
  • 317
  • 5
  • 24
2
votes
1 answer

Conditionally serving high resolution and WebP images with nginx

Not sure if I'm trying to pull off the impossible, but I'm wanting to configure Nginx to serve ".webp" files to browsers that support the file format and serve fallback files (i.e. pngs, jpgs, etc.) to browsers that don't yet support the WebP…
kaffolder
  • 285
  • 1
  • 2
  • 7
2
votes
3 answers

Having trouble removing HTTP header "Cache-control"

I'm trying to get my assets cached using Cloudflare Cloudflare states here that "CloudFlare will not cache your site or static content if you have no-cache and private headers coming from your server" As you can see from my file response,…
onassar
  • 223
  • 2
  • 9
2
votes
1 answer

Under what scenarios would Apache allow a mismatched HTTP_HOST to pass through?

Someone has managed to pass an undefined HTTP_HOST server variable to my application script, triggering a series of errors. I am quite perturbed but am unable to replicate this behaviour. My httpd server uses name-based virtual hosting with the…
Question Overflow
  • 2,103
  • 7
  • 30
  • 45
2
votes
1 answer

What is expected behaviour from Server returning Http 416

I have a server and sometimes when client ask for a file and if its request header Range may get over the length of file, so the server returns 416 status code. But I'm wondering should it write file content too ? or simply return 416 with no…
xmen
  • 121
  • 3
2
votes
1 answer

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 documentation states that: expires works only for 200,…
Ruben Verborgh
  • 171
  • 1
  • 10
2
votes
2 answers

IIS 7.5 Server response headers (UrlScan does not work)

In the past you could use UrlScan by Microsoft to modify the headers and remove the one's displaying IIS version for example. This does not work for IIS 7.5 and IIS 7.0 is the latest version supported. Is there any way I can still remove some…
Rob
  • 147
  • 1
  • 5
  • 17
2
votes
1 answer

Apache returns 206 for some MP3's

We're trying to serve MP3 files from web1.cowbird.com. Most of the time everything works fine. However, sometimes there's a file that the browser is unable to play, and I have no idea why. Here is an…
Dave
  • 141
  • 5