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

Resume
LinkedIn

RECENT ENTRIES

Done With Blogging
MetaCPAN
I Am Now On Twitter. World Officially Ends.
More Info About Perl 5.14
Perl 5.14 has been released
The Year of Perl 5.10
PSGI is the Limit
Magical Moose
Accessor Benchmarks
Reviewing Perl Best Practices After 7 Years
Interesting Modules 2011-03-19
Book Blogging: The Uplift War
Book Blogging: Childhood's End
Interesting Modules 2011-02-20
Perl Programming Best Practices 2011
Modern Perl Available For Free
Bloated Perl Applications
Five Test::More Features You Might Not Be Using Yet
Perl.LA
How To Identify A Good Perl Programmer
Interesting Modules 2011-01-11
Hudson's Future
Moose Ecosystem
Shaking Up Subversion Responses
Dist::Zilla Walkthrough
Mailing Lists vs. IRC
Shaking Up Subversion
Module Count Shmodule Count
Book Blogging: The Definitive Guide To Catalyst
Book Blogging: Blackout / All Clear
Interesting Modules 2010-12-04
Book Blogging: Macroscope
Upcoming Perl Books
Use A String Like A Filehandle
Moose and Build
Running the Bases...Quickly
Pennant
Interesting Modules 2010-10-16
Went to Perl Mongers Last Night
Book Blogging: The Many Deaths of the Firefly Brothers
Book Blogging: Rainbows End
Interesting Modules 2010-09-03
36th Birthday
Book Blogging: Startide Rising
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

PERL BLOGS

PERL RELATED OTHER SITES