FTP push failure...

Magnus Therning magnus at therning.org
Sun Dec 4 21:42:01 GMT 2005


On Sat, Dec 03, 2005 at 11:51:42AM -0600, John A Meinel wrote:
>Magnus Therning wrote:
>> On Fri, Dec 02, 2005 at 08:30:22AM -0600, John A Meinel wrote:
>> 
>> The error I get is:
>> 
>>  % bzr branch http://therning.org/magnus_bzr/epilicious
>>  bzr: ERROR: HTTP Error 406: Not Acceptable
>>    command: '/home/magnus/bin/bzr' 'branch' 'http://therning.org/magnus_bzr/epilicious'
>>        pwd: u'/home/magnus/prog/tmp'
>>      error: urllib2.HTTPError
>>    at /usr/lib/python2.4/urllib2.py line 480, in http_error_default()
>>    see ~/.bzr.log for debug information
>> 
>> Any pointers on how to resolve it?
>
>This is the file it is requesting:
>http://www.therning.org/magnus_bzr/epilicious/.bzr/revision-store/c4/Arch-x%3Amagnus%40therning.org--epilicious%25epilicious--main--0--base-0
>
>If I go to that URL with Firefox, I get the same 406 error from the web
>server.
>
>Obviously this is a branch which has been converted from an Arch
>archive. But I don't know why the webserver can't just try and export it
>as an octet stream, or as a text file.
>
>Perhaps you need to look at your mime_magic settings.
>This is how mine is set up (these are spread out throughout the file,
>but I put them together for helpfulness)
>
>LoadModule mime_magic_module modules/mod_mime_magic.so
>TypesConfig /etc/mime.types
>DefaultType text/plain
><IfModule mod_mime_magic.c>
>    MIMEMagicFile conf/magic
></IfModule>

Just thought I should report that I've solved the problem. It was indeed
an Apache configuration issue.

Apparently the administrators are using mod_security[1] and it's quite
aggressively configured. The problem was the percentage signs in the
filenames. By sticking a .htaccess in the top dir containing the
following lines:

 
 <IfModule mod_security.c>
   SecFilterEngine Off
   SecFilterScanPOST Off
 </IfModule>

I turned off mod_security. Now bzr can access all the files properly :-)

/M

1. http://www.modsecurity.org/

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
magnus at therning.org
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

Time is a great teacher, but unfortunately it kills all its pupils.
     -- Hector Louis Berlioz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051204/6c85c064/attachment.pgp 


More information about the bazaar mailing list