[SOLVED] content-type missing in HTTP POST, defaulting to application/octet-stream
Just upgraded QT to latest version 4.8.1 libraries on Linux Ubuntu box 10.04 from version 4.7.X.
With the new version I am receiving an error from our server.
QT provides the following warning message:
- content-type missing in HTTP POST, defaulting to application/octet-stream
Our server wont accept the posted data. This ran fine with previous release.
I am aware that the default ContentTypeHeader type needs to be explicitly set under version 4.8.
However even when adding in the setHeader code shown below, I still receive the same error.
Any ideas? Do I also need to set the contentHeader length field too or is this handled automatically.
contentHeader length is set automatically.
Sure it wouldn’t work. You set headers for request instance but don’t use this instance in post request!?
should look like this: