You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "smalltalkhyb (via GitHub)" <gi...@apache.org> on 2024/10/21 01:44:32 UTC
[I] [Bug] okclient or curl http2 return result error [dubbo]
smalltalkhyb opened a new issue, #14799:
URL: https://github.com/apache/dubbo/issues/14799
### Pre-check
- [X] I am sure that all the content I provide is in English.
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues.
### Apache Dubbo Component
Java SDK (apache/dubbo)
### Dubbo Version
jdk17
### Steps to reproduce this issue
### code
` @RequestMapping(
method = {RequestMethod.POST},
value = {"/manager-bu/buNameAll"},
produces = {"application/json"}
)
List<String> allBuName();`
` @Override
public List<String> allBuName() {
return sysManagerBuQueryService.getAllBuName();
}`
### Test http1.1 200 OK
`curl -v 'http://localhost:8080/manager-bu/buNameAll' \
--header 'Authorization: eyUserJNCxrYCkpFYTPvHpGuH6IM8RWRrvhx4PYwZwjqmxeDZkLfvuuS3EXiWRGnkwwCRj' \
--header 'deprecated: 1' \
--header 'must-auth-heade: 1' \
--header 'x-mse-tag: xingzhihe' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Content-Type: application/json' \
--data '{}'
* Trying [::1]:8080...
* Connected to localhost (::1) port 8080
> POST /manager-bu/buNameAll HTTP/1.1
> Host: localhost:8080
> Accept: */*
> Authorization: eyUserJNCxrYCkpFYTPvHpGuH6IM8RWRrvhx4PYwZwjqmxeDZkLfvuuS3EXiWRGnkwwCRj
> deprecated: 1
> must-auth-heade: 1
> x-mse-tag: xingzhihe
> User-Agent: Apifox/1.0.0 (https://apifox.com)
> Content-Type: application/json
> Content-Length: 2
>
< HTTP/1.1 200 OK
< content-type: application/json
< Timing-Allow-Origin: *
< trace_id: 00000000000000000000000000000000
< alt-svc: h2=":8080"
< content-length: 261
<
* Connection #0 to host localhost left intact
{"code":"000","message":"操作成功","data":["uap","bap","ad","marketing","user","pay","driver","asset","trip","diq","iot","bigdata","matching","Unknown"],"success":true,"devMessage":null,"traceId":"00000000000000000000000000000000","timestamp":1729474933016}%`
### Test http2 200 error HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR
`curl --http2 -v 'http://localhost:8080/manager-bu/buNameAll' \
--header 'Authorization: eyUserJNCxrYCkpFYTPvHpGuH6IM8RWRrvhx4PYwZwjqmxeDZkLfvuuS3EXiWRGnkwwCRj' \
--header 'deprecated: 1' \
--header 'must-auth-heade: 1' \
--header 'x-mse-tag: xingzhihe' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Content-Type: application/json' \
--data '{}'
* Trying [::1]:8080...
* Connected to localhost (::1) port 8080
> POST /manager-bu/buNameAll HTTP/1.1
> Host: localhost:8080
> Accept: */*
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAAQAoAAAAAIAAAAA
> Authorization: eyUserJNCxrYCkpFYTPvHpGuH6IM8RWRrvhx4PYwZwjqmxeDZkLfvuuS3EXiWRGnkwwCRj
> deprecated: 1
> must-auth-heade: 1
> x-mse-tag: xingzhihe
> User-Agent: Apifox/1.0.0 (https://apifox.com)
> Content-Type: application/json
> Content-Length: 2
>
< HTTP/1.1 101 Switching Protocols
< connection: upgrade
< upgrade: h2c
* Received 101, Switching to HTTP/2
< HTTP/2 200
< content-type: application/json
* HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
* Connection #0 to host localhost left intact
curl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)`
### What you expected to happen
### return result ok
{"code":"000","message":"操作成功","data":["uap","bap","ad","marketing","user","pay","driver","asset","trip","diq","iot","bigdata","matching","Unknown"],"success":true,"devMessage":null,"traceId":"00000000000000000000000000000000","timestamp":1729474933016}
### Anything else
_No response_
### Are you willing to submit a pull request to fix on your own?
- [X] Yes I am willing to submit a pull request on my own!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
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] [Bug] okclient or curl http2 return result error [dubbo]
Posted by "oxsean (via GitHub)" <gi...@apache.org>.
oxsean commented on issue #14799:
URL: https://github.com/apache/dubbo/issues/14799#issuecomment-2427169727
Check your Accept 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.
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] [Bug] okclient or curl http2 return result error [dubbo]
Posted by "oxsean (via GitHub)" <gi...@apache.org>.
oxsean commented on issue #14799:
URL: https://github.com/apache/dubbo/issues/14799#issuecomment-2429741851
Can't reproduce
```bash
curl -v 'http://localhost:8081/manager-bu/buNameAll' --header 'Authorization: eyUserJNCxrYCkpFYTPvHpGuH6IM8RWRrvhx4PYwZwjqmxeDZkLfvuuS3EXiWRGnkwwCRj' --header 'deprecated: 1' --header 'must-auth-heade: 1' --header 'x-mse-tag: xingzhihe' --header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' --header 'Content-Type: application/json' --data '{}' --http2
* Host localhost:8081 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
* Trying [::1]:8081...
* Connected to localhost (::1) port 8081
> POST /manager-bu/buNameAll HTTP/1.1
> Host: localhost:8081
> Accept: */*
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAAQAoAAAAAIAAAAA
> Authorization: eyUserJNCxrYCkpFYTPvHpGuH6IM8RWRrvhx4PYwZwjqmxeDZkLfvuuS3EXiWRGnkwwCRj
> deprecated: 1
> must-auth-heade: 1
> x-mse-tag: xingzhihe
> User-Agent: Apifox/1.0.0 (https://apifox.com)
> Content-Type: application/json
> Content-Length: 2
>
* upload completely sent off: 2 bytes
< HTTP/1.1 101
< Connection: Upgrade
< Upgrade: h2c
< Date: Tue, 22 Oct 2024 16:29:24 GMT
<
* Received 101, Switching to HTTP/2
* Copied HTTP/2 data in stream buffer to connection buffer after upgrade: len=15
< HTTP/2 200
< vary: origin, access-control-request-method, access-control-request-headers
< content-type: application/json
< date: Tue, 22 Oct 2024 16:29:24 GMT
<
["bu1","bu2","bu3"]*
```
--
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] [Bug] okclient or curl http2 return result error [dubbo]
Posted by "oxsean (via GitHub)" <gi...@apache.org>.
oxsean closed issue #14799: [Bug] okclient or curl http2 return result error
URL: https://github.com/apache/dubbo/issues/14799
--
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