diff options
-rw-r--r-- | bugzillaBugTriage.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js index c2a7094..f2252fc 100644 --- a/bugzillaBugTriage.js +++ b/bugzillaBugTriage.js @@ -486,6 +486,7 @@ BzPage.prototype.serializeForm = function (form) { acceptCharset: form.acceptCharset, action: form.action, // TODO shouldn't we get a non-relative URL? enctype: form.enctype, + cookie: this.dok.cookie, autocomplete: form.getAttribute("autocomplete"), bugNo: this.bugNo }; @@ -535,6 +536,8 @@ BzPage.prototype.serializeForm = function (form) { BzPage.prototype.submitCallback = function(evt) { if (jetpack.__parent__.navigator.onLine) { + var serForm = this.serializeForm(this.dok.forms.namedItem("changeform")); + console.log("serForm:\n"+serForm.toSource()); options.oldSubmit(); } else { var serForm = this.serializeForm(this.dok.forms.namedItem("changeform")); @@ -568,6 +571,16 @@ function onlineCallback() { var bugID = formData.bugNo; var req = new XMLHttpRequest(); req.open("POST",formData.action,true); + // FIXME co očekávám za odpověď? req.overrideMimeType("text/xml"); + // * Accept-Encoding + // * Accept-Language + // * Accept (MIME types) + req.setRequestHeader("Connection","keep-alive"); + req.setRequestHeader("Keep-Alive",300); + req.setRequestHeader("Content-Type",formData.enctype); + req.setRequestHeader("Referer",bugURL+bugID); + req.setRequestHeader("Accept-Charset",formData.acceptCharset); + req.setRequestHeader("Cookie",formData.cookie) req.onreadystatechange = function (aEvt) { if (req.readyState == 4) { if (req.status == 200) { |