With trying with DOM inspector in firefox I found out that changing the action attribute of the form element solves the problem: remove "&action=foo". I don't know why, but it works.
before: "path/to/forum/profile.php?section=admin&id=35&action=foo"
after: "path/to/forum/profile.php?section=admin&id=35"
implementation in Greasemonkey:
// ==UserScript==
// @name solve 406 error on punbb
// @namespace personal
// @description deletes "action=foo"
// @include path/to/forum/profile.php?section=admin*
// ==/UserScript==
(function() {
//remove "&action=foo"
var form = document.getElementById('profile7');
if (form){
form.action = form.action.replace("&action=foo", "");
}
})();