Commit graph

6 commits

Author SHA1 Message Date
joshua stein 09a92040ed Sponge: bring in monkeypatch to override SSL hostname
We force a connection to a pre-resolved IP to avoid being tricked
into connecting to a local host, but hosts that use SNI need the
hostname in the SSL negotiation instead of an IP.

Fixes the problem with CloudFlare blocking requests to medium.com,
which prevented the URL canonicalization code from being run when a
medium URL was submitted, which prevented us from stripping off
those stupid referral codes medium attaches to URLs (which could
be stripped out in Story#url= but medium allows custom domains, so
that wouldn't work for things like m.signalvnoise.com).

Code from Pushover.
2016-01-21 11:59:06 -06:00
joshua stein 6174573fbe Sponge: keep user-supplied headers separate
when doing redirections, continue with the user-supplied headers,
not the ones we've been accumulating

fixes the problem of sending the wrong Host header to a redirection
2014-07-02 09:58:52 -05:00
joshua stein 4c0aaf7c2e fix story caching stuff once and for all 2014-03-24 10:26:07 -05:00
joshua stein d0459974cd so long whitespace 2013-02-13 18:50:51 -06:00
joshua stein 062fe6c2a3 reject ipv6 addresses for now 2012-08-24 11:41:34 -05:00
joshua stein 093747b796 initial work on conversion from php tree 2012-06-16 20:15:46 -05:00