https_client example why is Connection: close required?

I am working through the https_client example with the nRF9160 and I noticed that when Connection: close is not included, the connection doesn't close, but if I attempt to replicate the request in Postman, there is no such line and it still completes with a 200 status.

#define HTTP_HEAD                                                              \
    "HEAD / HTTP/1.1\r\n"                                                   \
    "Host: " HTTPS_HOSTNAME "\r\n"                                      \
    "Accept: */*\r\n"                                                       \
    "Connection: close\r\n\r\n"                                                

I have also noticed that in the Host line in the https_client example it includes the port, but I try to do the same in Postman the server sends an error message such as a 400 error or resets the connection in the case of example.com. What is different about the HTTP request that the nRF9160 is sending compared to my browser or Postman?

Parents Reply Children
No Data
Related