Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vividus sends header "Connection" twice and it cause "Bad chunk header:" for API with strict headers policy #5739

Open
DKalkaev opened this issue Feb 24, 2025 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@DKalkaev
Copy link

We encountered an issue after updating Vividus from version 0.6.3 to 0.6.14.

The problem is related to the new header management in Vividus. Some GET API calls started returning the following error:
"Bad chunk header: {%body of JSON response%}"

We found that this issue is connected to a stricter header policy enforced by some APIs.

Background

In our tests, we set up a few additional custom headers:

  • X-Request-Id
  • X-Mashery-Oauth-Client-Id
  • Authorization
  • Content-Type
  • X-Mashery-Oauth-Scope
  • X-Mashery-Oauth-User-Context

After adding these custom headers, Vividus automatically adds some "default" headers.

Vividus Default Headers Comparison

Old Versions (0.6.3 - 0.6.13):

Accept-Encoding: gzip, x-gzip, deflate, br  
Host: XXXXXXXXXXXXXXXXXXX  
Connection: keep-alive  
User-Agent: Apache-HttpClient/5.2.1 (Java/17.0.1)  
Cookie: YYYYYYYYYYYYYYYYYYYY  

New Version (0.6.14):

Accept-Encoding: gzip, x-gzip, deflate, br  
Host: XXXXXXXXXXXXXXXXXXX  
Connection: keep-alive  
User-Agent: Apache-HttpClient/5.4.1 (Java/21.0.4)  
Upgrade: TLS/1.2  
Connection: Upgrade  
Cookie: YYYYYYYYYYYYYYYYYYYY  

Issue Details

The issue occurs with the Connection header. In the latest version, Vividus sends this header twice (keep-alive and Upgrade), which causes conflicts.

We replicated the issue using Postman, which confirmed this theory.

Suggestion

Could we introduce a feature to manage these cases and allow control over certain "default" headers?

Artifacts

  • Screenshot (Left is new version of Vividus, right is a old version of Vividus)
    Image

**Execution environment **

  • Vividus version: [e.g. 0.6.14]
  • OS: [e.g. Linux, Windows]
  • Java: [e.g. OpenJDK 64-Bit Server VM (build 21)]

Additional context
Link to StackOverflow with similar issue and same resolution
https://stackoverflow.com/questions/71615000/postman-error-parse-error-invalid-character-in-chunk-size

@DKalkaev DKalkaev added the bug Something isn't working label Feb 24, 2025
@valfirst valfirst added this to the 0.6.15 milestone Feb 24, 2025
@valfirst
Copy link
Collaborator

@DKalkaev please try 0.6.15-SNAPSHOT version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants