View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015790 | mantisbt | other | public | 2013-04-26 11:56 | 2019-01-11 06:40 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.16 | ||||
Target Version | 1.2.16 | Fixed in Version | 1.2.16 | ||
Summary | 0015790: url_get() cURL should set User Agent | ||||
Description | the cURL module, unlike command-line curl, does not set User Agent (it's blank by default). This causes the SourceGithub plugin's Github api calls to fail and return the following JSON payload instead of expected data {"message":"Missing or invalid User Agent string. See http://developer.github.com/v3/#user-agent-required"} The issue was initially reported on the source-integration plugin's issues page [1]. I personally think it makes sense that there should always be a valid User Agent specified, so the url_get() api function should be updated accordingly. Following the same logic, I have also filed an enhancement request on PHP tracker [2]. [1] https://github.com/mantisbt-plugins/source-integration/issues/56 | ||||
Steps To Reproduce | $ curl localhost ==> access.log $ php -a ==> access.log | ||||
Tags | No tags attached. | ||||
And the fact that the changesets below were finally attached proves that the problem is now fixed :) |
|
Shouldn't we set the user agent to something like: mantisbt/1.2.15 OR curl/mantisbt/1.2.15 rather than curl/curl_version? |
|
You're probably right. To be consistent with RFC2616, i would then propose mantisbt/<version> curl/<version> wdyt ? |
|
Sounds good. |
|
MantisBT: master 1d8b02c9 2013-04-26 14:01 Details Diff |
Fix 0015790: url api - set curl user agent in url_get() |
Affected Issues 0015790 |
|
mod - core/url_api.php | Diff File | ||
MantisBT: master-1.2.x 8df9d5fa 2013-04-26 14:01 Details Diff |
Fix 0015790: url api - set curl user agent in url_get() |
Affected Issues 0015790 |
|
mod - core/url_api.php | Diff File | ||
MantisBT: master-1.2.x 11ee7e25 2013-10-01 13:45 Details Diff |
Fix 0015790: url_get() curl user agent is now mantis Instead of a generic 'curl/version' we now report 'mantisbt/version php-curl/version' |
Affected Issues 0015790 |
|
mod - core/url_api.php | Diff File | ||
MantisBT: master 8a523318 2013-10-01 13:45 Details Diff |
Fix 0015790: url_get() curl user agent is now mantis Instead of a generic 'curl/version' we now report 'mantisbt/version php-curl/version' |
Affected Issues 0015790 |
|
mod - core/url_api.php | Diff File | ||
MantisBT: master-1.2.x 78c545fe 2013-10-02 09:24 Details Diff |
Fix 0015790: with the '/' this time |
Affected Issues 0015790 |
|
mod - core/url_api.php | Diff File | ||
MantisBT: master af338a4a 2013-10-02 09:24 Details Diff |
Fix 0015790: with the '/' this time |
Affected Issues 0015790 |
|
mod - core/url_api.php | Diff File |