Skip to content
This repository was archived by the owner on Nov 26, 2017. It is now read-only.

Fixing warnings triggered by cURL when no response is received.#1438

Merged
LouisLandry merged 1 commit intojoomla:stagingfrom
pasamio:curl_warnings
Aug 6, 2012
Merged

Fixing warnings triggered by cURL when no response is received.#1438
LouisLandry merged 1 commit intojoomla:stagingfrom
pasamio:curl_warnings

Conversation

@pasamio
Copy link
Copy Markdown
Contributor

@pasamio pasamio commented Aug 6, 2012

This pull request resolves a situation where when no response from a server is received a PHP warning is thrown by the cURL transport. Instead the code triggering the warning is mitigated and additionally a check to see if there was any response data is added to validate a response was actually received or throw an exception.

LouisLandry added a commit that referenced this pull request Aug 6, 2012
Fixing warnings triggered by cURL when no response is received.
@LouisLandry LouisLandry merged commit 233125f into joomla:staging Aug 6, 2012
@piotr-cz
Copy link
Copy Markdown
Contributor

piotr-cz commented Aug 7, 2012

Please take a look at my PR #1022.
This is addressing same issue across all JHttpTransports

@elinw
Copy link
Copy Markdown
Contributor

elinw commented Aug 8, 2012

Actually there's a difference between getting empty content and what you get from a bad url where in fact you are not going to get a normal repsonse code since there is no server.
$return = new JHttpResponse

I haven't tested it yet but I bet it isn't pretty if the $uri doesn't exist, it probably needs an exception and then JTransportCurl needs to handle that. And yes the error issue is a problem because php is going to send a notice before any exception gets thrown.

Needs to catch that

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants