Nir Soffer has posted comments on this change.

Change subject: json-rpc: Protocol detection
......................................................................


Patch Set 14:

(1 comment)

http://gerrit.ovirt.org/#/c/26300/14/vdsm/protoDetector.py
File vdsm/protoDetector.py:

Line 177:     def __init__(self, xmlBinding):
Line 178:         self.xmlBinding = xmlBinding
Line 179: 
Line 180:     def detect(self, data):
Line 181:         return data.startswith("POST") or data.startswith("PUT")
We have a patch adding GET for getting images data, so this should be updated 
when this patch is merged.

The name of the class is not correct - our PUT (and GET) are not related to 
xmlrpc. Actually the fact that POST is limited to xmlrpc is wrong too. The 
request handler used in that serer is really bad hack. We should have sparate 
request handlers for POST and PUT.

I think we should have separate detector for http and xmlprc, based on the 
request line.

This detector should handle only "POST /RPC2 HTTP/\d.\d" (need to check that 
engine is using this path).

The http detector should handle any other http request for any path. Then we 
can separate the http and xmlrpc servers and request handlers.
Line 182: 
Line 183:     def handleSocket(self, client_socket, socket_address):
Line 184:         self.xmlBinding.add_socket(client_socket, socket_address)
Line 185:         self.log.debug("xml over http detected from %s", 
socket_address)


-- 
To view, visit http://gerrit.ovirt.org/26300
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id739a40e2b37dcc175137ec91cd5ec166ad24a75
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Yeela Kaplan <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to