Stepan Mishura wrote:
> On 2/21/06, Tim Ellison <[EMAIL PROTECTED]> wrote:
> 
>> Stepan Mishura wrote:
>>> I glanced through a local server code from HARMONY-57 contribution
>> without
>>> looking into implementation details and ... this made me think. I catch
>> hold
>>> of the following:
>>> 1) The server contains some testing code that looks not good for me
>> Care to explain?
> 
> 
> Support_HttpServer.java has the following code:
> 
> class ServerThread implements Runnable {
>     public void run() {
>          ....
>         // call the test function based on the requested resource
>          if (resourceName.equals(CHUNKEDTEST))
>              chunkedTest();
>          <... lot of 'else if' ...>
>         ...
>        }
> 
>        private void chunkedTest() {
>             <... construct server's respond and send it ...>
>        }
> 
> I'd prefer to avoid this and to have a server implementation that provides a
> way for unit test to check received request and to configure a server's
> respond.

and I thought you wanted it simple ;-)

There is no way to force a server to send you a chunked response using
regular HTTP headers, so in this case the server and client have an
understanding that when the client asks for a particular resource the
server will send it back in chunks.

If that understanding was encoded differently, say in the search field
of the URL rather than the path would that make you happier?  do you
have some other idea?

<snip>

>> Does it interfere with what you want to do?
> 
> Sure, we have javax.security.auth.kerberos.KerberosTicket class that
> currently contains a stub. I was thinking about implementing the stub and
> how to test it. So I played a little bit with developing Kerberos stub
> server. When I saw that tests for URLConnection class failed because they
> need local stub server then I got interested how to solve this similar
> issue.

Not clear how that interferes.  You should feel free to reuse the server
code and extend it as you need to do a faux Kerberos server.

Regards,
Tim

-- 

Tim Ellison ([EMAIL PROTECTED])
IBM Java technology centre, UK.

Reply via email to