{"action":"created","issue":{"url":"https://api.github.com/repos/guzzle/guzzle/issues/1191","labels_url":"https://api.github.com/repos/guzzle/guzzle/issues/1191/labels{/name}","comments_url":"https://api.github.com/repos/guzzle/guzzle/issues/1191/comments","events_url":"https://api.github.com/repos/guzzle/guzzle/issues/1191/events","html_url":"https://github.com/guzzle/guzzle/issues/1191","id":97266077,"number":1191,"title":"Explicit Google App Engine support, especially for HTTPS requests","user":{"login":"atrauzzi","id":115199,"avatar_url":"https://avatars.githubusercontent.com/u/115199?v=3","gravatar_id":"","url":"https://api.github.com/users/atrauzzi","html_url":"https://github.com/atrauzzi","followers_url":"https://api.github.com/users/atrauzzi/followers","following_url":"https://api.github.com/users/atrauzzi/following{/other_user}","gists_url":"https://api.github.com/users/atrauzzi/gists{/gist_id}","starred_url":"https://api.github.com/users/atrauzzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atrauzzi/subscriptions","organizations_url":"https://api.github.com/users/atrauzzi/orgs","repos_url":"https://api.github.com/users/atrauzzi/repos","events_url":"https://api.github.com/users/atrauzzi/events{/privacy}","received_events_url":"https://api.github.com/users/atrauzzi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/guzzle/guzzle/labels/Question","name":"Question","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-07-25T23:22:41Z","updated_at":"2015-07-30T17:23:30Z","closed_at":null,"body":"I'm currently going through some troubles getting Guzzle-based libraries working on Google App Engine.\r\n\r\nI'm not convinced any of this is directly Guzzle's fault (obviously GAE is quite particular) - although I think there is an opportunity for Guzzle to make it through intact when running in this environment.\r\n\r\nSo far, the issues I've been encountering are related to whenever I try to access `https` URLs.  Based on my limited research, Guzzle has 3 ways of running on GAE:\r\n\r\n - Via cURL lite\r\n - [Via a custom built GAE `curl.so`](https://code.google.com/p/googleappengine/issues/detail?id=9343#c41) [(related SO question)](http://stackoverflow.com/questions/31631596/curl-error-7-during-guzzle-request-on-google-app-engine) [(related ticket)](https://code.google.com/p/googleappengine/issues/detail?id=12178)\r\n - Via stream wrappers which leverage Google's sockets\r\n\r\nReading Google's documentation and even their early explorations into implementing cURL on PHP, their preference was clearly to have people using the sockets directly.  Many people chimed in saying that this was unrealistic given the large body of work based on cURL (ahem, guzzle!).\r\n\r\nThat all said, it would appear as though if I specify `google_app_engine.enable_curl_lite = 0` (or perhaps simply even omit it) in my `php.ini`, my runtime ends up with no cURL libaries.  Thus paving the way for guzzle to [successfully check](https://github.com/guzzle/guzzle/blob/master/src/functions.php#L111) `allow_url_fopen`.\r\nUnfortunately what I'm now running into is a problem with Guzzle expecting to find certificates.  Now, I'm not 100% certain I've got a handle on what's going on here, but perhaps it's not needed in this scenario, as per @mtdowling's [comment here](https://github.com/aws/aws-sdk-php/issues/427#issuecomment-66229548)?\r\n\r\nPHP is now fully supported on app engine and although it has peculiarities, it's a fairly appealing PaaS solution.  It would stand to reason that Guzzle will find itself in this environment [with increasing frequency](https://code.google.com/p/googleappengine/issues/list?q=CURL+php).\r\nTo that end, it's my hope that any fix made here will be backported as far back as is reasonable to expect so that all libraries that depend on Guzzle will be able to start working with HTTPS URLs on GAE.\r\n\r\nThanks for reading, hopefully I've been comprehensive enough! ;)"},"comment":{"url":"https://api.github.com/repos/guzzle/guzzle/issues/comments/126409539","html_url":"https://github.com/guzzle/guzzle/issues/1191#issuecomment-126409539","issue_url":"https://api.github.com/repos/guzzle/guzzle/issues/1191","id":126409539,"user":{"login":"atrauzzi","id":115199,"avatar_url":"https://avatars.githubusercontent.com/u/115199?v=3","gravatar_id":"","url":"https://api.github.com/users/atrauzzi","html_url":"https://github.com/atrauzzi","followers_url":"https://api.github.com/users/atrauzzi/followers","following_url":"https://api.github.com/users/atrauzzi/following{/other_user}","gists_url":"https://api.github.com/users/atrauzzi/gists{/gist_id}","starred_url":"https://api.github.com/users/atrauzzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atrauzzi/subscriptions","organizations_url":"https://api.github.com/users/atrauzzi/orgs","repos_url":"https://api.github.com/users/atrauzzi/repos","events_url":"https://api.github.com/users/atrauzzi/events{/privacy}","received_events_url":"https://api.github.com/users/atrauzzi/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T17:23:29Z","updated_at":"2015-07-30T17:23:29Z","body":"I'm not sure what the story is for custom CA bundles unfortunately.  If you're interested, feel free to jump in on that ticket with questions.  Also, you can use GAE free without supplying billing information, they only start to charge you when you require storage or VMs.\r\n\r\nThe _if_ statement I'm thinking of would be to just detect if specific GAE classes exist.  There's a Google App Engine support library for Laravel 5 that has a [nice example](https://github.com/shpasser/GaeSupportL5/blob/master/src/Shpasser/GaeSupportL5/Foundation/Application.php#L121) where it does this.\r\n\r\nThen you'd just have to combine that with whether you were using guzzle with stream wrapper support and sidestep loading any certificates."}}