Re: 403 status code discards content - is this a bug? is save to not discard it?

Giganews Newsgroups
Subject: Re: 403 status code discards content - is this a bug? is save to not discard it?
Posted by:  Remy Lebeau \(TeamB\) (no.spam@no.spam.com)
Date: Fri, 5 Dec 2008

"jachguate" <jachgua…@gmail.com> wrote in message
news:A62EB7CF386DE340jachgua…@gmail.com...

> I'm using INDY 10.1.1 (close to the snapshot)

10.1.1 is a very old version.  The current snapshot is 10.5.1.

> For debug proposes I commented out the lines switching the ContentStream
> of the response, but I'm wondering if is safe to let this lines stay
> commented
> for production.

No, it is not.  There are other situations where the temp ContentStream
needs to be used in order to avoid corrupting the user's output Stream.
That is why TIdHTTP swaps the ContentStream to begin with.  The response is
in an error state.  The AIgnoreReplies array merely tells TIdHTTP which
response codes to not raise an exception on.  But by ignoring them, there is
no other safe place to place the server's reply content.

> I think, on any possible client I can imagine, there's no reason to
> discard
> the content part of the response at this level.

Sure, there is.  403 is a fatal error either way.  The reply content is
optional, the server is not required to tell you why it rejected the
request.  Just knowing that it did should be enough.

> Just to form my criteria, I used Mozilla Firefox to make a get request to
> the server ensuring a 403 response code, and the browser displays
> the xml document as a result.

Of course it does.  Every browser does.  That is how browsers work.  They
always display whatever data the server provides, regardless of the response
code.

> It makes me think the Indy behavior is wrong.

I disagree.

> I'm trying to post this as a bug report

It is not a bug.

> I need someone with access to the bug reporting to make it
> on behalf of me.

Indy does not have any active bug reporting system at this time.

--
Remy Lebeau (TeamB)

Replies

In response to

403 status code discards content - is this a bug? is save to not discard it? posted by jachguate on Thu, 4 Dec 2008