Displaying 20 results from an estimated 44 matches for "send_response".
2018 Oct 15
3
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...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 :-)
> > + 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'''{ "feat...
2018 Oct 09
2
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...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"
> + 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 Oct 15
0
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...plementation 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.
> > + 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&...
2007 May 24
4
Multiple EM connections on separate threads
Hi EM Gurus,
I''m hoping someone can shed some light on the following...
I''m using a 3rd party (legacy) server that can accept up to 8
simultaneous connections on one port.
I''ve been able to make multiple connections to this server from within
one call to EventMachine::run {...}.
Specificaly, I can access each connection separately using:
em_thread = Thread.new do
2018 Nov 20
2
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...ule/ovirtsdk4/__init__.py
> @@ -116,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":...
2006 Mar 28
7
Is Ruby stable for production use?
.../usr/lib/ruby/1.8/webrick/httpresponse.rb:324:in `_write_data''
/usr/lib/ruby/1.8/webrick/httpresponse.rb:296:in `send_body_string''
/usr/lib/ruby/1.8/webrick/httpresponse.rb:187:in `send_body''
/usr/lib/ruby/1.8/webrick/httpresponse.rb:104:in `send_response''
/usr/lib/ruby/1.8/webrick/httpserver.rb:79:in `run''
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread''
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread''
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start''...
2007 Nov 14
7
BackgrounDRb version 1.0RC1 available now
...worker_name :bar_worker
def create
# this method is called, when worker is loaded for the first time
puts "starting a bar worker"
end
def process_request(p_data)
user_input = p_data[:data]
result = self.send(user_input[:method],user_input[:data])
send_response(p_data,result)
end
end
''create'' method gets called, when worker is loaded and created. Each
worker runs in its
own process and you can use ''create'' for initializing worker specific stuff.
All the requests, sent from rails, to bdrb would be received i...
2009 Apr 10
4
rails2.3/ruby1.9: invalid byte sequence in utf-8 with blank?
...ller/response.rb:119:in
`etag=''
ror/vendor/rails/actionpack/lib/action_controller/response.rb:185:in
`handle_conditional_get!''
ror/vendor/rails/actionpack/lib/action_controller/response.rb:143:in
`prepare!''
ror/vendor/rails/actionpack/lib/action_controller/base.rb:531:in
`send_response''
ror/vendor/rails/actionpack/lib/action_controller/base.rb:525:in
`process''
ror/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in
`process_with_filters''
ror/vendor/rails/actionpack/lib/action_controller/base.rb:391:in
`process''
ror/vendor/rails/acti...
2018 Sep 20
0
[PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...mageio server.
+
+from http.server 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 reques...
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:
2007 Dec 06
10
Feedback on RC2
I tried to upgrade my existing application to RC2 last night. Like many, I
use this mostly for running scheduled tasks. For the moment, I''ve abandoned
the effort, but am looking forward to being able to use this. Feedback
below:
First, the reason I was looking forward to this upgrade was to use the
threaded scheduler. I have an application with long-running tasks. I found
that
2008 Mar 10
12
[RFC][PATCH] Use ioemu block drivers through blktap
When I submitted the qcow2 patch for blktap, suggestions came up that
the qemu block drivers should be used also for blktap to eliminate the
current code duplication in ioemu and blktap.
The attached patch adds support for a tap:ioemu pseudo driver. Devices
using this driver won''t use tapdisk (containing the code duplication)
any more, but will connect to the qemu-dm of the domain. In
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
2007 Oct 30
1
xen xm list: DomUs blocked
...it__
self.handle()
File "BaseHTTPServer.py", line 316, in handle
self.handle_one_request()
File "BaseHTTPServer.py", line 310, in handle_one_request
method()
File "/usr/lib/python2.5/site-packages/xen/util/xmlrpclib2.py", line 66, in
do_POST
self.send_response(200)
File "BaseHTTPServer.py", line 368, in send_response
(self.protocol_version, code, message))
File "socket.py", line 262, in write
self.flush()
File "socket.py", line 249, in flush
self._sock.sendall(buffer)
error: (32, ''Broken pipe'&...
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
2008 Jun 11
1
xen migrate never ends
...usr/lib/python2.5/BaseHTTPServer.py", line 316, in handle
self.handle_one_request()
File "/usr/lib/python2.5/BaseHTTPServer.py", line 310, in
handle_one_request
method()
File "/usr/lib/python2.5/site-packages/xen/util/xmlrpclib2.py", line
82, in do_POST
self.send_response(200)
File "/usr/lib/python2.5/BaseHTTPServer.py", line 368, in send_response
(self.protocol_version, code, message))
File "/usr/lib/python2.5/socket.py", line 262, in write
self.flush()
File "/usr/lib/python2.5/socket.py", line 249, in flush
self._soc...
2007 Dec 25
6
error: no marshal_dump is defined for class Thread
...endor/plugins/backgroundrb/lib/../framework/nbio.rb:55:in
`dump_object''
/var/www/apps/rpg/releases/20071224050255/vendor/plugins/backgroundrb/framework/worker.rb:32:in
`send_data''
/var/www/apps/rpg/releases/20071224050255/vendor/plugins/backgroundrb/server/meta_worker.rb:291:in
`send_response''
/var/www/apps/rpg/releases/20071224050255/vendor/plugins/backgroundrb/server/meta_worker.rb:224:in
`process_request''
/var/www/apps/rpg/releases/20071224050255/vendor/plugins/backgroundrb/server/meta_worker.rb:202:in
`receive_data''
/var/www/apps/rpg/releases/2007122405...
2005 Aug 25
0
multiple refreshs clicks cause errors in WEBrick
...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:in `start''
c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread&...
2009 Jun 06
2
How does controller call render when there's no render in action
...response, method = :perform_action, *arguments)
#:nodoc:
response.request = request
initialize_template_class(response)
assign_shortcuts(request, response)
initialize_current_url
assign_names
log_processing
send(method, *arguments)
send_response
I have a question.
"send(method, *arguments)" this calls action of a controller, right?
But if there''s no ''render'' in action - how does it automatically call
render and renders the template for the action?
Thanks a lot
2006 Dec 02
3
Bug#401249: xen-utils-common: xenbr0 not being created
...init__
self.handle()
File "BaseHTTPServer.py", line 316, in handle
self.handle_one_request()
File "BaseHTTPServer.py", line 310, in handle_one_request
method()
File "/usr/lib/xen-3.0.3-1/lib/python/xen/util/xmlrpclib2.py", line 66, in do_POST
self.send_response(200)
File "BaseHTTPServer.py", line 367, in send_response
self.wfile.write("%s %d %s\r\n" %
File "socket.py", line 248, in write
self.flush()
File "socket.py", line 235, in flush
self._sock.sendall(buffer)
error: (32, 'Broken pipe')...