tor2web / Tor2web

Tor2web is an HTTP proxy software that enables access to Tor Hidden Services by mean of common web browsers
https://www.tor2web.org
GNU Affero General Public License v3.0
705 stars 176 forks source link

bugfix in regex 'w2t' #214

Closed virgil closed 9 years ago

virgil commented 9 years ago

Had an issue with request header "Referer: http://xxxxx.onion.city/path/to/file.html" not being properly replaced to be '.onion' URLs. This change to w2t fixes that. The w2t regex is only used in one place, and you can verify that it gives the correct behavior.

Then rewrote the t2w regex slightly to make it match the w2t regex. Can also verify it does the right thing.

Finally a tweak on ctype's assignment to be prettier.