php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72033 Real Time Get requests fails if it wasn't the first request
Submitted: 2016-04-15 16:26 UTC Modified: 2016-04-15 16:26 UTC
From: omars@php.net Assigned: omars (profile)
Status: Closed Package: solr (PECL)
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: omars@php.net
New email:
PHP Version: OS:

 

 [2016-04-15 16:26 UTC] omars@php.net
Description:
------------
SolrClient::getById/SolrClient::getByIds does not clear the request body before sending the request, causes invalid URL with tainted previously sent request

Test script:
---------------
require_once "bootstrap.inc";

$options = array
(
    'hostname' => SOLR_SERVER_HOSTNAME,
    'login'    => SOLR_SERVER_USERNAME,
    'password' => SOLR_SERVER_PASSWORD,
    'port'     => SOLR_SERVER_PORT,
    'path'     => SOLR_SERVER_PATH
);

$client = new SolrClient($options);

$doc = new SolrInputDocument();

$doc->addField('id', 'some_id');
$doc->addField('field1', 'val1');

$client->addDocument($doc);

$client->commit();

$response = $client->getById('some_id');

var_dump(isset($response->getArrayResponse()['doc'])).PHP_EOL;
var_dump($response->getResponse()->doc->id) . PHP_EOL;

Expected result:
----------------
bool(true)
string(7) "some_id"

Actual result:
--------------
Fatal Error: Uncaught SolrClientException: Solr HTTP Error 3: 'URL using bad/illegal format or missing URL'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-15 16:26 UTC] omars@php.net
-Assigned To: +Assigned To: omars
 [2016-04-16 17:58 UTC] omars@php.net
Automatic comment on behalf of omars
Revision: http://git.php.net/?p=pecl/search_engine/solr.git;a=commit;h=b0dc4ace022960887e2328081b1d744547f9ea13
Log: Fix Bug #72033 Real Time Get requests failure
 [2016-04-16 17:58 UTC] omars@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 01:01:34 2025 UTC