Giter Site home page Giter Site logo

Comments (8)

rburgst avatar rburgst commented on July 23, 2024

can you see if this problem also persists with 2.1?

from okhttp-digest.

zierka avatar zierka commented on July 23, 2024

Ok, so it looks like it works for all subsequent requests (with 2.2 as well), just not with the first one (the first one that's sent with the Authentication header). It is correctly using the path component for the uri after that.

from okhttp-digest.

rburgst avatar rburgst commented on July 23, 2024

Could you create a unit test that simulates the problem? There are already a couple of tests that you can use as a basis.

from okhttp-digest.

zierka avatar zierka commented on July 23, 2024

I can try. I forked the project, opened with Android studio and tried to run a test to see if everything's ok (by clicking the play icon next to the unit test method), but I always get No tests were found and Class not found: "com.burgstaller.okhttp.digest.DigestAuthenticatorTest". I'm unfortunately not that familiar with Android projects and Android Studio.

from okhttp-digest.

zierka avatar zierka commented on July 23, 2024

Upon further debugging, it looks like the issue exists only when using Charles Proxy. In that case route.requiresTunnel() returns true (proxy.type() == Proxy.Type.HTTP), so it enters the else case, where the host and port is used.

DigestAuthenticator:232

        // Add method name and request-URI to the parameter map
        if (route == null || !route.requiresTunnel()) {
            final String method = request.method();
            final String uri = RequestLine.INSTANCE.requestPath(request.url());
            parameters.put("methodname", method);
            parameters.put("uri", uri);
        } else {
            final String method = "CONNECT";
            final String uri = request.url().host() + ':' + request.url().port();
            parameters.put("methodname", method);
            parameters.put("uri", uri);
        }

I'm not actually sure if there is an issue with this library, if this is expected behaviour or not.

from okhttp-digest.

rburgst avatar rburgst commented on July 23, 2024

I will need to double check this with a proxy setup, I will need to check #64 anyway.

from okhttp-digest.

rburgst avatar rburgst commented on July 23, 2024

can you double check with the latest version, I fixed proxy authentication there.

from okhttp-digest.

rburgst avatar rburgst commented on July 23, 2024

any news? can I close this?

from okhttp-digest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.