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
95
votes
6 answers

What does a zlib header look like?

In my project I need to know what a zlib header looks like. I've heard it's rather simple but I cannot find any description of the zlib header. For example, does it contain a magic number?
unixman83
  • 9,421
  • 10
  • 68
  • 102
94
votes
2 answers

How to configure sqlite to display headers by default

Is there any way to configure sqlite3 so that the headers will display by default? I know I can use .headers on to turn on headers, but I have to keep typing it every time I launch the client because the setting doesn't stick between sessions. I…
spemmo
  • 943
  • 1
  • 6
  • 4
93
votes
5 answers

HTTP Range header

I was reading http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35 and trying to figure out how to continue a file download. For example, suppose a file is of length 100 bytes and I have all the 100 bytes. However, I don't know what the…
dhruvbird
  • 6,061
  • 6
  • 34
  • 39
93
votes
7 answers

correct PHP headers for pdf file download

I'm really struggling to get my application to open a pdf when the user clicks on a link. So far the anchor tag redirects to a page which sends headers that are: $filename='./pdf/jobs/pdffile.pdf; $url_download = BASE_URL . RELATIVE_PATH .…
useyourillusiontoo
  • 1,287
  • 1
  • 10
  • 24
92
votes
8 answers

What is the difference between a .cpp file and a .h file?

Because I've made .cpp files and then transferred them into .h files, the only difference I can find is that you can't #include .cpp files. Is there any difference that I am missing?
user98188
92
votes
18 answers

Xcode 4 can't locate public header files from static library dependency

Alternate titles to aid search Xcode can't find header Missing .h in Xcode Xcode .h file not found lexical or preprocessor issue file not found I'm working on an iOS application project which came from Xcode 3. I have now moved to Xcode 4 my…
Richard Stelling
  • 25,607
  • 27
  • 108
  • 188
86
votes
11 answers

Why has it failed to load main-class manifest attribute from a JAR file?

I have created a JAR file in this way jar cf jar-file input-files. Now, I'm trying to run it. Running it does not work (jre command is not found): jre -cp app.jar MainClass This does not work either: java -jar main.jar (Failed to load Main-Class…
Roman
  • 124,451
  • 167
  • 349
  • 456
85
votes
4 answers

Warning: Cannot modify header information - headers already sent by ERROR

I've been struggling with this error for a while now. To start with, I just thought it was white space, but after further research I think it might be a problem similar to this: Look for any statements that could send output to the user before this…
Rob
  • 1,479
  • 5
  • 18
  • 24
85
votes
11 answers

Emulate a 403 error page

I know you can send a header that tells the browser this page is forbidden like: header('HTTP/1.0 403 Forbidden'); But how can I also display the custom error page that has been created on the server for this type of error? By default, just sending…
NightHawk
  • 3,633
  • 8
  • 37
  • 56
83
votes
4 answers

cmath vs math.h (And similar c-prefixed vs .h extension headers)

I've seen some information about differences between things like iostream vs iostream.h. From what I gathered from those the difference between them is that the version without the .h extension will not populate the namespace while the version with…
golmschenk
  • 11,736
  • 20
  • 78
  • 137
80
votes
15 answers

PHP header(Location: ...): Force URL change in address bar

I'm currently working on a mobile site with authentication using PHP sessions with a database. I have a login page with a form that goes to server_login.php on submit. The php file then creates some session data (store in $_SESSION), and redirects…
vemoxy
  • 1,015
  • 1
  • 8
  • 9
80
votes
16 answers

GridView - Show headers on empty data source

In C# how do I still show the headers of a gridview, even with the data source is empty. I am not auto generating the columns as they are all predefined. Currently what I am doing is the following. Get a DataTable back from a stored procedure,…
Joshua Hudson
  • 2,187
  • 2
  • 20
  • 24
80
votes
5 answers

Variable declaration in a header file

In case I have a variable that may be used in several sources - is it a good practice to declare it in a header? or is it better to declare it in a .c file and use extern in other files?
Ori Popowski
  • 10,432
  • 15
  • 57
  • 79
77
votes
1 answer

What is the difference between HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR?

I understand that a header HTTP_X_FORWARDED_FOR is set by proxy servers to identify the ip-address of the host that is making the HTTP request through the proxy. I've heard claims that the header HTTP_CLIENT_IP is set for similar purposes. What is…
Ethan Heilman
  • 16,347
  • 11
  • 61
  • 88
77
votes
6 answers

Cannot properly set the Accept HTTP header with jQuery

I'm trying to set the Accept HTTP header to "text/xml" with this jquery code: $.ajax({ beforeSend: function(req) { req.setRequestHeader("Accept", "text/xml"); }, type: "GET", url: "[proper url]", contentType: "text/plain;…
None