Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

added support for more HTTP response headers #227

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

added support for more HTTP response headers #227

wants to merge 4 commits into from

Conversation

virgil
Copy link
Contributor

@virgil virgil commented Mar 9, 2015

For example, the "Link" and "X-Pingback" headers on:
http://54ogum7gwxhtgiya.onion

This patch makes those headers (and others) work as intended.

evilaliv3 and others added 4 commits February 23, 2015 01:52
this change reflects the same configuratin present in tor2web.utils.ssl and applied on globaleaks in globaleaks in relation to ticket: globaleaks/globaleaks-whistleblowing-software#1182
For example, the "Link" and "X-Pingback" headers on:
   http://54ogum7gwxhtgiya.onion

This patch makes those headers (and others) work as intended.
@virgil
Copy link
Contributor Author

virgil commented Mar 13, 2015

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling 34fede7 on virgil:patch-38 into 52c7249 on globaleaks:master.

1 similar comment
@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling 34fede7 on virgil:patch-38 into 52c7249 on globaleaks:master.

@landscape-bot
Copy link

Code Health
Repository health decreased by 11% when pulling 34fede7 on virgil:patch-38 into 24bbce7 on globaleaks:master.

@landscape-bot
Copy link

Code Health
Repository health decreased by 12% when pulling 34fede7 on virgil:patch-38 into c99a6a9 on globaleaks:master.

@landscape-bot
Copy link

Code Health
Repository health decreased by 17% when pulling 34fede7 on virgil:patch-38 into 85e0f4e on globaleaks:master.

@evilaliv3 evilaliv3 force-pushed the master branch 6 times, most recently from 40e64bd to 5605f62 Compare June 9, 2015 17:26
@evilaliv3 evilaliv3 force-pushed the master branch 8 times, most recently from aabeadf to aecb3d0 Compare December 26, 2015 21:46
@evilaliv3 evilaliv3 force-pushed the master branch 3 times, most recently from 652cb18 to d8a5096 Compare January 9, 2016 23:50
@evilaliv3 evilaliv3 force-pushed the master branch 2 times, most recently from a088782 to de732c0 Compare October 11, 2017 20:48
@evilaliv3 evilaliv3 force-pushed the master branch 3 times, most recently from 8077cf5 to c45be7f Compare May 5, 2019 12:45
@evilaliv3 evilaliv3 force-pushed the master branch 3 times, most recently from 49963c6 to 3c31643 Compare May 14, 2019 21:44
@evilaliv3 evilaliv3 force-pushed the master branch 2 times, most recently from e0678e9 to a325583 Compare June 25, 2019 15:05
@evilaliv3 evilaliv3 force-pushed the master branch 15 times, most recently from b1be310 to 501c22a Compare October 1, 2019 11:16
var xmlhttp = new XMLHttpRequest();

xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Replace ==4·&&·xmlhttp.status== with ·==·4·&&·xmlhttp.status·==·

Suggested change
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {

window.location.href = url;
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Insert ;

Suggested change
}
};

// Test if the user is using Tor and in that case
// redirects the user to provided url
try {
if (typeof(test_url) === 'undefined') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Replace (test_url)·===·'undefined' with ·test_url·===·"undefined"

Suggested change
if (typeof(test_url) === 'undefined') {
if (typeof test_url === "undefined") {

// redirects the user to provided url
try {
if (typeof(test_url) === 'undefined') {
var test_url = 'https://antani.tor2web.org/checktor';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Replace 'https://antani.tor2web.org/checktor' with "https://antani.tor2web.org/checktor"

Suggested change
var test_url = 'https://antani.tor2web.org/checktor';
var test_url = "https://antani.tor2web.org/checktor";

if (window.XMLHttpRequest) {
var xmlhttp = new XMLHttpRequest();

xmlhttp.onreadystatechange=function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Replace =function with ·=·function·

Suggested change
xmlhttp.onreadystatechange=function() {
xmlhttp.onreadystatechange = function () {

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants