You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/07/11 11:55:50 UTC

[GitHub] [apisix] 123libohan opened a new issue, #7436: help request: the value returned by the gateway and the original interface is different

123libohan opened a new issue, #7436:
URL: https://github.com/apache/apisix/issues/7436

   ### Description
   
   At present, the value returned by the gateway and the original interface is different. 
   
   Calling the original interface returns the following value:
   httpstatus:'401 Unauthorized'
   response:{
       "timestamp": "2022-07-11 19:32:04",
       "status": 401,
       "error": "Unauthorized",
       "path": "/map/api/*/*"
   }
   
   Through the apisix gateway ,the response is '404 page not found',and the httpstatus is '404 Not Found'
   
   Why does apisix return a httpstate of '404 Not Found'. How can we set the gateway to pass through the  original interface information as '401 Unauthorized'?
   
   ### Environment
   
   - APISIX version (1.13.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.

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

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


[GitHub] [apisix] 123libohan commented on issue #7436: help request: the value returned by the gateway and the original interface is different

Posted by GitBox <gi...@apache.org>.
123libohan commented on issue #7436:
URL: https://github.com/apache/apisix/issues/7436#issuecomment-1181348416

   > > "path": "/map/api//"
   > 
   > It looks like the second `/` in `//` is escaped, can you change the path of the upstream service from `/map/api//` to `/map/api/` and try again?
   
   Thanks,but that's not the reason. I omitted the patch,actually it is "/map/api/bbb/queryCCC"


-- 
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@apisix.apache.org

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


[GitHub] [apisix] 123libohan closed issue #7436: help request: the value returned by the gateway and the original interface is different

Posted by GitBox <gi...@apache.org>.
123libohan closed issue #7436: help request: the value returned by the gateway and the original interface is different
URL: https://github.com/apache/apisix/issues/7436


-- 
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@apisix.apache.org

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


[GitHub] [apisix] XW512 commented on issue #7436: help request: the value returned by the gateway and the original interface is different

Posted by GitBox <gi...@apache.org>.
XW512 commented on issue #7436:
URL: https://github.com/apache/apisix/issues/7436#issuecomment-1181224853

   I have the same 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@apisix.apache.org

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


[GitHub] [apisix] tzssangglass commented on issue #7436: help request: the value returned by the gateway and the original interface is different

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7436:
URL: https://github.com/apache/apisix/issues/7436#issuecomment-1181610578

   > Can we get the path of the request as it passes through the APISIX proxy and arrives upstream?
   
   so pls answer this question, and provide the full reproduction steps.


-- 
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@apisix.apache.org

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


[GitHub] [apisix] tzssangglass commented on issue #7436: help request: the value returned by the gateway and the original interface is different

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7436:
URL: https://github.com/apache/apisix/issues/7436#issuecomment-1181552078

   > 404 Not Found
   
   Can we get the path of the request as it passes through the APISIX proxy and arrives upstream?


-- 
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@apisix.apache.org

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


[GitHub] [apisix] 123libohan commented on issue #7436: help request: the value returned by the gateway and the original interface is different

Posted by GitBox <gi...@apache.org>.
123libohan commented on issue #7436:
URL: https://github.com/apache/apisix/issues/7436#issuecomment-1181594546

   > > response:{
   > > "timestamp": "2022-07-11 19:32:04",
   > > "status": 401,
   > > "error": "Unauthorized",
   > > "path": "/map/api/_/_"
   > > }
   > 
   > It looks like this is a Spring Boot project, and when the 401 appears, I remember it would redirect to login page in internal.
   > 
   > You need to provide the full reproduction steps so that I can reproduce this problem locally.
   
   This is the case. Our back-end will judge whether we have permission to access this URL in the form of a token. However, when we conduct load balancing through APISIX, we find that the result returned by APISIX is not the result returned by our back-end. It becomes 404 page not found, while our back-end returns a 401 status 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@apisix.apache.org

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


[GitHub] [apisix] 123libohan commented on issue #7436: help request: the value returned by the gateway and the original interface is different

Posted by GitBox <gi...@apache.org>.
123libohan commented on issue #7436:
URL: https://github.com/apache/apisix/issues/7436#issuecomment-1181594218

   > 
   
   This is the case. Our back-end will judge whether we have permission to access this URL in the form of a token. However, when we conduct load balancing through APISIX, we find that the result returned by APISIX is not the result returned by our back-end. It becomes 404 page not found, while our back-end returns a 401 status 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@apisix.apache.org

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


[GitHub] [apisix] soulbird commented on issue #7436: help request: the value returned by the gateway and the original interface is different

Posted by GitBox <gi...@apache.org>.
soulbird commented on issue #7436:
URL: https://github.com/apache/apisix/issues/7436#issuecomment-1181228206

   Need more information to reproduce your problem. such as routing, backend services


-- 
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@apisix.apache.org

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


[GitHub] [apisix] 123libohan commented on issue #7436: help request: the value returned by the gateway and the original interface is different

Posted by GitBox <gi...@apache.org>.
123libohan commented on issue #7436:
URL: https://github.com/apache/apisix/issues/7436#issuecomment-1181274427

   > Need more information to reproduce your problem. such as routing, backend services. Please give steps to reproduce.
   
   Our interface URL is this:http://orion-a.sit.xxx.com/map/api/bbb/queryCCC
   Normal return value is:
   {
   "timestamp": "2022-07-11 19:32:04",
   "status": 401,
   "error": "Unauthorized",
   "path": "/map/api//"
   }
   The normal HttpStatus is '401 Unauthorized'
   
   We use apisix to perform gateway forwarding,by configuring  routes,services and upstreams plugins.
   
   The gateway does not pass through the original value,the HttpStatus change to  is '404 Not Found'
   Is it because the gateway cannot parse HttpStatus   '401 Unauthorized'?


-- 
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@apisix.apache.org

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


[GitHub] [apisix] tzssangglass commented on issue #7436: help request: the value returned by the gateway and the original interface is different

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7436:
URL: https://github.com/apache/apisix/issues/7436#issuecomment-1181326808

   > "path": "/map/api//"
   
   It looks like the second `/` in `//` is escaped, can you change the path of the upstream service from `/map/api//` to `/map/api/` and try again?


-- 
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@apisix.apache.org

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


[GitHub] [apisix] tzssangglass commented on issue #7436: help request: the value returned by the gateway and the original interface is different

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7436:
URL: https://github.com/apache/apisix/issues/7436#issuecomment-1181564430

   > response:{
   > "timestamp": "2022-07-11 19:32:04",
   > "status": 401,
   > "error": "Unauthorized",
   > "path": "/map/api/_/_"
   > }
   
   It looks like this is a Spring Boot project, and when the 401 appears, I remember it would redirect to login page in internal.
   
   You need to provide the full reproduction steps so that I can reproduce this problem locally.


-- 
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@apisix.apache.org

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