For the attachements module and other added functionality it would be nice to add the facility to easily post (and request?) data to different paths in addition to the ones defined in the classes.

Comments

pwolanin’s picture

Status: Active » Needs review
StatusFileSize
new1.66 KB

Something like this - would be useful for the attachements module to POST multi-part form data

pwolanin’s picture

Priority: Normal » Critical
StatusFileSize
new2.4 KB

Slightly revised - needed for: http://drupal.org/node/490078

JacobSingh’s picture

+++ apachesolr.module	25 Oct 2009 18:01:11 -0000
@@ -1041,6 +1041,10 @@ function apachesolr_facetcount_save($edi
+  if (empty($query)) {
+    // This should only happen if Solr is not set up - avoids fatal errors.
+    return;
+  }

Sneaking something in? Well, I suppose it's a good idea.

Regarding the function, it's okay with me, but smells like cut-and-paste. Perhaps the available handlers should be defined in an array or something so they can be modified through some public method?

Anyway, if it's a pain to refactor, it's not a very difficult thing to fix later.

-J

I'm on crack. Are you, too?

pwolanin’s picture

The method we took already to add additional handlers was to extend the class from the PHP library via the Drupal module and add new methods. It just won't work to have each additional contrib module try to do that, so this can be a more generic approch for module to interact with customized response handlers. We should probably add a matching GET method?

pwolanin’s picture

StatusFileSize
new3.17 KB

Here's a little more refined method that allows any type of request.

pwolanin’s picture

StatusFileSize
new3.1 KB

Final version w/ tweaked doxygen

committing this to 6.x-1.x

pwolanin’s picture

Title: Expose function to allow posting to additional Solr paths » Add method to allow requests to additional Solr servelets (paths)
StatusFileSize
new3.98 KB

committing attached to 6.x-2.x

pwolanin’s picture

Version: 6.x-1.x-dev » 5.x-2.x-dev
Status: Needs review » Patch (to be ported)

port to 5.x?

claudiu.cristea’s picture

Status: Patch (to be ported) » Needs review

Yes. Here's the patch...

claudiu.cristea’s picture

StatusFileSize
new3.98 KB

Uppps... Sorry, forgot the patch.

claudiu.cristea’s picture

Status: Needs review » Fixed

Committed in #284512.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.