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