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

TCK: Add a mutable version of MicronautAwsProxyRequest #1638

Merged
merged 1 commit into from
Mar 8, 2023

Conversation

timyates
Copy link
Contributor

@timyates timyates commented Mar 7, 2023

This allows the client filter TCK tests that mutate the request to pass.

The Cookies were effectively mutable already (as they were simple cookies)

To make parameters and headers mutable, I updated the Aws variants

This allows the client filter TCK tests that mutate the request to pass.

The Cookies were effectively mutable already (as they were simple cookies)

To make parameters and headers mutable, I updated the Aws variants
@timyates timyates requested a review from sdelamo March 7, 2023 12:19
@timyates timyates self-assigned this Mar 7, 2023
@sonarcloud
Copy link

sonarcloud bot commented Mar 7, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

3.0% 3.0% Coverage
0.0% 0.0% Duplication

@timyates timyates requested a review from yawkat March 7, 2023 14:03
@sdelamo
Copy link
Contributor

sdelamo commented Mar 7, 2023

related commit in servlet micronaut-projects/micronaut-servlet@ab6eada

@timyates
Copy link
Contributor Author

timyates commented Mar 7, 2023

This was done in servlet here micronaut-projects/micronaut-servlet@ab6eada

@Override
public MutableHttpHeaders add(CharSequence header, CharSequence value) {
String headerName = HttpHeaderUtils.normalizeHttpHeaderCase(header.toString());
headers.computeIfAbsent(headerName, s -> new ArrayList<>());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
headers.computeIfAbsent(headerName, s -> new ArrayList<>());
headers.computeIfAbsent(headerName, s -> new ArrayList<>()).add(value.toString());

@sdelamo sdelamo merged commit 6a5c203 into master Mar 8, 2023
@sdelamo sdelamo deleted the fix-request-is-immutable branch March 8, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants