Skip to content

Commit e8b1f30

Browse files
committed
调整SetCookie逻辑,移除cookie方式变更
原先通过传递"deleted"或空字符串可移除cookie, 现改为仅当value为空字符串时直接返回,不再移除。 移除和赋值逻辑已被注释,需用其他方式删除cookie。 版本号升级,调整命名空间及Umi OCR默认地址 - 升级项目版本至1.0.2.0 - 规范SimpleThreadPool和OCR相关命名空间 - 移除Umi OCR默认API地址,需用户自行设置
1 parent 25e4ee5 commit e8b1f30

5 files changed

Lines changed: 8 additions & 7 deletions

File tree

WodToolkit.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<PackAsTool>False</PackAsTool>
77
<!-- NuGet包元数据 -->
88
<PackageId>WodToolKit</PackageId>
9-
<Version>1.0.1.7</Version>
9+
<Version>1.0.2.0</Version>
1010
<Title>WodToolKit - 轻量级.NET工具库</Title>
1111
<Authors>Wod</Authors>
1212
<Company>Wod</Company>

src/Http/Http.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ public CookieManager SetCookie(string name, string value)
5454
{
5555
if (string.IsNullOrEmpty(name))
5656
throw new ArgumentNullException(nameof(name));
57-
58-
if (value == "deleted" || string.IsNullOrEmpty(value))
57+
if (value == "")
58+
return this;
59+
/*if (value == "deleted" || string.IsNullOrEmpty(value))
5960
_cookies.Remove(name);
6061
else
61-
_cookies[name] = value;
62+
_cookies[name] = value;*/
6263

6364
return this;
6465
}

src/Thread/SimpleThreadPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Text;
55
using System.Threading;
66

7-
namespace WodToolKit.Thread
7+
namespace WodToolKit.src.Thread
88
{
99
/// <summary>
1010
/// 简单线程池类,用于管理多个工作线程执行任务队列中的任务。

src/UmiOCR/OCR.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections.Generic;
33
using System.Net.Http;
44

5-
namespace WodToolKit.src.UmiOCR.Ocr
5+
namespace WodToolKit.src.UmiOCR.OCR
66
{
77
public class OCR : @base
88
{

src/UmiOCR/base.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace WodToolKit.src.UmiOCR
77
{
88
public class @base
99
{
10-
public string UmiUrl = "http://api.umiocr.com/v1/ocr";
10+
public string UmiUrl = "";
1111
public HttpRequestClass http = new HttpRequestClass();
1212
/// <summary>
1313
/// 初始化 Umi

0 commit comments

Comments
 (0)