467 args = self.__extractMultipartQueryItems(data, boundary) |
467 args = self.__extractMultipartQueryItems(data, boundary) |
468 else: |
468 else: |
469 if qVersion() >= "5.0.0": |
469 if qVersion() >= "5.0.0": |
470 from PyQt5.QtCore import QUrlQuery |
470 from PyQt5.QtCore import QUrlQuery |
471 argsUrl = QUrl.fromEncoded( |
471 argsUrl = QUrl.fromEncoded( |
472 QByteArray("foo://bar.com/?" + QUrl.fromPercentEncoding( |
472 QByteArray(b"foo://bar.com/?" + QUrl.fromPercentEncoding( |
473 data.replace(b"+", b"%20")))) |
473 data.replace(b"+", b"%20")).encode())) |
474 encodedArgs = QUrlQuery(argsUrl).queryItems() |
474 encodedArgs = QUrlQuery(argsUrl).queryItems() |
475 else: |
475 else: |
476 argsUrl = QUrl.fromEncoded( |
476 argsUrl = QUrl.fromEncoded( |
477 QByteArray("foo://bar.com/?" + data.replace(b"+", b"%20"))) |
477 QByteArray(b"foo://bar.com/?" + data.replace(b"+", b"%20")) |
|
478 ) |
478 encodedArgs = argsUrl.queryItems() |
479 encodedArgs = argsUrl.queryItems() |
479 args = set() |
480 args = set() |
480 for arg in encodedArgs: |
481 for arg in encodedArgs: |
481 key = arg[0] |
482 key = arg[0] |
482 value = arg[1] |
483 value = arg[1] |