Giter Site home page Giter Site logo

Comments (12)

ZuluPro avatar ZuluPro commented on May 21, 2024 2

Any news ?

from httpretty.

gabrielfalcao avatar gabrielfalcao commented on May 21, 2024 1

HTTPretty needs some TLC which I intend to work on ASAP 😬

from httpretty.

mjjohnson avatar mjjohnson commented on May 21, 2024

Yeah, I'm having the same problem (version 0.5.9). Using urllib2, the following raises HTTPError (if you trap the error and inspect it, you see a response code of 400 and the same message given above):

import urllib2
from httpretty import HTTPretty
url = 'https://www.cloudflare.com/ips'
HTTPretty.reset()
HTTPretty.enable()
response = urllib2.urlopen(url)

(I've been getting the same thing from a couple of other domains, too, so it's not specific to CloudFlare, though that error message seems to be specific to nginx.)

from httpretty.

jefftrull avatar jefftrull commented on May 21, 2024

This appears to be due to HTTPretty not implementing a proper SSL wrapper. ssl.wrap_socket is replaced by fake_wrap_socket, a no-op, when HTTPretty is enabled. It seems we must mock all HTTPS connections if HTTPretty is enabled, not just those matching our desired URIs.

from httpretty.

rouge8 avatar rouge8 commented on May 21, 2024

Has anyone come up with a workaround for this?

from httpretty.

pegler avatar pegler commented on May 21, 2024

I fixed this issue in my fork: https://github.com/pegler/httpretty I also added the ability to pass in a function to register_uri that accepts the data sent, so that it can respond to dynamically to what was sent instead of having to hardcode everything.

It was a long time ago, and I don't really remember making those changes.

from httpretty.

yardensachs avatar yardensachs commented on May 21, 2024

+1
Same problem, not sure how this issue is not a major critical bug.

from httpretty.

rosscdh avatar rosscdh commented on May 21, 2024

+1 this is fairly recent

from httpretty.

kostix avatar kostix commented on May 21, 2024

Hey, folks, please refrain from +1 or "thumbs up" or "me too" comments. Contrary to what it might appears to you, such comments are not productive and might even lead to the project owners disabling comments for the issue. We don't need this, really.

from httpretty.

rosscdh avatar rosscdh commented on May 21, 2024

@kostix sorry but this is def a way to prioritise issue priority and is quite commonly accepted.

I have managed to resolve the issue as there appears to be some conflict in the lib dependencies (as expected)..

deleted the vm and then recreate with unpinned dependencies should all resolve "nicely"

from httpretty.

yardensachs avatar yardensachs commented on May 21, 2024

Hey @rosscdh,
Do you mind sharing your fix?

from httpretty.

rosscdh avatar rosscdh commented on May 21, 2024

Hey Yarden,

Am afk atm but in brief. Reinstall brew OpenSSL and then reinstall all the
url requirements urllib3 requests requests[security] off the top of my
head..

Will send version numbers later

On Thursday, 24 March 2016, Yarden Sachs [email protected] wrote:

Hey @rosscdh https://github.com/rosscdh,
Do you mind sharing your fix?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#35 (comment)

from httpretty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.