login about faq

In a current C++ project I am uploading requests to a web server using CkHttp::SynchronousRequest method. While debugging delays in my upload method, I noticed that SynchronousRequest expects a body content in the response. This was while using POST.

The problem was that I sent a 204 (No content) from the web server, since there was nothing to send back, except from an acknowledgement of properly received POST.

The moment I switched to returning a 200 OK response, SynchronousRequest no longer had any delay.

Since I have already decided upon a workaround, I am not really looking for an answer, but I would like to debate this behavior.

Is it simply my understanding of the HTTP protocol that has gaps in it, and that POSTs should always expect a content response of some sort, or it SynchronousRequest that should be modified to check the response status code immediately and not wait for the response content?

asked Nov 13 '12 at 11:08

roan98dk's gravatar image


I'd like to try to provide a fix. What operating system do you use? If Windows, what version of VC++?


answered Nov 13 '12 at 18:22

chilkat's gravatar image

chilkat ♦♦

Windows 7 x64 and VC++ 11 (for win32 environment).

(Nov 14 '12 at 06:20) roan98dk

I made the fix, but unfortunately I can't have a VC++ 11 build for a few weeks. I can provide a VC++ 10 build...

(Nov 14 '12 at 10:47) chilkat ♦♦

Thanks, I will wait for the VC++ 11 build. I anyhow decided to use the workaround for now, by only returning HTTP status 200 OK. But since I will not release my project for at least a few weeks, I may change it to 204 NO CONTENT in the next build. When is 9.4.0 due?

(Nov 14 '12 at 10:52) roan98dk


(Nov 14 '12 at 10:58) chilkat ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Nov 13 '12 at 11:08

Seen: 2,428 times

Last updated: Nov 14 '12 at 10:58

powered by OSQA