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

Avoid going through HTTP proxy for requests to localhost in refine script #6361

Merged
merged 4 commits into from
Feb 16, 2024

Conversation

tejasbhosale17
Copy link
Contributor

@tejasbhosale17 tejasbhosale17 commented Feb 13, 2024

Fixes #2000

Copy link
Sponsor Member

@wetneb wetneb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! The issue mentions that a similar adaptation should be done for downloads done via wget. Could you also take care of that? According to the manual it should be enough to define a no_proxy=127.0.0.1 environment variable.

@wetneb wetneb linked an issue Feb 13, 2024 that may be closed by this pull request
@tejasbhosale17
Copy link
Contributor Author

Yes Sure. I made similar changes for wget please review.

refine Outdated
CURL_RETURN=$?
if [ $CURL_RETURN -eq "7" ] || [ $CURL_RETURN -eq "22" ] ; then
NOT_RUNNING="1"
fi
elif [ "$WGET" ] ; then
wget -O - $URL > /dev/null 2>&1
wget --noproxy 127.0.0.1 -O - $URL > /dev/null 2>&1
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the same syntax does not work for wget, as --noproxy is not a valid wget option.

refine Outdated
CURL_RETURN=$?
if [ $CURL_RETURN -eq "7" ] || [ $CURL_RETURN -eq "22" ] ; then
NOT_RUNNING="1"
fi
elif [ "$WGET" ] ; then
wget -O - $URL > /dev/null 2>&1
wget --no-proxy -q -O - $URL_LOCAL > /dev/null 2>&1
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
wget --no-proxy -q -O - $URL_LOCAL > /dev/null 2>&1
no_proxy=127.0.0.1 wget -O - $URL_LOCAL > /dev/null 2>&1

refine Outdated
elif [ "$WGET" ] ; then
RUNNING=`wget -q -O - $URL | grep "$CHECK_STR"`
RUNNING=`wget --no-proxy -q -O - $URL_LOCAL | grep "$CHECK_STR"`
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RUNNING=`wget --no-proxy -q -O - $URL_LOCAL | grep "$CHECK_STR"`
RUNNING=`no_proxy=127.0.0.1 wget -O - $URL_LOCAL | grep "$CHECK_STR"`

@tejasbhosale17
Copy link
Contributor Author

@wetneb I made the suggested changes, please let me know if I need to follow any steps since this is my first open-source contribution.

Copy link
Sponsor Member

@wetneb wetneb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@github-actions github-actions bot added Type: Bug Issues related to software defects or unexpected behavior, which require resolution. Good First Issue Indicates issues suitable for newcomers to design or coding, providing a gentle introduction. labels Feb 15, 2024
@wetneb wetneb changed the title Issue #2000 added --noproxy 127.0.0.0.1 to curl Avoid going through HTTP proxy for requests to localhost in refine script Feb 16, 2024
@wetneb wetneb merged commit 6a65c6b into OpenRefine:master Feb 16, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Indicates issues suitable for newcomers to design or coding, providing a gentle introduction. Type: Bug Issues related to software defects or unexpected behavior, which require resolution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

curl and proxy
2 participants