-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix apache http exception due to the character set of Content-Type #3848
Merged
KomachiSion
merged 1 commit into
alibaba:develop
from
Maijh97:develop_mediatype_charset
Sep 17, 2020
Merged
Fix apache http exception due to the character set of Content-Type #3848
KomachiSion
merged 1 commit into
alibaba:develop
from
Maijh97:develop_mediatype_charset
Sep 17, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KomachiSion
approved these changes
Sep 17, 2020
chuntaojun
added a commit
that referenced
this pull request
Oct 14, 2020
* fix-#3595, delete the unnecessary code (#3596) * [ISSUE #3566] move the permission code of nacos-core module to nacos-auth module (#3593) * move the permission code of nacos-core module to nacos-auth module. * Fix some code style issues * address server module auth package name change. * test change * Incorrect package name correction * [ISSUE #3592] Fix incorrect prompt when accessing the restricted namespace (#3603) * Fix incorrect prompt when accessing the restricted namespace * Modify variable name * [ISSUE #3600] Replace the deprecated api of jwt (#3616) * replace the deprecated api of jwt * transfer secretKey to byte array just using String encode with utf-8 * [ISSUE #3613] Fix `unit test method not be static` & update publish config listener in `ConfigTest.java` (#3614) * fix `unit test method not be static` & update publish config listener in `ConfigTest.java` * fix `unit test method not be static` & update publish config listener in `ConfigTest.java` * move jwt dependency from console,core to auth. (#3624) * refactor: unified implementation of http client api adjustment. (#3639) * [ISSUE #3628] set naming client updateTask interval more flexible (#3637) * 1.use server cacheMillis event service deleted 2.naming client UpdateTask's interval will inc by failCount that connect with server * 1.move failCount to updateTask 2.redefine the updateService method name. updateServiceNow -> updateService, wrap updateService in updateServiceNow when first getServiceInfo * 1.create push client even service is not exist 2.serviceInfo's hosts is empty or can't connect to server both add the updateTsk interval * format the indent * fix: create kvstorage * refactor: create kv storage] * refactor: refactor rocksdb storage code * Fix issue 3661 (#3662) * improvement: merge upstream/develop * feat: merge upstream develop * fix: fix issue #3661 * [ISSUE#3658] refactor TaskManager and move to nacos-common module (#3663) * Add TaskManagerTest * Move Abstract Task and Task processor to nacos-common * Add Nacos execute engine interface and nacos task interface * Refactor Task Manager to NacosDelayTaskExecuteEngine * for code style * [ISSUE #3671] move some tools class into common package (#3672) * for #3621 (#3668) * [ISSUE#3315]Nacos client support https (#3654) * [ISSUE #3315] nacos client support https * common module add tls related classes * JdkHttpClientRequest support https * unified IpUtils * [ISSUE #3315] nacos client support https * common module add tls related classes * JdkHttpClientRequest support https * unified IpUtils * [ISSUE #3315] nacos client support https * format code * fix typo and doc format of README file (#3688) 1. It’s a little weird to use Chinese comma in English 2. Fix typo: change 'reposity' to 'repository', 'instance' to 'instances' 3. Format other details of the doc * Try to fix nacos server CLOSE_WAIT (#3703) * Fix revert chunk isn't work in Content Comparison page (#3686) * fix: fixed cluster node version issue * Fix Logging in with the wrong username or password will cause jackson serialization results to fail (#3695) (#3721) * [ISSUE#3712] add apache http client factory (#3716) * refactor: Add apache http client Factory. * refactor: Add apache http client Factory. * add license * refactor: class name change * [Issue#3692] Use new distro task engine replace old task dispatcher. (#3715) * Add ServiceManagerTest * Add DistroConsistencyServiceImplTest * Add new distro entities * Add new distro sync data change * add new VerifyTask to do checksum. * Replace old sync task and checksum task * Add retry sync change task. * Fix high cpu load * For checkstyle * Combine naming sync task to reduce http cost * Move some classes * Refactor keys combined logic * enhance package construct * Fix unit test * For pmd * [Issue #3692] Use new distro implmentation to handle sync datum and checksum request (#3734) * Add receive data and verify data distro protocol interface * Use new distro implmentation to handle sync datum and checksum request * Use new distro implmentation to handle get datum request. * refactor: adjust the data loading logic when a new protocol is started * [ISSUE#3692] Use new distro implmentation to handle init all datum request. (#3744) * Add load data task in DistroProtocol * Use new distro implmentation to handle init all datum request. * Fix unit test * fix: #3617 (#3678) * fix #3617 * 调整代码格式 * 修改抛出的Exception类型 * 调整逻辑 * 移除没用到的方法 * 修改注释 * [ISSUE#3658] Move distro sync code to nacos-core module (#3750) * Move distro sync code to nacos-core module * Update unit test * feat: none * fix: fixing serialization problems * replace the deprecated api com.fasterxml.jackson.databind.node.ObjectNode#put(java.lang.String, com.fasterxml.jackson.databind.JsonNode) * Revert "[#3368]Cancel empty Long polling thread to improve performance. (#ISSUE3432)" (#3778) This reverts commit 95c8bf2. * [ISSUE #3658] Some enhance refactor for naming distro (#3765) * Some enhance refactor for naming distro * Remove null code * [ISSUE #3687] check serviceName's format(groupName@@serviceName) in server and client (#3767) * 1.in server, check serviceName's format 'groupName@@serviceName', groupName and serviceName can't be blank 2.in client, check 'groupName@@serviceName', groupName and serviceName can't be blank * ignore the check to groupName * check split's length instead of exception to check argument * 1.add some notes 2.remove unnecessary code * modify the notes * [ISSUE#3790] Supplement http response Content-Encoding processing. (#3791) * bug: fix issue #3790, Supplement http response Content-Encoding processing * bug: fix issue #3790, Supplement http response Content-Encoding processing. * bug: fix issue #3790, Supplement http response Content-Encoding processing. * Update ConvertUtils.java (#3789) * fix ConvertUtils can not handle FormatException. * fix: fixed some logic errors * [ISSUE#3192] naming module replace http client (#3763) * naming module replace http client * refactor: naming module replace http client. * refactor: naming module replace http client. * refactor: Add apache http client Factory. * refactor: naming module replace http client. * fix code style * refactor: Add http client config * refactor: naming module HttpClientManager change * refactor: naming module HttpClientManager change * refactor: naming module replace http client. * fix code style * refactor: fix JDK http client Use error problem. * refactor: Query And Header entity init Add non-empty judgment * Enhance the asynchronous http delete request method to support body passing parameters. * refactor: apache http client set MaxConnTotal and maxConnPerRoute. * Fix NullPointerException when no subscriber for slow event (#3835) * Set mediaType charset as utf8 (#3837) * Fix code style problem in DiskUtils (#3842) * Fix http client contentType charset problem (#3848) * feature issue #3804 (#3805) * improvement: merge upstream/develop * feat: merge upstream develop * feat: manage the loading of configuration files uniformly * fix: fix copyright style * style: fix code style * fix: fix code style * bug: fix the problem of incorrect judgment of http response code in SubscribeManager#getSubscribers() method (#3879) * [ISSUE #3867] replace the way which get version (#3872) * replace the way which get version * remove version sign application.properties in nacos-api * [ISSUE #3871] fix description don't match the error (#3886) * Fix jraft problem * Fix chinese string are truncated in ConcunrrentDiskUtil (#3883) * Temp fix raft server can't refresh raft configuration problem * update spring boot dependencies version (#3900) Co-authored-by: yanlinly <[email protected]> Co-authored-by: 杨翊 SionYang <[email protected]> * [ISSUE #3781]Fix service list intermittently lost service (#3891) * update service init * commit futureMap.remove() * update serviceManager Co-authored-by: yanlinly <[email protected]> Co-authored-by: 杨翊 SionYang <[email protected]> * Fix Listener do not listen new consistency problem * Fix Performance logger thread call old raft error * Use datum in new raft processor to compatible old data * Use multiple kv storage in new raft processor to compatible old data * Revert PR#2849. * Move datum key check to KeyBuilder * Fix 1.3.2 upgrade 1.4.0 can't notify service change problem * [ISSUE #3850] ignore socket exception when client destroy already (#3906) * if client destroy already, ignore socket exception. * remove the exception's judgement * remove unuseful import * fix: fix merge conflict * isAddressServerHealth set as true when request success (#3952) * [ISSUE#3533] change cache dir with namespace -- part 1: unify the cache dir (#3859) * [ISSUE#3533] change cache dir with namespace -- part 2: unify the log dir (#3882) * fix typo error (#3954) * [ISSUE #3909] add domain's judgement (#3913) * add domain's judgement * modify domain's judgement, can resolve = true * remove judgement in 'if' code block * replace Ip to IP in InetUtils * log warn info when domain can not be resolved * fix vaiable name * 1.fix unit test can't pass (#3956) 2.update the unit test * Move remove listener logic to ServiceManager * Move remove listener logic to ServiceManager * Fix#3973 (#3974) * fix #3973 * 重复代码抽取到一个方法 * 删除私有方法的注释 * 处理namespace参数的方法提出到一个工具类中 * 修改注释 * 添加licences * 增加 TenantUtil 的测试 * TenantUtil 改名为 NamespaceUtil * For #3384, Fix member extend info do not update error. (#3982) * refactor: code refactor Co-authored-by: 赵延 <[email protected]> Co-authored-by: mai.jh <[email protected]> Co-authored-by: ljhrot <[email protected]> Co-authored-by: Xarrow <[email protected]> Co-authored-by: 杨翊 SionYang <[email protected]> Co-authored-by: Gagharv <[email protected]> Co-authored-by: syapollo <[email protected]> Co-authored-by: S2W <[email protected]> Co-authored-by: Tboy <[email protected]> Co-authored-by: 邪影oO <[email protected]> Co-authored-by: yanlinly <[email protected]> Co-authored-by: Mark4z <[email protected]> Co-authored-by: Marcus <[email protected]> Co-authored-by: shizhengxing <[email protected]> Co-authored-by: ljhrot <[email protected]> Co-authored-by: sanxun0325 <[email protected]> Co-authored-by: JackSun-Developer <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please do not create a Pull Request without creating an issue first.
What is the purpose of the change
Because MediaType has supplemented the character set at present, this causes apache http to be abnormal when initRequestEntity.
Error message :
java.lang.IllegalArgumentException: MIME type may not contain reserved characters
Reason: When using the
org.apache.http.entity.ContentType#create(java.lang.String, java.lang.String)
method to pass in mimeType and charset, mimeType is not allowed to have a character set.Brief changelog
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.