{"action":"created","issue":{"url":"https://api.github.com/repos/obspy/obspy/issues/1143","labels_url":"https://api.github.com/repos/obspy/obspy/issues/1143/labels{/name}","comments_url":"https://api.github.com/repos/obspy/obspy/issues/1143/comments","events_url":"https://api.github.com/repos/obspy/obspy/issues/1143/events","html_url":"https://github.com/obspy/obspy/pull/1143","id":111248731,"number":1143,"title":"HTTP redirects are not followed by obspy.fdsn.get_waveforms_bulk()","user":{"login":"CTrabant","id":446143,"avatar_url":"https://avatars.githubusercontent.com/u/446143?v=3","gravatar_id":"","url":"https://api.github.com/users/CTrabant","html_url":"https://github.com/CTrabant","followers_url":"https://api.github.com/users/CTrabant/followers","following_url":"https://api.github.com/users/CTrabant/following{/other_user}","gists_url":"https://api.github.com/users/CTrabant/gists{/gist_id}","starred_url":"https://api.github.com/users/CTrabant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CTrabant/subscriptions","organizations_url":"https://api.github.com/users/CTrabant/orgs","repos_url":"https://api.github.com/users/CTrabant/repos","events_url":"https://api.github.com/users/CTrabant/events{/privacy}","received_events_url":"https://api.github.com/users/CTrabant/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/obspy/obspy/labels/.fdsn","name":".fdsn","color":"0b02e1"}],"state":"open","locked":false,"assignee":{"login":"krischer","id":800487,"avatar_url":"https://avatars.githubusercontent.com/u/800487?v=3","gravatar_id":"","url":"https://api.github.com/users/krischer","html_url":"https://github.com/krischer","followers_url":"https://api.github.com/users/krischer/followers","following_url":"https://api.github.com/users/krischer/following{/other_user}","gists_url":"https://api.github.com/users/krischer/gists{/gist_id}","starred_url":"https://api.github.com/users/krischer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krischer/subscriptions","organizations_url":"https://api.github.com/users/krischer/orgs","repos_url":"https://api.github.com/users/krischer/repos","events_url":"https://api.github.com/users/krischer/events{/privacy}","received_events_url":"https://api.github.com/users/krischer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/obspy/obspy/milestones/9","html_url":"https://github.com/obspy/obspy/milestones/0.10.x","labels_url":"https://api.github.com/repos/obspy/obspy/milestones/9/labels","id":1031268,"number":9,"title":"0.10.x","description":"Bugs to be addressed in the \"releases\" branch.","creator":{"login":"QuLogic","id":302469,"avatar_url":"https://avatars.githubusercontent.com/u/302469?v=3","gravatar_id":"","url":"https://api.github.com/users/QuLogic","html_url":"https://github.com/QuLogic","followers_url":"https://api.github.com/users/QuLogic/followers","following_url":"https://api.github.com/users/QuLogic/following{/other_user}","gists_url":"https://api.github.com/users/QuLogic/gists{/gist_id}","starred_url":"https://api.github.com/users/QuLogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuLogic/subscriptions","organizations_url":"https://api.github.com/users/QuLogic/orgs","repos_url":"https://api.github.com/users/QuLogic/repos","events_url":"https://api.github.com/users/QuLogic/events{/privacy}","received_events_url":"https://api.github.com/users/QuLogic/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":30,"state":"open","created_at":"2015-03-20T15:52:27Z","updated_at":"2015-11-17T18:52:32Z","due_on":"2015-11-10T23:00:00Z","closed_at":null},"comments":21,"created_at":"2015-10-13T19:11:22Z","updated_at":"2015-11-18T13:58:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/obspy/obspy/pulls/1143","html_url":"https://github.com/obspy/obspy/pull/1143","diff_url":"https://github.com/obspy/obspy/pull/1143.diff","patch_url":"https://github.com/obspy/obspy/pull/1143.patch"},"body":"When a get_waveforms_bulk() request receives an HTTP redirect it raises an exception and fails.  Ideally a redirect would be followed to complete the request.\r\n\r\nIn one specific case, when undergoing maintenance at our main data center the IRIS DMC redirects all service requests with an HTTP 307 (Temporary Redirect) to our auxiliary data center.  During recent maintenance when this redirect was in place I tried get_waveforms_bulk() and got this:\r\n\r\n```\r\nIn [11]: st = client.get_waveforms_bulk(bulk)\r\n---------------------------------------------------------------------------\r\nFDSNException                             Traceback (most recent call last)\r\n<ipython-input-11-f03c235fa5f9> in <module>()\r\n----> 1 st = client.get_waveforms_bulk(bulk)\r\n\r\n.../anaconda3/lib/python3.4/site-packages/obspy-0.10.2-py3.4-macosx-10.5-x86_64.egg/obspy/fdsn/client.py in get_waveforms_bulk(self, bulk, quality, minimumlength, longestonly, filename, attach_response, **kwargs)\r\n    770 \r\n    771         data_stream = self._download(url,\r\n--> 772                                      data=bulk.encode('ascii', 'strict'))\r\n    773         data_stream.seek(0, 0)\r\n    774         if filename:\r\n\r\n.../anaconda3/lib/python3.4/site-packages/obspy-0.10.2-py3.4-macosx-10.5-x86_64.egg/obspy/fdsn/client.py in _download(self, url, return_string, data)\r\n   1206         # Catch any non 200 codes.\r\n   1207         elif code != 200:\r\n-> 1208             raise FDSNException(\"Unknown HTTP code: %i\" % code)\r\n   1209         return data\r\n   1210 \r\n\r\nFDSNException: Unknown HTTP code: 307\r\n\r\nIn [12]: \r\n```\r\nFWIW, the redirection worked just fine for get_waveform() requests.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/obspy/obspy/issues/comments/157720578","html_url":"https://github.com/obspy/obspy/pull/1143#issuecomment-157720578","issue_url":"https://api.github.com/repos/obspy/obspy/issues/1143","id":157720578,"user":{"login":"megies","id":1842780,"avatar_url":"https://avatars.githubusercontent.com/u/1842780?v=3","gravatar_id":"","url":"https://api.github.com/users/megies","html_url":"https://github.com/megies","followers_url":"https://api.github.com/users/megies/followers","following_url":"https://api.github.com/users/megies/following{/other_user}","gists_url":"https://api.github.com/users/megies/gists{/gist_id}","starred_url":"https://api.github.com/users/megies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megies/subscriptions","organizations_url":"https://api.github.com/users/megies/orgs","repos_url":"https://api.github.com/users/megies/repos","events_url":"https://api.github.com/users/megies/events{/privacy}","received_events_url":"https://api.github.com/users/megies/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T13:58:54Z","updated_at":"2015-11-18T13:58:54Z","body":":+1: appveyor fail is unrelated, comes from a03403c76e46b397a0cfcdc38e"}}