Skip to content

Broken digest when recording json that includes non-required special characters #6194

@scbedd

Description

@scbedd

The java folks have a super fun situation on their hands. @lmolkova is transitioning the container registry tests to the test proxy.

Sameeksha's original thought is that as part of this test, json is sent to the service with some content that looks something like this:

// headers include a digest:
//  digest: <hash of body + other stuff>
// body is json:
{
    "key": "\/hello"
}

Which, when deserialized, sanitized, and reserialized, has a unnecessary backslash disappear and becomes

{
  "key": "/hello"
}

Such that when we run in playback, the digest now doesn't align. Included in the original context of this issue was a stack overflow that highlights why this may be occurring for this service 👍

We need to come up with a resolution for this situation.

Repro

  1. Check out this branch
  2. mvn install -f .\sdk\containerregistry\azure-containers-containerregistry\pom.xml "-Dcodesnippet.skip" "-Drevapi.skip" "-Dspotbugs.skip" -DskipTests=true "-Djacoco.skip" "-Dmaven.javadoc.skip=true" -DskipTestCompile "-Dcheckstyle.skip=true"
  3. mvn surefire:test -f .\sdk\containerregistry\azure-containers-containerregistry\pom.xml "-Dcodesnippet.skip" "-Drevapi.skip" "-Dspotbugs.skip" "-Djacoco.skip" "-Dmaven.javadoc.skip=true" -DskipTestCompile "-Dcheckstyle.skip=true" "-Dtest=ContainerRegistryContentClientIntegrationTests#getManifestListManifest"

CC @samvaity for FYI

Metadata

Metadata

Assignees

Labels

Test-ProxyAnything relating to test-proxy requests or issues.

Type

No type

Projects

Status

🎊 Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions