You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/08/07 16:59:17 UTC

[GitHub] [skywalking] whfjam opened a new issue #5265: question about the enhancement of httpclient3.0

whfjam opened a new issue #5265:
URL: https://github.com/apache/skywalking/issues/5265


   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [*] Question or discussion
   - [ ] Bug
   - [ ] Requirement
   - [ ] Feature or performance improvement
   
   ___
   ### Question
   In the enhancement of Httpclient3.0 it used "httpMethod.addRequestHeader(next.getHeadKey(), next.getHeadValue());" to send the header of "sw8" but it will not override the exits one , in my case the old header of "sw8" is exists so that the new one will not 
   override it.
   Otherwise in the enhancement of Httpclient4.0 it used "httpRequest.setHeader(next.getHeadKey(), next.getHeadValue());" is there any problem about this?
   
   ___
   ### Bug
   - Which version of SkyWalking, OS and JRE?
   
   - Which company or project?
   
   - What happened?
   If possible, provide a way to reproduce the error. e.g. demo application, component version.
   
   ___
   ### Requirement or improvement
   - Please describe your requirements or improvement suggestions.
   


----------------------------------------------------------------
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.

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



[GitHub] [skywalking] wu-sheng commented on issue #5265: question about the enhancement of httpclient3.0

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5265:
URL: https://github.com/apache/skywalking/issues/5265#issuecomment-670810254


   I mean we wouldn't have duplicated header


----------------------------------------------------------------
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.

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



[GitHub] [skywalking] wu-sheng commented on issue #5265: question about the enhancement of httpclient3.0

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5265:
URL: https://github.com/apache/skywalking/issues/5265#issuecomment-670810410


   If you want to this plugin to support your case, does the httpclient provide removing header method? The only thing agent could do, is doing remove before adding.


----------------------------------------------------------------
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.

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



[GitHub] [skywalking] wu-sheng commented on issue #5265: question about the enhancement of httpclient3.0

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5265:
URL: https://github.com/apache/skywalking/issues/5265#issuecomment-670810074


   Then this seems very tricky. You made the agent have to remove the existing header, which are dangerous by overiding in unexpected case. In typical proxy, it should support the header overriding automatically at your side, rather than relying on the agent. Such as, Spring Gateway anf Nginx, none of then forwarding all headers.


----------------------------------------------------------------
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.

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



[GitHub] [skywalking] whfjam commented on issue #5265: question about the enhancement of httpclient3.0

Posted by GitBox <gi...@apache.org>.
whfjam commented on issue #5265:
URL: https://github.com/apache/skywalking/issues/5265#issuecomment-670803188


   > Do you have a suggested way? Are you re-use the http method?
   
   em... i mean in my situation  the service is just like a proxy one ,like serviceA-proxyService-serviceB  ,in the proxyService it will keep all of the headers from serviceA includes the "sw8" ,but it used the HttpClient3.0 component to resend the request to serviceB,the class "org.apache.skywalking.apm.plugin.httpclient.v3.HttpClientExecuteInterceptor" it used the "httpMethod.addRequestHeader" to  deliver the new sw8 header but it won’t override the old one from serviceA i modified it to httpMethod.setRequestHeader just like the code in the enhancement of httpclient4.0


----------------------------------------------------------------
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.

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



[GitHub] [skywalking] whfjam commented on issue #5265: question about the enhancement of httpclient3.0

Posted by GitBox <gi...@apache.org>.
whfjam commented on issue #5265:
URL: https://github.com/apache/skywalking/issues/5265#issuecomment-670811733


   > If you want to this plugin to support your case, does the httpclient provide removing header method? The only thing agent could do, is doing remove before adding.
   
   i meant that in the plugin for httpclient3.0 it used addRequestHeader but in the plugin for httpclient4.0 it used setRequestHeader which is useful for me i did not mean all of the headers but just the headers the skywalking used


----------------------------------------------------------------
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.

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



[GitHub] [skywalking] wu-sheng commented on issue #5265: question about the enhancement of httpclient3.0

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5265:
URL: https://github.com/apache/skywalking/issues/5265#issuecomment-670783322


   Do you have a suggested way? Are you re-use the http method?


----------------------------------------------------------------
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.

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



[GitHub] [skywalking] wu-sheng closed issue #5265: question about the enhancement of httpclient3.0

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #5265:
URL: https://github.com/apache/skywalking/issues/5265


   


----------------------------------------------------------------
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.

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



[GitHub] [skywalking] wu-sheng commented on issue #5265: question about the enhancement of httpclient3.0

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5265:
URL: https://github.com/apache/skywalking/issues/5265#issuecomment-670811991


   Send a pull request, this should be easy to fix.


----------------------------------------------------------------
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.

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



[GitHub] [skywalking] wu-sheng edited a comment on issue #5265: question about the enhancement of httpclient3.0

Posted by GitBox <gi...@apache.org>.
wu-sheng edited a comment on issue #5265:
URL: https://github.com/apache/skywalking/issues/5265#issuecomment-670810074


   Then this seems very tricky. You made the agent has to remove the existing header, which is dangerous by overiding in unexpected case. In typical proxy, it should support the header overriding automatically at your side, rather than relying on the agent. Such as, Spring Gateway anf Nginx, none of then forwarding all headers.


----------------------------------------------------------------
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.

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