search for: discard_request

Displaying 3 results from an estimated 3 matches for "discard_request".

2018 Nov 20
2
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...HTTPRequestHandler): > + protocol_version = 'HTTP/1.1' > + > def do_OPTIONS(self): > - self.send_response(200) > - self.send_header("Content-type", "application/json; charset=UTF-8") > - self.end_headers() > + self.discard_request() > + > # Advertize only zero support. > - self.wfile.write(b'''{ "features": [ "zero" ] }''') > + content = b'''{ "features": [ "zero" ] }''' > + length = len(conten...
2018 Oct 15
3
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
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 > >
2018 Nov 20
0
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
....py > index 84b9d56aa..8d1058d67 100644 > --- a/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/__init__.py > +++ b/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/__init__.py > @@ -146,7 +146,7 @@ class RequestHandler(BaseHTTPRequestHandler): > self.end_headers() > > def discard_request(self): > - length = self.headers['Content-Length'] > + length = self.headers.get('Content-Length') > if length: > length = int(length) > content = self.rfile.read(length) > -- > 2.19.0.rc0 FYI I have tested this...