playframework / playframework/play-ws

WS response interceptor does not support URI special characters(%2F)?

Open
#334 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
224
Forks
92
Avg merge
1d 19h
Merged PRs (30d)
28

Description

I looks like that the WS response interceptor does not support URI special characters

the issue step is as following

1. client send WS request

2. service response: 307 Temporary Redirect

the redirest location is:
https://docker-images-prod.s3.amazonaws.com/registry-v2/docker/registry/v2/blobs/sha256/ca/ca4f61b1923c10e9eb81228bd46bee1dfba02b9c7dac1844527a734752688ede/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAIQF2R62EC73X2HOA%2F20171224%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171224T034443Z&X-Amz-Expires=1200&X-Amz-SignedHeaders=host&X-Amz-Signature=b482baf75c9c3895279843a59483e8ea1bf6b3e3451f80ba7f741959150c7f7a

3. org.asynchttpclient.netty.handler.intercept.Redirect30xInterceptor will start

it looks like that Redirect30xInterceptor can not handle the sepcial character(%2F) correct

4. server response: 400 Bad Request

My question is

  1. can the http intercept support the special character (%2F)?
  2. how to config or disable the WS response intercept?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with org.asynchttpclient.netty.handler.intercept.Redirect30xInterceptor and reproduce the WebSocket redirect from the issue, including the %2F characters in the S3 location. Determine whether the interceptor preserves the URI or how response interception can be configured or disabled; done means the redirect no longer produces a 400 Bad Request or the requested configuration is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, scala
Domain
api, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.