Comments (4)
(sorry if you already saw this, but just going to specifically ping you in case you weren't expecting anyone else to submit issues)
from advocate.
Thanks for the ping @Deimos, I took a look at the code and looks like I made a copy/paste error. When we wrap the head
method in RequestsAPIWrapper
we're currently doing:
self.options = self._default_arg_wrapper(options)
self.head = self._default_arg_wrapper(options) # wrapping options instead of `head`!
self.post = self._default_arg_wrapper(post)
I'm guessing you're getting Insufficient information. Origin request header needed.
because S3 assumes that all OPTIONS
requests are for CORS preflights and is confused when it doesn't see the Origin
header.
I'll patch this and push an update to PyPI this afternoon.
from advocate.
Yep, that'd definitely do it (and would explain why I was getting strange CORS-ish-sounding errors when I tried manually adding an Origin
header to see what would happen).
from advocate.
This is fixed in 0.6.2 on PyPI:
In [1]: import advocate
In [2]: advocate.__version__
Out[2]: '0.6.2'
In [3]: wrapper = advocate.RequestsAPIWrapper(advocate.AddrValidator())
In [4]: wrapper.head('https://b.thumbs.redditmedia.com/6hn7cHXUEXSYh8K5ga-LCeHWBpPADv6cS6-34ty2RuE.jpg')
Out[4]: <Response [200]>
from advocate.
Related Issues (18)
- Tests are broken with `setup.py test`
- got exception HOT 2
- New release? HOT 5
- http://0177.0.0.1/ works when it shouldn't HOT 5
- Make netifaces dependency optional HOT 8
- Add support for user-defined DNS64 prefixes
- Rip out Python 2.x support
- type hints HOT 2
- Upload sdist and wheel to PyPI in CI on release creation
- Python versions
- hostname tests are skipped due to incorrect type of `canonname`
- Is advocate dead? Are there alternatives? HOT 1
- What should be done about IPv6? HOT 1
- Tests broken with requests 2.9.1
- Refactor requests compatibility tests to work with new requests versions
- Advocate stops working with requests HOT 10
- Unvendor ipaddress module
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advocate.