dsmiley commented on code in PR #2927: URL: https://github.com/apache/solr/pull/2927#discussion_r1914062827
########## solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java: ########## @@ -1170,6 +1171,21 @@ protected Object _getHandler() { return handler; } + /** Gets the client (user-agent) SolrJ version, or null if isn't SolrJ. */ + public SolrVersion getUserAgentSolrVersion() { + String header = req.getHeader("User-Agent"); + if (header == null || !header.startsWith("Solr")) { + return null; + } + try { + return SolrVersion.valueOf(header.substring(header.lastIndexOf(' ') + 1)); Review Comment: Yeah; I thought it would have no consequence so I did nothing about it. At least by returning a SolrVersion instead of null, we communicate indirectly that it's at least SolrJ. I could add a javadoc comment on 1.0 and 2.0 being used prior to 9.8. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org