Re: HTTP 1.1, proxy servers, and failed connections

On Monday, May 13, 2002, at 09:39  AM, Bob Scheifler - SMI Software 
Development wrote:

>>> If a proxy server, when initiating a connection to the real server,
>>> gets ECONNREFUSED, EHOSTDOWN, or EHOSTUNREACH, what error should
>>> it return to the client? Some existing proxy servers return 500,
>> It should return 502 (Bad Gateway).
> Are you sure? I'm surprised at that. The RFC says 502 means:
>    The server, while acting as a gateway or proxy, received an invalid
>    response from the upstream server it accessed in attempting to
>    fulfill the request.
> I would have thought "invalid response" means a response that is
> contrary to (non-conforming with) the specification. I would take
> it to mean the upstream server actually responded, but incorrectly.

Yes, I am sure.  ECONNREFUSED is a response, but not an HTTP response.

> How do you define "invalid response"?

Why does that matter?  The purpose of HTTP status codes is to define the
range of automated action that can be taken by the user agent in reaction
to the response.  The rest of the information is in the text of the 502
message body.

You will find that what the user agent needs to do for no-connection is
identical to what it needs to do for other 502 situations.


Received on Monday, 13 May 2002 18:03:54 UTC