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

Argument -L doesn't work #22

Open
andrewg78 opened this issue Apr 10, 2019 · 6 comments
Open

Argument -L doesn't work #22

andrewg78 opened this issue Apr 10, 2019 · 6 comments

Comments

@andrewg78
Copy link

Describe the bug
Argument -L doesn't work

Environment
Windows
Reverse proxy ? N
VPN ? N
Proxy ? Y , but behavior is exactly same when proxy is disabled

Curl command line
curl -L http:///page/

Expected behavior
Should work like curl.exe
curl.exe gives me the same error when there is no --location argument provided!!

Stacktrace
HttpResponseProxy{HTTP/1.0 308 PERMANENT REDIRECT [Content-Type: text/html; charset=utf-8, Content-Length: 281, Location: http:///page/, Server: Werkzeug/0.15.2 Python/2.7.13, Date: Tue, 09 Apr 2019 04:46:14 GMT] ResponseEntityProxy{[Content-Type: text/html; charset=utf-8,Content-Length: 281,Chunked: false]}}

@libetl
Copy link
Owner

libetl commented Apr 10, 2019

Hi, will try tomorrow, thanks for the feedback.

@libetl
Copy link
Owner

libetl commented Apr 11, 2019

Try this :

    @Test
    public void curlWithRedirect () {
        curl("-L http://www.yahoo.com");
    }

add a breakpoint in org.apache.http.impl.execchain.RedirectExec.execute (RedirectExec.java:116)

I am simulating the hsts feature (automatic redirect to https). And it just works

@libetl
Copy link
Owner

libetl commented Apr 11, 2019

So maybe your problem relates to something else.
Do you have a public url that is not too confidential that I can test to reproduce the error ?

@andrewg78
Copy link
Author

Sorry, this is closed corporate environment.

@libetl
Copy link
Owner

libetl commented Apr 12, 2019

I believe you should set a log4j.properties file next to your code, with this content :

log4j.logger.org.apache.http=DEBUG

re run your code, and then give me the logs.
thanks

@libetl
Copy link
Owner

libetl commented Apr 15, 2019

Also do you know if you have a value set for one of these variables :
$HTTP_PROXY or $HTTPS_PROXY ?

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

No branches or pull requests

2 participants