| 362 | } |
| 363 | |
| 364 | void Http_UrlEncode(cc_string* dst, const cc_uint8* data, int len) { |
| 365 | int i; |
| 366 | for (i = 0; i < len; i++) { |
| 367 | cc_uint8 c = data[i]; |
| 368 | |
| 369 | if (Http_UrlDirect(c)) { |
| 370 | String_Append(dst, c); |
| 371 | } else { |
| 372 | String_Append(dst, '%'); |
| 373 | String_AppendHex(dst, c); |
| 374 | } |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | void Http_UrlEncodeUtf8(cc_string* dst, const cc_string* src) { |
| 379 | cc_uint8 data[4]; |
no test coverage detected