Compare commits
2 Commits
4253acb72b
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| f50a3abc8e | |||
| 8c15113cb0 |
@@ -59,7 +59,7 @@ bool PIHTTPClient::init() {
|
|||||||
if (is_cancel) return false;
|
if (is_cancel) return false;
|
||||||
CurlThreadPool::instance();
|
CurlThreadPool::instance();
|
||||||
if (!PRIVATE->init()) return false;
|
if (!PRIVATE->init()) return false;
|
||||||
auto ait = request.arguments().makeIterator();
|
auto ait = request.queryArguments().makeIterator();
|
||||||
while (ait.next()) {
|
while (ait.next()) {
|
||||||
if (!url.contains('?'))
|
if (!url.contains('?'))
|
||||||
url.append('?');
|
url.append('?');
|
||||||
|
|||||||
@@ -469,7 +469,7 @@ void PIString::buildData(const char * cp) const {
|
|||||||
UErrorCode e((UErrorCode)0);
|
UErrorCode e((UErrorCode)0);
|
||||||
UConverter * cc = ucnv_open(cp, &e);
|
UConverter * cc = ucnv_open(cp, &e);
|
||||||
if (cc) {
|
if (cc) {
|
||||||
const size_t len = MB_CUR_MAX * size() + 1;
|
const size_t len = UCNV_GET_MAX_BYTES_FOR_STRING(size(), ucnv_getMaxCharSize(cc)) + 1; // MB_CUR_MAX * size() + 1;
|
||||||
data_ = (char *)malloc(len);
|
data_ = (char *)malloc(len);
|
||||||
int sz = ucnv_fromUChars(cc, data_, len, (const UChar *)(d.data()), d.size_s(), &e);
|
int sz = ucnv_fromUChars(cc, data_, len, (const UChar *)(d.data()), d.size_s(), &e);
|
||||||
ucnv_close(cc);
|
ucnv_close(cc);
|
||||||
|
|||||||
Reference in New Issue
Block a user