Skip to content

+ Redirect URL Storage - #6914

Merged
alexey-milovidov merged 18 commits into
ClickHouse:masterfrom
maqroll:master
Sep 23, 2019
Merged

alexey-milovidov merged 18 commits into
ClickHouse:masterfrom
maqroll:master

Conversation

@maqroll

@maqroll maqroll commented Sep 11, 2019

Copy link
Copy Markdown
Contributor

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Category (leave one):

  • Improvement

Short description (up to few sentences):

Support (optional) redirects on URL storage.

Detailed description (optional):

Set up max number of GET redirects on URL storage using max_http_get_redirects.
max_http_get_redirects=0 (default) means no redirects allowed.

@maqroll
maqroll marked this pull request as ready for review September 11, 2019 16:46
Comment thread dbms/src/IO/ReadWriteBufferFromHTTP.cpp Resolved
@alexey-milovidov

Copy link
Copy Markdown
Member

Security considerations should be noted in setting description.

@alexey-milovidov

Copy link
Copy Markdown
Member

@nikitamikhaylov You can merge after:

  1. Get rid of try/catch.
  2. Add an integration test.

@maqroll

maqroll commented Sep 13, 2019 via email •

Copy link
Copy Markdown
Contributor Author

@nikitamikhaylov

Copy link
Copy Markdown
Member

If you are interested in it, that's ok for me :)

@nikitamikhaylov

Copy link
Copy Markdown
Member

@maqroll How things going? Do you need my help? Maybe it is better to reassign this task to me?

@maqroll

maqroll commented Sep 16, 2019

Copy link
Copy Markdown
Contributor Author

@maqroll How things going? Do you need my help? Maybe it is better to reassign this task to me?

@nikitamikhaylov If it's ok I'll report the status at the end of the day (in Spain) and you'll decide.

@maqroll

maqroll commented Sep 16, 2019

Copy link
Copy Markdown
Contributor Author

@nikitamikhaylov I got here (no experience in C ++). Maybe you can use it, it depends entirely on you. Thanks.

@nikitamikhaylov

Copy link
Copy Markdown
Member

Ok.

@maqroll

maqroll commented Sep 18, 2019

Copy link
Copy Markdown
Contributor Author

@nikitamikhaylov Last change compiles and works on basic tests.

@nikitamikhaylov

Copy link
Copy Markdown
Member

Ok, I see. But we need all test to be green. I will do it in some time.

@maqroll

maqroll commented Sep 21, 2019

Copy link
Copy Markdown
Contributor Author

Working in the integration test.

@maqroll

maqroll commented Sep 23, 2019 •

Copy link
Copy Markdown
Contributor Author

@nikitamikhaylov @alexey-milovidov got rid of try/catch & added integration test

out_stream_callback(stream_out);

istr = receiveResponse(*session, request, response);
istr = receiveResponse(*sess, request, response, true);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's suspicious, need double check it...

@maqroll maqroll Sep 23, 2019 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

receiveResponse method before the change only accepted 200 code responses. That last parameter accepts redirects codes (307,...) as ok. That loop accepts redirects and checks max_redirects limit. I preferred to add a new parameter in receiveResponse instead of creating a new method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants