Change in vdsm[master]: http protocol detection
nsoffer at redhat.com
nsoffer at redhat.com
Tue May 20 00:34:47 UTC 2014
Nir Soffer has posted comments on this change.
Change subject: http protocol detection
......................................................................
Patch Set 1:
(2 comments)
http://gerrit.ovirt.org/#/c/27839/1/vdsm/protocolDetector.py
File vdsm/protocolDetector.py:
Line 196: # init http handler
Line 197: pass
Line 198:
Line 199: def detect(self, data):
Line 200: return (data.startswith("POST") and data.startswith("PUT") and
and?
Line 201: data.startswith("GET") and data.startswith("HEAD") and
Line 202: data.startswith("DELETE") and data.startswith("TRANCE") and
Line 203: data.startswith("OPTIONS") and not "/RPC2" in data)
Line 204:
Line 199: def detect(self, data):
Line 200: return (data.startswith("POST") and data.startswith("PUT") and
Line 201: data.startswith("GET") and data.startswith("HEAD") and
Line 202: data.startswith("DELETE") and data.startswith("TRANCE") and
Line 203: data.startswith("OPTIONS") and not "/RPC2" in data)
Why the http detector should know about "/RPC2"?
Using list of detectors and putting xmlrpc before http (specific before generic) will make it simpler.
For xmlrpc:
r"POST /(RPC2)? "
For http:
r"(POST|PUT|GET|HEAD|DELETE|TRANCE|OPTIONS) "
Line 204:
Line 205: def handleSocket(self, client_socket, socket_address):
Line 206: # Update http handler with new socket
Line 207: pass
--
To view, visit http://gerrit.ovirt.org/27839
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I4f899cbab4d95ebd184bf32f3ccec1f4fa0e49bc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list