Questions tagged [http-status-code]

61 questions
22
votes
3 answers

How can I use a custom 503 error document when HAProxy sends a 503 HTTP code?

I would like haproxy to use its own 503 document page when back server (backend) sends HTTP 503 code. Is it possible? Have seen something like "monitor fail" conditions but don't know how to add it to the frontend.
Marcin
  • 603
  • 4
  • 8
  • 15
17
votes
3 answers

How do I configure nginx to return 429 http code when rate limiting?

How do I configure nginx to return http status code 429 (Too Many Requests) instead of the default 503 (Service Unavailable) when throttling/rate limiting? FYI, I'm using nginx as a reverse proxy with the HttpLimitReqModule. The draft spec for 429…
adambrod
  • 283
  • 1
  • 2
  • 6
13
votes
1 answer

What does http code 206 (partial content) really mean?

I'm building a page (using video.js, should it matter) that holds players for a reasonably large number of videos -- click a button on a thumbnail of the image and a modal player opens up, playing the video. Works fine; no big deal. My server is…
Jim Miller
  • 713
  • 2
  • 11
  • 23
12
votes
2 answers

How to check HTTP response code of a secured website with Nagios?

I want to create a nagios check of my secure website. All the check needs to do is login to the site with login details that I pass the script. Does anyone know of a plugin or script that will allow me to do this? I have tried using check_http, but…
Simon Foster
  • 2,572
  • 6
  • 36
  • 54
11
votes
3 answers

Is it safe to use HTTP status 308 Permanent Redirect?

Is it safe to use the HTTP status code 308 Permanent Redirect (suggestion) in server responses? The issue with 301 Moved Permanently is that it only works with GET requests (to be fair: POST will transform to GET which is NOT an option). The status…
burnersk
  • 1,966
  • 4
  • 25
  • 38
10
votes
2 answers

POST request is repeated with nginx loadbalanced server (status 499)

double uploads Ever since we went from a simple Apache instance to a loadbalanced environment, there are sometimes issues with POST requests getting repeated. We are running nginx as reverse proxy. Static content is being served by nginx itself, and…
Nanne
  • 602
  • 2
  • 8
  • 26
9
votes
3 answers

What's the difference between 301 and 302 in HTTP?

I see all tinyurl like sites use 302 But what's the difference?Seems both are working for me
vps
  • 1,187
  • 3
  • 12
  • 12
6
votes
1 answer

HTTP status code to signal bad or missing Host header

Is there an HTTP status code which is appropriate to use for clients which send a bad hostname (or none at all) through SNI or the HTTP Host header? An older question address how and why such requests happen in the first place as well as how you can…
kasperd
  • 29,894
  • 16
  • 72
  • 122
5
votes
2 answers

Best error code for 'generic error'

I'm creating custom error pages for my site. I want one that, if there is a generic error (invalid querystring, improper authentication, etc.) that will be shown. This is easy enough, problem is, what error code would this be? 404 is not found,…
Freesnöw
  • 193
  • 1
  • 6
4
votes
3 answers

HTTP/1.1 Status Codes 400 and 417, cannot choose which

I've got a processing file which handles the user sent data, before that, however, it compares the input from client to the expected values to ensure no client-side data change. I can say I don't know lot about HTTP status codes, but I have made up…
ASertacAkkaya
  • 143
  • 1
  • 4
4
votes
3 answers

Disabling IIS 7.5 server error response for 5xx and 4xx HTTP status codes

Is there any way to prevent IIS from automatically overriding the output of a web app that is returning a status code in the 500 or 400 range? Just as an example, in ColdFusion I can create the following page:
Jordan Reiter
  • 1,260
  • 4
  • 17
  • 38
3
votes
1 answer

nginx: how to disable access_log for ($http_status == 200)

Is there any way to disable access_log for 200 HTTP response code? I tried using conditions but it seems access_log directive is not allowed in an if block. I tried this: access_log /var/log/nginx/access_log; if ($http_status == 200){ …
mdaliyan
  • 33
  • 1
  • 5
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
1 answer

How to return 410 with lighttpd

I have a subdomain with service I am going to kill. I'd like to use 410 to mark it as such. Is there a way to do that with lighttpd without resolving to mod_magnet and lua scripts?
Almad
  • 151
  • 7
2
votes
2 answers

How should web servers handle requests with incorrect Host header?

I am getting a number of requests to my site with the Host header set incorrectly (most commonly to the IP address instead of domain name). Currently I am returning 400 Bad Request. I am thinking of returning 301 or 302, but not sure if it's a good…
Flash
  • 119
  • 4
1
2 3 4 5