Health monitor with login check and content length

I found SOL : myF5

It says:

To create an HTTP 1.1 post, use the following syntax:

POST /MyApp.cgi HTTP/1.1\r\nHost: host.domain.com\r\nConnection: Close\r\nContent-Length: 10\r\nAuthorization: Basic <string>\r\n\r\0123456789

In this syntax, note the following: <string> is the output from step 1

For example:

POST /MyApp.cgi HTTP/1.1\r\nHost: host.domain.com\r\nConnection: Close\r\nContent-Length: 10\r\nAuthorization: Basic ZjU6ZjVwYXNzd2Q=\r\n\r\0123456789

In these examples, your content length of 10 would match the length of your message body, which in this example is 0123456789.

You do not need to specify a user name and password in the monitor configuration when performing this workaround.

----------------

What exactly is the last message body part? Why is it required and what value do we need to use there?

Is it just some placeholder to simulate a real request?

Hello David.

It’s just an example, POST request usually includes a payload message which could be required by the server. As far as I know, POST wo/payload is perfectly RFC compliant, so it depends of your backend server.

https://stackoverflow.com/questions/4191593/is-it-considered-bad-practice-to-perform-http-post-without-entity-body

BTW, there is a mistake in the example:

“…Authorization: Basic ZjU6ZjVwYXNzd2Q=\r\n\r\n0123456789”

KR,

Dario.

Alright, thanks!