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

Headers information is lost for DirectionsResponse when routeOptions are added #763

Closed
osana opened this issue Mar 22, 2018 · 0 comments · Fixed by #765
Closed

Headers information is lost for DirectionsResponse when routeOptions are added #763

osana opened this issue Mar 22, 2018 · 0 comments · Fixed by #765

Comments

@osana
Copy link
Contributor

osana commented Mar 22, 2018

Response and Response (after #759 is merged) loose original request headers.

The culprit seems to be how we use Response.success()

return Response.success(response.body().toBuilder().routes(

we should change it to

      response.body()
        .toBuilder()
        .matchings(generateRouteOptions(response))
        .build(),
      new okhttp3.Response.Builder()
        .code(200)
        .message("OK")
        .protocol(response.raw().protocol())
        .headers(response.headers())
        .request(response.raw().request())
        .build());```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant