Skip to content

Conversation

@majetideepak
Copy link
Collaborator

Description

HTTP 1.1 requires Host header. We are seeing a 400 Bad Request response otherwise in our setup.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

Prestissimo (Native Execution)
* Fix PrestoExchangeSource 400 Bad Request by adding the "Host" header.

@majetideepak majetideepak requested a review from a team as a code owner June 9, 2025 21:13
@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Jun 9, 2025
@prestodb-ci prestodb-ci requested review from a team, nishithakbhaskaran and pdabre12 and removed request for a team June 9, 2025 21:13
@majetideepak majetideepak requested a review from amitkdutta June 9, 2025 21:13
@majetideepak
Copy link
Collaborator Author

@amitkdutta can you please help review? Thanks.

@majetideepak majetideepak changed the title [native] Add header proxygen::HTTP_HEADER_HOST to PrestoExchangeSource [native] Add header "host" to PrestoExchangeSource Jun 9, 2025
@majetideepak majetideepak changed the title [native] Add header "host" to PrestoExchangeSource [native] Add header "Host" to PrestoExchangeSource Jun 9, 2025
@majetideepak majetideepak requested a review from steveburnett June 9, 2025 21:20
@aditi-pandit
Copy link
Contributor

@majetideepak : Is it possible to add a check in some test in https://github.com/prestodb/presto/blob/master/presto-native-execution/presto_cpp/main/tests/PrestoExchangeSourceTest.cpp, so that we can be assured that this field continues to output in header and is not accidentally dropped by someone else.

Else this PR is good, I'll approve it once the test is in place.

@majetideepak
Copy link
Collaborator Author

@aditi-pandit We need to setup https with certain versions of packages. We don't have such a framework.

@majetideepak
Copy link
Collaborator Author

majetideepak commented Jun 10, 2025

I also don't see a way to get the doRequest headers in this test as well. PrestoExchangeSourceTest.cpp

@aditi-pandit
Copy link
Contributor

You should be able to get host header from message parameter here (its unused now): https://github.com/prestodb/presto/blob/master/presto-native-execution/presto_cpp/main/tests/PrestoExchangeSourceTest.cpp#L135

We can add a check that it always has a host:port format.

@majetideepak majetideepak force-pushed the fix-https-issue branch 2 times, most recently from ffea449 to da31121 Compare June 12, 2025 16:32
@majetideepak
Copy link
Collaborator Author

@aditi-pandit can you take a look now? I added a test. Thanks.

Copy link
Contributor

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

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

Thanks @majetideepak

@amitkdutta
Copy link
Contributor

@majetideepak I can test and let you know today if any Meta specific issue show up.

@facebook-github-bot
Copy link
Collaborator

@amitkdutta has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Contributor

@amitkdutta amitkdutta left a comment

Choose a reason for hiding this comment

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

Tested in Meta specific environment. No issues observed. Thanks @majetideepak

@aditi-pandit aditi-pandit merged commit 8fa7a17 into prestodb:master Jun 15, 2025
230 of 232 checks passed
@majetideepak majetideepak deleted the fix-https-issue branch June 20, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:IBM PR from IBM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants