-
Notifications
You must be signed in to change notification settings - Fork 302
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
Extract query and big literals parameters HTTP 414 #794
Comments
It looks good :-) If you adopt it for the master branch (upcoming 6.0.0) and add a test, we can merge it. |
@mkalkbrenner Should this be integrated in the existing solarium/src/Plugin/PostBigRequest.php Lines 66 to 67 in 559f8a8
Maybe move the actual heavy lifting to two separate protected functions. That allows one to extend the plugin and override either of those (but not necessarily both) if that happens to suit one's needs. Detecting an extract query by the handler isn't 100% reliable. You can configure Solr with a different requestHandler for extracting. If you need something other than UTF-8, you can use solarium/src/Plugin/PostBigRequest.php Line 68 in 559f8a8
|
That's new for the upcoming 6.0.0, by the way. It won't work if you need to backport to a 5.x release. |
is there a specific reason the |
@wickedOne I assume that a "plugin" forces people to think about its configuration. To avoid that plugin you could also modify the configuration of your container, jetty in most Solr installations. |
@mkalkbrenner thanx for explaining, wasn't aware solr caches were request method sensitive |
From the Solr documentation:
|
Solr's documentation isn't entirely accurate. (You might have noticed I have a penchant for exact docs.) For HTTP/1.0, RFC 1945 states:
For HTTP/1.1, RFC 7231 states:
It would be more precise to say that the HTTP/1.0 standard doesn't allow it. And because
, it doesn't emit cache headers for POST requests. |
@thomascorthals thanks for the clarification.
|
@mkalkbrenner I agree with your statement. We shouldn't switch to POST automatically if the behaviour isn't identical to GET. I just wanted to provide some context for the way Solr does things. |
Just a thought: the reason why we don't switch to POST automatically without |
I don't think so. It is also common to run Solr behind a reverse caching proxy. Removing the GET parameters would lead to false cache hits. |
@AndreaDiPietro-ADP Could you open a PR? Within the PR a test and some documentation (and an example) should be added. |
@mkalkbrenner |
The |
Extract query put literals on query string and this may cause an HTTP 414 in some real use case,
I made this Solarium plugin to solve this if you want you can include into Solarium base code.
The text was updated successfully, but these errors were encountered: