You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "sick-cat (via GitHub)" <gi...@apache.org> on 2024/01/15 13:04:04 UTC

[I] rest协议接口响应头错误 [dubbo]

sick-cat opened a new issue, #13665:
URL: https://github.com/apache/dubbo/issues/13665

   <!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
   
   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 3.2
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   
   1.  使用 rest 协议暴露一个dubbo接口,get / post 均可。
   2.  使用postman访问接口,得到预期外的 Content-Type:
       * [[application/json, application/json]]
       * [[text/plain, application/json]]
   
   按照 RFC-2616 规范,响应格式应该是 `Content-Type: text/html; charset=ISO-8859-4` 这种格式。
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Incorrect response header for rest protocol [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ closed issue #13665: Incorrect response header for rest protocol
URL: https://github.com/apache/dubbo/issues/13665


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] rest协议接口响应头错误 [dubbo]

Posted by "sick-cat (via GitHub)" <gi...@apache.org>.
sick-cat commented on issue #13665:
URL: https://github.com/apache/dubbo/issues/13665#issuecomment-1892140466

   debug发现应该是 `org.apache.dubbo.rpc.protocol.rest.extension.resteasy.ResteasyContext#addResponseHeaders` 引起的错误
   
   ```java
   for (Map.Entry<String, List<Object>> entry : headers.entrySet()) {
           String key = entry.getKey();
           if (entry.getValue() == null) {
                 continue;
           }
           response.addOutputHeaders(key, entry.getValue().toString());
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Incorrect response header for rest protocol [dubbo]

Posted by "suncairong163 (via GitHub)" <gi...@apache.org>.
suncairong163 commented on issue #13665:
URL: https://github.com/apache/dubbo/issues/13665#issuecomment-1962839719

   > * [x]  I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   > 
   > ### Environment
   > * Dubbo version: 3.2
   > * Java version: 1.8
   > 
   > ### Steps to reproduce this issue
   > 1. 使用 rest 协议暴露一个dubbo接口,get / post 均可。
   > 2. 使用postman访问接口,得到预期外的 Content-Type:
   >    
   >    * [[application/json, application/json]]
   >    * [[text/plain, application/json]]
   > 
   > 按照 RFC-2616 规范,响应格式应该是 `Content-Type: text/html; charset=ISO-8859-4` 这种格式。
   
   Can you provide case code?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Incorrect response header for rest protocol [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13665:
URL: https://github.com/apache/dubbo/issues/13665#issuecomment-1895425443

   @suncairong163 PTAL


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] rest协议接口响应头错误 [dubbo]

Posted by "bruce0312 (via GitHub)" <gi...@apache.org>.
bruce0312 commented on issue #13665:
URL: https://github.com/apache/dubbo/issues/13665#issuecomment-1893247685

   same problem too. i have to write new customized spi to fix this problem.. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org