HTTP proxy error status codes
Asked Answered
T

2

6

The application is Node.js based web crawler that does requests to remote servers via request library.

Requests are made through authenticated HTTP proxy servers with 99% and higher uptime, provided by third party vendor.

I'm trying to process HTTP codes for request errors response that can be likely caused by malfunctioning proxy. It's expected that after reaching a threshold of these HTTP codes, a flag that a proxy is unreliable will be triggered, so a proxy will be queued for diagnostics. And I expect some codes to have more weight.

Currently I'm processing 407 (proxy authentication) and 408 (request timeout) HTTP codes for proxies.

Are there other HTTP codes that are commonly caused by malfunctioning HTTP proxies?

I hope the question is specific enough. I assume that possible malfunction (and a set of possible HTTP error status codes) depends on actual proxy and its environment. We should consider these proxies black boxes because they are provided by a third party.

The question isn't about HTTP status codes in general, only error codes can be caused by malfunctioning proxies (forward proxies).

Thais answered 25/3, 2018 at 14:22 Comment(3)
I cannot provide the comprehensive list of error status codes , but maybe docs.aws.amazon.com/apigateway/api-reference/handling-errors will be a good starting point for referenceKhasi
iana.org/assignments/http-status-codes/http-status-codes.xhtmlForcible
en.wikipedia.org/wiki/List_of_HTTP_status_codesForcible
S
5

According to HAProxy docs (one of the most popular proxy solution)

Haproxy may emit the following status codes by itself:

  • 200 access to stats page, and when replying to monitoring requests
  • 301 when performing a redirection, depending on the configured code
  • 302 when performing a redirection, depending on the configured code
  • 303 when performing a redirection, depending on the configured code
  • 307 when performing a redirection, depending on the configured code
  • 308 when performing a redirection, depending on the configured code
  • 400 for an invalid or too large request
  • 401 when an authentication is required to perform the action (when accessing the stats page)
  • 403 when a request is forbidden by a "block" ACL or "reqdeny" filter

  • 408 when the request timeout strikes before the request is complete

  • 500 when haproxy encounters an unrecoverable internal error, such as a memory allocation failure, which should never happen
  • 502 when the server returns an empty, invalid or incomplete response, or when an "rspdeny" filter blocks the response.
  • 503 when no server was available to handle the request, or in response to monitoring requests which match the "monitor fail" condition
  • 504 when the response timeout strikes before the server responds
Scottscotti answered 4/4, 2018 at 8:20 Comment(0)
A
-1

"Caused by proxy" I'd understand everything including the word "gateway in its name, basically.

The trick here is non-standard HTTP error codes, implemented/invented specifically by providers.

An answered 4/4, 2018 at 8:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.