On Mon, Oct 15, 2018 at 7:13 PM Richard W.M. Jones <rjones@redhat.com> wrote:
On Mon, Oct 15, 2018 at 06:43:10PM +0300, Nir Soffer wrote:
> On Mon, Oct 15, 2018 at 6:21 PM Richard W.M. Jones <rjones@redhat.com>
> wrote:
>
> > On Tue, Oct 09, 2018 at 02:28:10PM +0300, Nir Soffer wrote:
> > > > +# Create a background thread running a web server which is
> > > > +# simulating the imageio server.
> > > >
> > >
> > > This functionality should be separated from the fake SDK module, since
> > it is
> > > not part of the SDK, and may be replaced by real imageio server later.
> >
> > Well possibly, but it was very convenient to put it in the class here,
> > and this test is meant for running completely standalone without any
> > other service available.
> >
> > > > +class RequestHandler(BaseHTTPRequestHandler):
> > > >
> > >
> > > This request handler is using HTTP/1.0, and will close the connection
> > after
> > > every request. This is not a good implementation of the imageio server,
> > and
> > > also
> > > hides bugs in this code.
> > >
> > > Should be fixed by adding:
> > >
> > >     protocol_version = "HTTP/1.1"
> >
> > I tried the attached patch, but for some reason it just hangs.
> >
>
> The issue is probably missing "content-length: 0" header in the
> response. If we don't close the connection and don't send
> content-length the client cannot do much but wait :-)

Ah yes, it was missing from the OPTIONS method.
The attached patch does work.  What do you think?

Looks good

Nir