search for: send_head

Displaying 14 results from an estimated 14 matches for "send_head".

Did you mean: end_head
2018 Oct 15
3
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...robably 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 :-) > > + def do_OPTIONS(self): > > > > + self.send_response(200) > > > + self.send_header("Content-type", "application/json; > > > charset=UTF-8") > > > + self.end_headers() > > > + # Advertize only zero support. > > > + self.wfile.write(b'''{ "features": [ "zero" ] }''...
2018 Nov 20
2
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...,24 +116,44 @@ from http.server import HTTPServer, BaseHTTPRequestHandler > import threading > > class RequestHandler(BaseHTTPRequestHandler): > + 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" ] }''&...
2007 Jul 30
1
streaming response
...sleep wait response.write json end response.done = true end writing the headers myself. i''d much prefer to do something like this: Proc.new do response.send_status_no_connection_close(nil) # nil = no content-length response.send_header response.write("\n\n") while true sleep wait response.write json end response.done = true end Does anyone have suggestions on how to clean up my code so that I don''t need to touch raw HTTP? Thanks! ry
2016 May 04
9
[PATCH 0/8] python: PEP 8 fixes
Hi, this series cleans up the Python sources, either static or generated, including also tests, to make them PEP 8 compliant; see https://www.python.org/dev/peps/pep-0008/ and tools like pep8. Almost all the issues reported by pep8 are fixed, reducing the issues from 3818 to 7. The changes should have no effect on the actual code, while it will help Python users with consistency with other
2006 Jul 25
6
Subtract a field from the current time in MySQL?
I have the following: Table Products: With a column called "purchased_at" of type "datetime". Products.find(:all, :conditions => ["? - purchased_at >= 120", Time.now]) Why doesn''t that work? What I''m trying to do is find records that were purchased less than or equal to 2 minutes ago. Thanks for your help. -- Posted via
2018 Oct 09
2
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...d 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" > + def do_OPTIONS(self): + self.send_response(200) > + self.send_header("Content-type", "application/json; > charset=UTF-8") > + self.end_headers() > + # Advertize only zero support. > + self.wfile.write(b'''{ "features": [ "zero" ] }''') > + > + # eg. zero reque...
2018 Oct 15
0
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...; 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. > > + def do_OPTIONS(self): > > + self.send_response(200) > > + self.send_header("Content-type", "application/json; > > charset=UTF-8") > > + self.end_headers() > > + # Advertize only zero support. > > + self.wfile.write(b'''{ "features": [ "zero" ] }''') > > + &...
2005 Aug 25
0
multiple refreshs clicks cause errors in WEBrick
...c:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:324:in `write'' c:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:324:in `<<'' c:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:324:in `_write_data'' c:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:180:in `send_header'' c:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:103:in `send_response'' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:79:in `run'' c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:144:i...
2018 Sep 20
0
[PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...r import HTTPServer, BaseHTTPRequestHandler +import random +import threading + +# Choose a random port number in range [50000,59999] +imageio_port = random.randint(50000,60000) + +class RequestHandler(BaseHTTPRequestHandler): + def do_OPTIONS(self): + self.send_response(200) + self.send_header("Content-type", "application/json; charset=UTF-8") + self.end_headers() + # Advertize only zero support. + self.wfile.write(b'''{ "features": [ "zero" ] }''') + + # eg. zero request. Just ignore it. + def...
2018 Sep 20
7
[PATCH v2 0/3] v2v: -o rhv-upload: Add a test.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-September/msg00121.html v2: - Rewrote patch 2 from scratch so it incorporates Nir's suggestions. - Add fake module to EXTRA_DIST. - Retested. Unfortunately I am no longer able to test the ordinary conversion path because ovirtsdk4 is incompatible with Fedora 29 / Python 3.7:
2006 Aug 24
3
Mousehole stuff
Hey everyone, I''m using mousehole for the first time today (love the artwork, btw) and I seem to be having problems with Camping and Markaby. When I go to the Apps page I get: Camping Problem! MouseHole::Controllers::RApps.GET TypeError /Users/tzaharia/Sites/mouseHole/lib/mouseHole/views.rb:78:in `+'': can''t convert String into Array:bla bla bla... The line in question
2011 Aug 15
3
- WEBrick server refuses to launch
...write'' C:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/ httpresponse.rb:324:in`<<'' C:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/ httpresponse.rb:324:in`_write_data'' C:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/ httpresponse.rb:180:in`send_header'' C:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/ httpresponse.rb:103:in`send_response'' C:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/httpserver.rb: 79:in `run'' C:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/server.rb: 173:in `start_thread&...
2018 Sep 19
4
[PATCH 0/3] v2v: -o rhv-upload: Add a test.
This adds a test of -o rhv-upload. Obviously for an upstream test we cannot require a working oVirt server. This test works by faking the ovirtsdk4 Python module, setting PYTHONPATH so that the fake module is picked up instead of the real module (if installed). However it's more complex than that because the nbdkit plugin also expects to talk to a working imageio HTTPS server. Therefore
2007 Sep 18
10
Routes
hi all, I want to move some routing tasks out of the router and into the controller. The goal is to make Merb feel less like mod_rewrite and give the user more control at the controller. The new Router is simple: it takes the path_info (not the whole request) then outputs a controller class and some parameters from the path matching. The rest of the routing would be done at the controller level.