Ole Christian Eidheim

Results 316 comments of Ole Christian Eidheim

Since I do not use Windows, I cannot help with compiling openssl/boost on Windows sorry.

The problem might be that you call `request->content.string()` several times, since the `string()` call consumes the content stream (meaning the second time you call `request->content.string()` it will return an empty...

Also, the output does not correspond with the code. Could you try reformulate your issue with a more simple code example where your problem arises (with corresponding output)?

Does this issue help you: #29 ?

What is the signature of query_thread?

I could not see anything wrong after a quick look, but making a copy of the `response` shared_ptr should work fine. I'll have another look Tomorrow if you have not...

Ah, the problem seems to be that the Res shared_ptr is kept alive too long. The response is sent when the shared_ptr is destructed, and it seems like your Res...

In that case, you need to use Response::send to send the data you have added to the response stream to the client. See https://github.com/eidheim/Simple-Web-Server/blob/master/http_examples.cpp#L183 for an example.

Sadly that would be too inefficient. The data is sent when Response::send is called, or when the Response object within the shared_ptr is destroyed.

The purpose of shared_ptr's is typically to extend the lifetime of an object. When you pass the shared_ptr to query_thread, the shared_ptr is copied and thus the object's lifetime is...