summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2024-05-02 17:37:18 +0200
committerChristian Schneider2024-05-02 17:37:18 +0200
commit97dea4eda39c28306b3f3685a6165aef78ae8e38 (patch)
treecf7f8199c6b58fdf531d9c048892a77e9dca2fb7
parent0bb9584e5198777d6836e3ccfad1b18e9b266891 (diff)
downloaditools-97dea4eda39c28306b3f3685a6165aef78ae8e38.tar.gz
itools-97dea4eda39c28306b3f3685a6165aef78ae8e38.tar.bz2
itools-97dea4eda39c28306b3f3685a6165aef78ae8e38.zip
Do not check body_on_fail with assoc mode, we looked at those separately
-rw-r--r--it_url.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class
index e6e0ddf..c122aeb 100644
--- a/it_url.class
+++ b/it_url.class
@@ -361,7 +361,7 @@ function request($p=array())
else
{
# FIXME 2024-06 CS Send a notice in cases where changing the default to body_on_fail=false would change result for text results
- if ($url->result >= 400 && $url->data && !isset($p['body_on_fail']) && it::match('^text/', $url->headers['Content-Type']))
+ if ($url->result >= 400 && $url->data && !$p['assoc'] && !isset($p['body_on_fail']) && it::match('^text/', $url->headers['Content-Type']))
it::error(['to' => 'schneider@search.ch', 'title' => 'Failing it_url::get() without body_on_fail but non-empty data', 'body' => ['p' => $p, 'url' => $url]]);
if ($url->result >= 400 && ((isset($p['body_on_fail']) && !$p['body_on_fail']) || $p['empty_on_fail'] || $p['keepfailed'])) # FIXME 2024-06 CS Remove deprecated empty_on_fail support