Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Using http://name:pass@host:port is broken when uploading a model to /system/model #9
I'm trying to upload a model file through the rest API using a modelUrl parameter.
The following call fails with
While this call actually passes:
I think that the problem is similar to the one described at https://github.com/linkedin/glu/issues/closed#issue/8 only that this time I wasn't able to find the source code for the class that actually makes the HTTP request.
The line is ModelController.groovy:117
the .text I assume should fetch the content of params.modelUrl but it fails for the given http parameter and my assumption is that its authentication isn't performed correctly (if I try a URL without user:pass then it's OK).
GroovyNetUtils is in the linkedin-utils open source project but has nothing to do with the problem. The method being used here is [URL.getText()](http://groovy.codehaus.org/groovy-jdk/java/net/URL.html#getText(\)) which is a standard method added by groovy. Clearly the implementation of this method is not handling basic authentication properly.
I think I will need to refactor the code to extract the logic of fetching a url in a common place and share it between