Questions tagged [headers]
The headers tag has no summary.
77 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
5
answers
327
views
Anti-pattern? Double header and exposed implementation detail
Consider that I've implemented SHA-256 hashing in C as incrementally updated IUF (init-update-finalize) working context and 3 subroutines. To use it in free-standing environment, or to efficiently use ...
1
vote
2
answers
5k
views
Recommended way of hiding implementation details?
I have a single *.h file. This file contains a single (more to come) function declaration.
Now the implementation of that file is very complex.
the corresponding *.cpp contains several function ...
user avatar
user315117
0
votes
1
answer
786
views
Passing set of flags from browser to backend by message header or body?
I am exploring two ways of passing certain flags representing user behaviour to the backend. When should I pass flags via headers and update routing based on header, and when is it more appropriate to ...
0
votes
1
answer
1k
views
Documenting classes with doxygen (I want a birds eye view of the code but also want documentation)
When I code in plain C there is quite a beautiful interaction between headers and c files in terms of documenting the code.
I tend to add the documentation on the cc files (and yes I am aware that ...
-1
votes
1
answer
1k
views
If you could define function by prepending `inline` in header file, why people recommend declare in header then define in a seperate .cpp file?
So as I was learning, I was told that it's bad to define function within header files, as if it's included in multiple places, it'll produce multiple copies of that function and later causes error in ...
0
votes
1
answer
98
views
What is the added value of using cache control header on top of CDN for a web application?
I'm a developer on a website which has a server which serves HTML and another server which handles API requests. I use a CDN to cache both the HTML and API responses. I feel that it gives me all the ...
0
votes
0
answers
296
views
In a microservices architecture, should each microservice handle its HTTP headers or should a proxy handle them?
In a case where having microservices deployed as containers without any orchestration tool, they need to define some HTTP response headers.
A way to achieve it is by having each microservice define ...
2
votes
1
answer
5k
views
How to separate public and private headers when internal data structures are private?
When developing a shared library in C, it is common to separate the "public" headers from the "private" headers. The public headers contain all the functions and types that are ...
7
votes
1
answer
3k
views
When to ever use separate implementation files (cpp files) in modern c++?
I started programming in C++ about 6 months ago and started off like many, structuring projects in a C like way. I split .cpp (implementation) and .hpp (header) files and used virtual classes for ...
-1
votes
1
answer
168
views
How to send a preliminary HTTP response
I have a proxy server that waits for another server to come online. A client sends a request to the proxy server - is there a way for the proxy server to send a preliminary response to the client to ...
1
vote
2
answers
238
views
Common header file for C++ and JavaScipt, redux
I've got a question closely related to this one. I'm cleaning up a colleague's mess, and I'm afraid that that means trying to work with a language -- JavaScript -- that I'm almost completely ignorant ...
1
vote
1
answer
116
views
MVP where to set Content-type header?
I'm having some problems with deciding where to set the content-type header in a vanilla mvc framework. Should i add it inside the controllers method:
class ApiController extends Controller{
...
11
votes
1
answer
13k
views
Is there any reason *not* to forward declare all forward declarable function parameter/return types?
I ran into a situation where my build speeds have started to become large and have affected productivity. I had already minimized header dependencies before using forward declarations. Now I've ...
0
votes
1
answer
2k
views
Getting file format by checking file header [closed]
I'm writing a program, part of which consists of determining if a given file is a PNG. Knowing that a file doesn't have to be named with its respective filename extension to be of a certain type, I ...
4
votes
1
answer
158
views
Should I specify my header include path in the source code, or as a project option?
Basically, I am asking, whether my code should say
#include "../libs/src/my_lib.h"
or
#include "my_lib.h"
with a complier option of
-I ../libs/src/
I feel (reasonably strongly) that the ...