lwjwillemsen wrote:We are using the http-plugin to post new solutions (through admin page) into Servoy Application Server.
That works fine in Servoy 5 and Servoy 7.4.4
In 7.4.5 this is broken (Tomcat upgrade ?).
We use this code :
// _solution is file-object
var _client = plugins.http.createNewHttpClient()
_client.setTimeout(0)
_poster = _client.createPostRequest(_url)
_poster.addFile('if', 'file', _solution.getAbsolutePath())
_poster.addParameter('ac','on') // Activate new release of imported solution and modules
// and more parameters
var _response = _poster.executeRequest(_admin_user, _admin_password) // _httpCode 200 is ok
The executeRequest returns immediately and _response has no value.
Strange thing is that smaller solution files import just fine!
Help!
We found out that this issue is related to the tomcat upgrade.
In Servoy 8 (yet another Tomcat version) this issue does not occur.
As a workaround, you can set the Authorization header before executing the POST:
- Code: Select all
poster.addHeader('Authorization', 'Basic ' + encodeBase64(user + ':'+password));
With helper function encodeBase64() as shown By Robert Ivens in
viewtopic.php?f=22&t=21288Rob