public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
From: David Daney <ddaney@avtrex.com>
To: Wolfgang Baer <WBaer@gmx.de>
Cc: mauve-patches@sources.redhat.com,  tromey@redhat.com
Subject: Re: RFC: HTTPTestServer
Date: Thu, 02 Mar 2006 23:49:00 -0000	[thread overview]
Message-ID: <44078472.4010802@avtrex.com> (raw)
In-Reply-To: <44076403.5080207@gmx.de>

Wolfgang Baer wrote:
> Hi,
> 
> Wolfgang Baer wrote:
> 
>>Tom Tromey wrote:
>>
>>>David Daney had the interesting idea that we could have a mini http
>>>server inside of Mauve, which we could then use to test all the http
>>>modes we care about.  Specifically what he had suggested was encoding
>>>the desired response into the request, so we could check 404s,
>>>redirects, chunking, etc.
>>
>>
>>Thats definitly the way to go.
>>
>>
>>>Just in case you're really motivated to hack in this area ...  :-)
>>
>>
>>Not at this time. I just tried to get the bugs fixed I found during
>>working on the IPP backend for printing and which prevented me from
>>hacking.
> 
> 
> Well, as I wanted to test Davids Headers rewrite patch I needed to do
> a first hack of a TestHttpServer.
> 
> Here we go:
> 
> The TestHttpServer has methods to set the Headers and the Body it
> should return upon request. Furthermore it provides an interface
> which can be implemented to test the serverside received headers and body.
> 
> As I am not experienced in this networking area this might be a hack.
> However a hack which is working so far :-)
> 
> I also wrote two tests to show the usage.
> 
> responseCodeTest - test for all error codes the correct handling for
>                    getInputStream and getErrorStream.
> responseHeadersTest - tests everything with response headers.
> 
> 2006-03-02  Wolfgang Baer  <WBaer@gmx.de>
> 
> 	* gnu/testlet/java/net/HttpURLConnection/TestHttpServer.java: New file.
> 	* gnu/testlet/java/net/HttpURLConnection/responseCodeTest.java:
> 	New test using TestHttpServer.java.
> 	* gnu/testlet/java/net/HttpURLConnection/responseHeadersTest.java:
> 	Likewise.
> 
> 
> Comments or OK to commit ?

I am of a mixed mind on that.

Here in mauve, no formal permission is needed to commit.

At the highest level this is what I had in mind, but I had pictured it 
in my mind as being implemented slightly differently.  I was thinking 
about something similar to a servlet engine, where the capabilities of 
the server could be changed by writing different plug-in classes for it. 
  You have a limited set of capabilities hard coded in the server, so 
the server has to change if we want to do something that it does not 
support.  Also it has no support for multiple connections or multiple 
requests on a keep-alive connection.

Not withstanding all of that, I think it is an excellent start to a very 
much needed capability.  Just because it is not exactly what I would 
have done does not mean that it is not good and useful.

My call:  You decide.  Commit it in as is, or keep hacking and commit later.

Thanks,
David Daney

  reply	other threads:[~2006-03-02 23:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-04 14:07 FYI: New tests for HttpURLConnection Wolfgang Baer
2006-02-04 14:16 ` Wolfgang Baer
2006-02-09  1:58 ` Tom Tromey
2006-02-09  7:48   ` Wolfgang Baer
2006-03-02 21:26     ` RFC: HTTPTestServer (was: Re: FYI: New tests for HttpURLConnection) Wolfgang Baer
2006-03-02 23:49       ` David Daney [this message]
2006-03-06 18:46         ` RFC: HTTPTestServer Wolfgang Baer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44078472.4010802@avtrex.com \
    --to=ddaney@avtrex.com \
    --cc=WBaer@gmx.de \
    --cc=mauve-patches@sources.redhat.com \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).