Comment 21 for bug 607961

Revision history for this message
Gary Poster (gary) wrote :

I have most of this working; it looks like, with some tweaks, what I proposed will do the job.

Apparently there's a misspelled wadl type we also need to support because old launchpadlibs sent it.

application/vd.sun.wadl+xml

I've tried what appears to be a relatively elegant solution to try and have Apache change the Accept string before it tries to find the correct representation (a variant of example 4 from http://httpd.apache.org/docs/2.0/mod/mod_headers.html):

    SetEnvIf Accept \Qapplication/vd.sun.wadl+xml\E MISSPELLED_WADL_ACCEPT_HEADER
    RequestHeader set Accept "application/vnd.sun.wadl+xml" env=MISSPELLED_WADL_ACCEPT_HEADER

This does not work.

I'm inclined now to add a separate mime type for the misspelling, mapping it to an extension to "brokenwadl" (apache won't work properly with different mimetypes pointing to the same extension, in my experiments) and making an index.brokenwadl symlink. That works fine, though it is more kludgy than I wanted. I'm going to present the approach to the losas, now that I have something that works, and see what they have to say.