You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Ortwin Glück <or...@nose.ch> on 2002/08/29 10:10:22 UTC

[HttpClient] strict mode

When checking the web app tests I ran across the strictmode property of 
HttpMethodBase.

The behaviour of the client beeing in strict mode seems not clear to me. 
Currently, when strict mode detects a violation of the protocol it 
returns from the method and puts out a warning log message.
IMHO if somebody wants the protocol to be checked strictly we should 
throw a HttpException when the protocol specs are violated and log an 
error message.

StrictMode is considered "experimental" but is turned ON by default. 
Experimental features should default to OFF.

I know there was a discussion here once about a more general approach 
towards switching individual features of HTTP on/off and configuring the 
behaviour of HttpClient in a more detailed way. So maybe this StrictMode 
stuff will become deprecated in future versions anyway?



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [HttpClient] strict mode

Posted by Jeff Dever <js...@sympatico.ca>.
It would be "better" for the internet if all clients/servers conform to the
applicable specs.  At the same time, a good protocol implementation should be
tolerant in what it takes in but strict in what it sends out.  I beleive that
all the checks for strict mode are for whats not read; whats written is always
supposed to be spec conforming (correct me if I'm wrong).

But if httpclient is used in a testing capacity (its original roots) then being
strict on what is received is beneficial to test for servers being out of spec.


>
> The behaviour of the client beeing in strict mode seems not clear to me.
> Currently, when strict mode detects a violation of the protocol it
> returns from the method and puts out a warning log message.
> IMHO if somebody wants the protocol to be checked strictly we should
> throw a HttpException when the protocol specs are violated and log an
> error message.

Agreed.  If the programmer sets strict mode, they should be notified with a
HttpException.

>
>
> StrictMode is considered "experimental" but is turned ON by default.
> Experimental features should default to OFF.
>
> I know there was a discussion here once about a more general approach
> towards switching individual features of HTTP on/off and configuring the
> behaviour of HttpClient in a more detailed way. So maybe this StrictMode
> stuff will become deprecated in future versions anyway?
>

In the short term, your reccomendation is good: strict mode off by default.  It
is likely that strict mode will change at a later date, and thus should remain
"experimental".


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>