sethd.org
this is not the blog you're looking for

Resume
LinkedIn

RECENT ENTRIES

Interesting Modules 2010-07-30
Recent Interesting Talks
Book Blogging: Bloodbrothers
Book Blogging: Fires of Freedom
Duck Duck Go
Yes, Yes, Yes
About That Lack of Blogging
Using A Smart Phone
Taking the Smart Phone Plunge (Maybe)
Book Blogging: Nemesis
Perl Not Going Away
OpenX Is Hiring Perl Developers
Perl Jobs vs Perl Programmers
Free Chapter From Effective Perl Programming
Perl On Android Progressing
Book Blogging: The Mote In God's Eye
Perldoc Is Important
The Second Age of Perl
A Description of Perl 5.12
Interesting Modules 2010-04-18
The Moral of This Story
Perl 5.12 Has Been Released
Packaging and Maintaining An Alternate Perl
Perl Moving Up?
Building Dependencies Like Make
Introduction To Plack
Defining Standard Testing Methodologies
Subversion Vision Released
Interesting Modules 2010-04-01
Perl Is Thriving
Interesting Modules 2010-03-29
Assign to $0
The Looming Google AdWords Perl Problem: Followup
Subversion Vision
Interesting Modules 2010-03-26
Interesting Modules 2010-03-25
The iPhone and Perl
Perl Is Dying
Setting Up A Windows Computer: Part 3
Trouble Hiring Perl Developers
Back From San Diego 2010
Interesting Modules 2010-03-17
Remember To Use parent Instead of Base
Using Test::Class
Jan 24, 2010

Subversion Proxy Fix

This is a duplication of a blog post I made in 2005 on a different blog.

When receiving an error like 502 Bad Gateway from Apache.

A small mod_perl2 module I wrote to fix a problem when proxying a Subversion server. Specifically, if you have a Subversion server on a private/local network and a reverse proxy on a public network, and a user connects to the reverse proxy via HTTPS and the reverse proxy connects to the Subversion server via HTTP. This causes problems with the COPY and MOVE HTTP methods. This is because mod_dav sends a Destination header with the wrong scheme. Your reverse proxy will not rewrite the path scheme properly (i.e. it will not change HTTPS to HTTP). The following code rewrites the scheme properly.

Here is the mailing list thread that started it all.

The code is named ProxyDav.pm and is valid for any mod_perl2 installation with a version greater than 1.999022.

The Apache configuration is simple:

    <Location /svn>
      SetHandler               perl-script
      PerlHeaderParserHandler  ProxyDav
    </Location>
    
The ProxyDav.pm file should be located somewhere in your Perl's @INC. You can use perl -V to view the contents of @INC.

Tags: , .
[p] Posted @ 21:39 by Seth


This site uses the very simple and easy to use blosxom blogging software.


Advanced Search

OTHER SITES