W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2002

Re: HTTP 1.1, proxy servers, and failed connections

From: Roy T. Fielding <fielding@apache.org>
Date: Mon, 13 May 2002 15:03:24 -0700
Cc: ietf-http-wg@w3.org
To: Bob Scheifler - SMI Software Development <rws@east.sun.com>
Message-Id: <3F250C10-66BD-11D6-B342-000393753936@apache.org>

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.

....Roy
Received on Monday, 13 May 2002 18:03:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:49:18 GMT