fixing "build now" misbehaving
Opened this issue · 0 comments
mvk commented
NOTE: this is 2nd of 2 issues causing these bugs #86 and #73
I have noticed the code is using the call to $.getJSON()
, I looked at the request and the response resulting from the code, and compared it with the regular "build" button request and response.
I'm attaching "sanitized" good and bad requests,
Basically - good one had:
- the form data AND json urlencoded as form data
- header
Upgrade-Insecure-Requests
set to1
Accept
is limited to a list of mime typesContent-Type
is set toapplication/x-www-form-urlencoded
Bad req.:
- had no form data
- 0 content length
- weird header is set:
X-Requested-With
=XMLHttpRequest
.
IF you guys wanna mess with it:
- do not ignore job page parameters forms, try using them, it is on /build page, form element's is
parameters
- migrate from
$.getJSON()
back to "basics" of$.ajax()
and set the missing headers on the way
But maybe you can just detect and ignore parametrized jobs :)