MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / parse_req

Method parse_req

tools/donate-cpu-server.py:1171–1176  ·  view source on GitHub ↗
(cmd)

Source from the content-addressed store, hash-verified

1169 # TODO: use a proper parser
1170 @staticmethod
1171 def parse_req(cmd):
1172 req_parts = cmd.split(' ')
1173 if len(req_parts) != 3 or req_parts[0] != 'GET' or not req_parts[2].startswith('HTTP'):
1174 return None, None
1175 url_obj = urlparse(req_parts[1])
1176 return url_obj.path, dict(urllib.parse.parse_qsl(url_obj.query))
1177
1178 def run(self):
1179 try:

Callers 2

runMethod · 0.95
_test_parse_reqFunction · 0.80

Calls

no outgoing calls

Tested by 1

_test_parse_reqFunction · 0.64