Motivation
The goal is to permit to make request to antispam servers through the proxy, if Drupal is configure in this way.
Proposed resolution
Drupal give us the marvellous function drupal_http_request() which check if the proxy configuration is set for the current site. So, for implement this request we just have to modify _antispam_api_http_post() function for used this drupal_http_request() function.
(My patch coming soon...)
Remaining tasks
Your comments, about the patch will be posting in the next comment, are welcome ;)
User interface changes
No change.
API changes
- The variable name return by the function _antispam_api_http_post() have changed from $response to $return.
- The $return[0] isn't the same as former $response[0]. $response[0] just returned a string with the response headers. $return[0] return the whole object returned itself by drupal_http_request(). Better or worse ? I feel that better, but i'm open to your comments.
- The $return[1] is the same as former $response[1].
Comment | File | Size | Author |
---|---|---|---|
#6 | Use-drupal-configuration-proxy-1915116-6.patch | 8.38 KB | chrisguindon |
| |||
#5 | Use-drupal-configuration-proxy-1915116-5.patch | 2.1 KB | arunkumark |
| |||
#2 | antispam-use_drupal_configuration_proxy-1915116-2.patch | 1.99 KB | Merkator |
#1 | antispam-use_drupal_configuration_proxy-1915116-1.patch | 26.17 KB | Merkator |
Comments
Comment #1
Merkator CreditAttribution: Merkator commentedMy patch... Your comments ? :)
Comment #2
Merkator CreditAttribution: Merkator commentedMy former patch is really bad. This one is better... Sorry.
Comment #3
NStorm CreditAttribution: NStorm commentedWill change it to "needs review" for patch test. But this package is unfortunately are unmaintained by now.
Comment #4
marcoscanoPatch does not apply to -dev anymore. Also, some minor improvements to the patch:
I know this was not created in this patch, but once we are modifying it, we could take the opportunity to apply the current coding standards to this docblock :)
https://www.drupal.org/docs/develop/coding-standards/api-documentation-a...
There are some trailing spaces here.
There are some trailing spaces here.
There should be a space between the comma and the next argument in the function call.
This assignment is redundant because
$return
was already assigned some lines before.Comment #5
arunkumarkHi,
I have rerolled patch for the 7.x-1.x-dev version with comment #4.
Comment #6
chrisguindon CreditAttribution: chrisguindon as a volunteer commentedI have rerolled patch for the 7.x-1.x-dev version with comment #5
This patch is a bit larger since it's also removing some unwanted whitespaces in the file.
Comment #7
chrisguindon CreditAttribution: chrisguindon as a volunteer commented