Skip to content

feat: ssl-pinning适配harmony平台 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

li2qi
Copy link

@li2qi li2qi commented Sep 30, 2024

Summary

1:ssl-pinning适配harmony平台

Test Plan

c0022f48cfd6325587123ea235f7ed4
9220ac785fadf2120661f4710d41807

Checklist

  • 已经在真机设备或模拟器上测试通过
  • 已经与 Android 或 iOS 平台做过效果/功能对比
  • 已经添加了对应 API 的测试用例(如需要)
  • 已经更新了文档(如需要)
  • 更新了 JS/TS 代码 (如有)

@li2qi li2qi force-pushed the master branch 2 times, most recently from 45fffba to dd8f05a Compare September 30, 2024 09:17
@@ -0,0 +1,30 @@
import { Chain, Interceptor, Response, Type, Utils } from '@ohos/httpclient';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加上版权头

return cookieJSON;
}
CookieStore.prototype.writeCookie = function writeCookie(hostname, cookieJSON) {
console.info('liqi httpclient- CookieStore writeCookie: ' + hostname + ',cookieJSON:' + cookieJSON + ',path:' + this.path);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除日志

console.info("httpclient- loadCookie JSON :" + cookieJSON);
let json = JSON.parse(cookieJSON);
for (let cookieName in json) {
console.info(JSON.stringify(json[cookieName]));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个日志删除,循环中尽量不要加打印,会影响性能

this.cookiesList = this.cookies[cookie.name] !== undefined ? this.cookies[cookie.name] : [];
for (i = 0; i < this.cookiesList.length; i += 1) {
this.collidableCookie = this.cookiesList[i];
console.info("httpclient- cookiejar cookie checking: " + this.collidableCookie.name);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个也一样删除

@ding-chengjie ding-chengjie merged commit 7a7888b into react-native-oh-library:master Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants