Questions tagged [header]

This tag is deprecated because it lacks discriminating power. Please use a more specific tag instead, e.g.: html-heading, email-header etc.

This tag is deprecated because it lacks discriminating power. Please use a more specific tag instead, e.g.: , etc.

13526 questions
109
votes
5 answers

How to add an Access-Control-Allow-Origin header

I am designing a website (e.g. mywebsite.example) and this site loads font-face fonts from another site (say anothersite.example). I was having problems with the font face font loading in Firefox and I read on this blog: Firefox (which supports…
Mazatec
  • 11,481
  • 23
  • 72
  • 108
108
votes
4 answers

Removing newline after

tags?

I am having a problem with removing linebreaks after the

tag, as everytime it prints, it adds a line break straight after it, so something like

Hello World!

Hello Again World!

prints out like this: Hello World! Hello Again…
Jack Wilsdon
  • 6,706
  • 11
  • 44
  • 87

106
votes
4 answers

Add custom header in HttpWebRequest

I need to add some custom headers to the HttpWebRequest object. How can I add Custom Header to HttpWebRequest object in Windows Phone 7.
Nelson T Joseph
  • 2,683
  • 8
  • 39
  • 56
106
votes
6 answers

Define constant variables in C++ header

A program I am working on has many constants that apply throughout all classes. I want to make one header file "Constants.h", and be able to declare all the relevant constants. Then in my other classes, I can just include #include "Constants.h. I…
user1599559
102
votes
4 answers

How do I set HTTP headers using Python's urllib?

I am pretty new to Python's urllib. What I need to do is set a custom HTTP header for the request being sent to the server. Specifically, I need to set the Content-Type and Authorization HTTP headers. I have looked into the Python documentation,…
ewok
  • 20,148
  • 51
  • 149
  • 254
102
votes
20 answers

How should I detect unnecessary #include files in a large C++ project?

I am working on a large C++ project in Visual Studio 2008, and there are a lot of files with unnecessary #include directives. Sometimes the #includes are just artifacts and everything will compile fine with them removed, and in other cases classes…
shambolic
  • 1,023
  • 2
  • 9
  • 5
101
votes
11 answers

iOS - 'MyProject-Swift.h' file not found when running Unit Tests for Swift

I am trying to setup Unit Testing for my project. It is an existing Objective-C app, that I have recently added one Swift class to. I have setup the 'MyProject-Swift.h' and Swift Bridging files (both 'MyProject' and 'MyProjectTest') and I am able to…
JimmyJammed
  • 9,598
  • 19
  • 79
  • 146
100
votes
6 answers

html5: using header or footer tag twice?

quick question: is it actually allowed to use the header tag twice? e.g. i have two important head-sections in my header.php where both could have header tag?
matt
  • 42,713
  • 103
  • 264
  • 397
99
votes
2 answers

Difference between and

I noticed that there was (at least on Mac OS X) both a header and a header. man 3 string reveals that they contain different functions. Is there any reason for this?
icktoofay
  • 126,289
  • 21
  • 250
  • 231
99
votes
5 answers

Show Curl POST Request Headers? Is there a way to do this?

I'm building a Curl web automation app and am having some issue with not getting the desired outcome of my POST action, I am having some trouble figuring out how I can show the full POST request I am sending over (with headers), I have been…
Rick
  • 16,612
  • 34
  • 110
  • 163
99
votes
9 answers

How can I have a Makefile automatically rebuild source files that include a modified header file? (In C/C++)

I have the following makefile that I use to build a program (a kernel, actually) that I'm working on. Its from scratch and I'm learning about the process, so its not perfect, but I think its powerful enough at this point for my level of experience…
Blank
  • 7,088
  • 12
  • 49
  • 69
99
votes
9 answers

static variables in an inlined function

I have a function that is declared and defined in a header file. This is a problem all by itself. When that function is not inlined, every translation unit that uses that header gets a copy of the function, and when they are linked together there…
Dirk Groeneveld
  • 2,547
  • 2
  • 22
  • 23
98
votes
1 answer

Including #includes in header file vs source file

I like to put all my #includes in my header file then only include my header for that source file in my source file. What is the industry standard? Are there any draw backs to my method?
Rob from Utah
  • 981
  • 1
  • 7
  • 3
97
votes
12 answers

Tool for adding license headers to source files?

I'm looking for a tool that will, in bulk, add a license header to some source files, some of which already have the header. Is there a tool out there that will insert a header, if it is not already present? Edit: I am intentionally not marking an…
Alex Lyman
  • 15,637
  • 3
  • 38
  • 42
96
votes
11 answers

Authorization header missing in PHP POST request

I'm currently trying to read the authorization header in a PHP script that I'm calling with a POST request. The Authorization header is populated with a token. It seems the Authorization header is somehow removed before it arrives at my PHP script.…
jimmy
  • 4,471
  • 3
  • 22
  • 28