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

SOLR-12813 followup -- preserve user Principal in alternate codepath in EmbeddedSolrServer #2429

Merged
merged 3 commits into from
May 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,13 @@ public NamedList<Object> request(SolrRequest<?> request, String coreName)
if (path == null || !path.startsWith("/")) {
path = "/select";
}

SolrRequestHandler handler = coreContainer.getRequestHandler(path);
if (handler != null) {
try {
SolrQueryRequest req =
_parser.buildRequestFrom(null, request.getParams(), getContentStreams(request));
_parser.buildRequestFrom(
Copy link
Contributor

Choose a reason for hiding this comment

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

I hate that we have _parser, I mean, we don't use that as a global pattern to define private variables! Renaming the various _myObject would be for another ticket, I know ;-).

Copy link
Contributor

Choose a reason for hiding this comment

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

okay, looked more, and yeah, i guess one method is used from http, but the other isn't cause it's for tests etc.... okay.

Copy link
Contributor

Choose a reason for hiding this comment

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

i wish there was a better way than passing null around everywhere.

Copy link
Contributor

Choose a reason for hiding this comment

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

That underscore is from 2008 by Ryan McKinley -- long time ago :-)
BTW I really appreciate that you are caring to these minor matters,

Copy link
Contributor

Choose a reason for hiding this comment

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

Goign to bring it up at community meeting tomorrow...

null, request.getParams(), getContentStreams(request), request.getUserPrincipal());
req.getContext().put("httpMethod", request.getMethod().name());
req.getContext().put(PATH, path);
SolrQueryResponse resp = new SolrQueryResponse();
Expand Down