membphis commented on issue #1250: APISIX occasionally returns 500 for 
httpbin.org
URL: 
https://github.com/apache/incubator-apisix/issues/1250#issuecomment-599063146
 
 
   I tried your example, I got sucess
   
   ```shell
   $ curl "http://127.0.0.1:9080/apisix/admin/upstreams/50"; -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "type": "roundrobin",
       "nodes": {
           "httpbin.org:443": 1
       }
   }'
   
{"node":{"value":{"nodes":{"httpbin.org:443":1},"hash_on":"vars","type":"roundrobin"},"createdIndex":2103,"key":"\/apisix\/upstreams\/50","modifiedIndex":2103},"action":"set"}
   
   $ curl http://127.0.0.1:9080/apisix/admin/routes/5 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "uri": "/samplePrefix/get",
       "plugins": {
           "proxy-rewrite": {
             "scheme": "https",
             "regex_uri": ["^/samplePrefix/get(.*)", "/get$1"]
           }
       },
       "upstream_id": 50
   }'
   
{"node":{"value":{"upstream_id":50,"plugins":{"proxy-rewrite":{"regex_uri":["^\/samplePrefix\/get(.*)","\/get$1"],"scheme":"https"}},"uri":"\/samplePrefix\/get","priority":0},"createdIndex":2104,"key":"\/apisix\/routes\/5","modifiedIndex":2104},"action":"set"}
   
   $ curl -i -X GET 
http://127.0.0.1:9080/samplePrefix/get\?param1\=foo\&param2\=bar
   HTTP/1.1 200 OK
   Content-Type: application/json
   Content-Length: 367
   Connection: keep-alive
   Date: Sat, 14 Mar 2020 13:42:50 GMT
   Server: APISIX web server
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true
   
   {
     "args": {
       "param1": "foo",
       "param2": "bar"
     },
     "headers": {
       "Accept": "*/*",
       "Host": "127.0.0.1",
       "User-Agent": "curl/7.66.0",
       "X-Amzn-Trace-Id": "Root=1-5e6cdf59-6808716820e92f54dfa60584",
       "X-Forwarded-Host": "127.0.0.1"
     },
     "origin": "127.0.0.1, 223.73.235.21",
     "url": "https://127.0.0.1/get?param1=foo&param2=bar";
   }
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to