rockXiaofeng commented on issue #993:
URL: https://github.com/apache/dubbo-go/issues/993#issuecomment-795117897


   > My bad! My previous word is confusing.
   > 
   > The response body needs to be a map. This map should contain status and 
body and other headers. The map should be something like this:
   > 
   > ```
   > status: 200 // map to HTTP status
   > header1: value
   > header2: value
   > body: blahblah // map to HTTP body
   > ```
   > 
   > You can take a look at: 
https://github.com/api7/mod_dubbo/blob/3f7034ac607d7caf85b8d3b74f2e80842e0ea717/ngx_http_dubbo_module.c#L1371
   
   I just tried and the response map val is :  rsp:main.User{"body":"OK", 
"foo":"bar", "status":200}, then called by curl and got error msg from 
error_log:
   ```
   2021/03/10 16:58:54 [alert] 3221#49005: worker process 4021 exited on signal 
11
   2021/03/10 16:58:54 [warn] 4038#69795: *232937 [lua] plugin.lua:173: load(): 
new plugins: 
{"cors":true,"traffic-split":true,"batch-requests":true,"dubbo-proxy":true,"api-breaker":true,"key-auth":true,"echo":true,"uri-blocker":true,"serverless-post-function":true,"sls-logger":true,"http-logger":true,"prometheus":true,"limit-conn":true,"request-id":true,"proxy-mirror":true,"authz-keycloak":true,"wolf-rbac":true,"consumer-restriction":true,"ip-restriction":true,"request-validation":true,"proxy-rewrite":true,"limit-count":true,"grpc-transcode":true,"zipkin":true,"jwt-auth":true,"limit-req":true,"basic-auth":true,"serverless-pre-function":true,"server-info":true,"udp-logger":true,"tcp-logger":true,"syslog":true,"response-rewrite":true,"openid-connect":true,"hmac-auth":true,"kafka-logger":true,"fault-injection":true,"referer-restriction":true,"proxy-cache":true,"redirect":true},
 context: init_worker_by_lua*
   2021/03/10 16:58:54 [warn] 4038#69795: *232937 [lua] plugin.lua:221: 
load_stream(): new plugins: {"mqtt-proxy":true}, context: init_worker_by_lua*
   2021/03/10 16:58:54 [warn] 4038#69795: *232939 [lua] init.lua:290: 
sync_local_conf_to_etcd(): sync local conf to etcd, context: ngx.timer
   
   console:
   curl: (52) Empty reply from server
   ```
   
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to