Skip to content

Commit

Permalink
Feature: Curl - ignore fragment value from Uri
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr committed Jul 23, 2019
1 parent 8b12f09 commit 33e63a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ public function sendRequest(RequestInterface $request): ResponseInterface
curl_setopt($this->curlHandler, CURLOPT_HTTP_VERSION, $this->getProtocolVersion($request));

if ($request->getBody()->getSize()) {
curl_setopt($this->curlHandler, CURLOPT_POSTFIELDS, $request->getBody()->__toString());
curl_setopt($this->curlHandler, CURLOPT_POSTFIELDS, (string) $request->getBody());
}

curl_setopt_array($this->curlHandler, $this->parameters);

$headersParser = new HeadersParser();
curl_setopt($this->curlHandler, CURLOPT_HEADERFUNCTION, array($headersParser, 'parseHeaders'));
curl_setopt($this->curlHandler, CURLOPT_HTTPHEADER, self::toHttpHeaders($request->getHeaders()));
curl_setopt($this->curlHandler, CURLOPT_URL, $request->getUri()->__toString());
curl_setopt($this->curlHandler, CURLOPT_URL, (string) $request->getUri()->withFragment(''));

$result = curl_exec($this->curlHandler);

Expand Down

0 comments on commit 33e63a5

Please sign in to comment.