[tor-bugs] #25590 [Internal Services/Tor Sysadmin Team]: Add a configuration line to the consensus-health Apache config

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Mar 22 15:40:49 UTC 2018


#25590: Add a configuration line to the consensus-health Apache config
-----------------------------------------------------+--------------------
     Reporter:  tom                                  |      Owner:  tpa
         Type:  defect                               |     Status:  new
     Priority:  Medium                               |  Milestone:
    Component:  Internal Services/Tor Sysadmin Team  |    Version:
     Severity:  Normal                               |   Keywords:
Actual Points:                                       |  Parent ID:  #25588
       Points:                                       |   Reviewer:
      Sponsor:                                       |
-----------------------------------------------------+--------------------
 >  SetEnvIf X-Requested-With XMLHttpRequest no-gzip

 #25588 is a feature to allow users to load individual relay details on the
 index page; without having to load the entire detailed page. It uses Range
 requests.

 consensus-health.torproject.org currently supports Range requests, so no
 configuration needed for that:

 > curl -H "Range: bytes=0-100" -H "X-Requested-With: XMLHttpRequest" https
 ://consensus-health.torproject.org

 But using compression in conjunction with Range requests confuses Apache.
 (Should the Range be before the compression, or after? Apparently it's
 never been decided.)

 So for AJAX requests we need to disable compression. The only thing making
 AJAX requests to consensus-health is my new feature so we're not going to
 be sending a ton of data uncompressed.

 Once the configuration is correct, the following two commands will have
 the same output:

 > curl -H "Range: bytes=0-100" -H "X-Requested-With: XMLHttpRequest" https
 ://consensus-health.torproject.org
 > curl -H "Range: bytes=0-100" -H "X-Requested-With: XMLHttpRequest" https
 ://consensus-health.torproject.org --compressed

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25590>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list