Introduction

CorteX has used an HTTP 1.0 webserver when handling inbound requests. One feature of this server is the absence of checking whether or not the request contains a Content-Length HTTP Header. Normally when an HTTP request contains a body (ie, PUT, POST) and the request does not have a Content-Length header, a "411 Length-Required" HTTP error response is returned.

Orchestrator Requires Content-Length Header

Orchestrator utilizes an HTTP 1.1 webserver to handle the inbound CorteX requests. Checking for a Content-Length header and returning a 411 HTTP error response, where appropriate, is enabled in this server. Therefore, starting with Orchestrator in 2.5.0, we require a Content-Length header for all inbound CorteX requests that contain a body. For example, if you submit a PUT or POST command, you should include an HTTP Content-Length header.

Example

Virtually all tools that automate a coded interface for RESTful communications will generate the Content-Length header. If you use a scripting mechanism that doesn't happen to, or If you are going to create a new volume with the POST request using Fiddler, you would need to add the following in the Header:

Content-Length: [message_length]

 

For the URI:   POST  http://ip_add/storage/volumes

And a message of “name=AppData_2&size=8”

You would add the HTTP Header to your request:

Content-Length: 21, since “name=AppData_2&size=8” is 21 characters long.

 

Here is a small screenshot of the Fiddler screen showing this: