microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
7.91k stars 1.64k forks source link

Client header spaces inconsistent #1721

Open 2stein57 opened 1 year ago

2stein57 commented 1 year ago

Example header generated by cpprest:

Host: 10.32.8.51
Content-Length:130
Content-Type:application/json
User-Agent:cpprestsdk/2.10.18
Authorization: Basic YWRtaW46cGFzcw==
Connection: Keep-Alive

For some header values, there is a space, for others, not.

Having no space is allowed by the RFCs, but is definitely not common practice. Some older webserver just don't support it. I suggest using spaces all the time for highest compatibility.