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

Header only retrieval in php via curl

Actually I have two questions. (1) Is there any reduction in processing power or bandwidth used on remote server if I retrieve only headers as opposed to full page retrieval using php and curl? (2) Since I think, and I might be wrong, that answer to…
Krule
  • 6,468
  • 3
  • 34
  • 56
63
votes
6 answers

Upstream too big - nginx + codeigniter

I am getting this error from Nginx, but can't seem to figure it out! I am using codeigniter and am using the database for sessions. So I'm wondering how the header can ever be too big. Is there anyway to check what the header is? or potentially see…
Aram Papazian
  • 2,453
  • 6
  • 38
  • 45
62
votes
6 answers

header('HTTP/1.0 404 Not Found'); not doing anything

I have a 404.php file in my site's main directory and I was using header('Location: 404.php'); for a while until someone said that you should use header('HTTP/1.0 404 Not Found'); instead. So I replaced it with that and then added: ErrorDocument 404…
John Smith
  • 8,567
  • 13
  • 51
  • 74
62
votes
5 answers

Uses for anonymous namespaces in header files

Someone asserted on SO today that you should never use anonymous namespaces in header files. Normally this is correct, but I seem to remember once someone told me that one of the standard libraries uses anonymous namespaces in header files to…
David Norman
  • 19,396
  • 12
  • 64
  • 54
62
votes
2 answers

What is the exact difference between content-type: text/json and application/json?

What is the exact difference between Content-type: text/json Content-type: application/json I've been using them randomly and never find any output difference in both http headers?
Girish
  • 11,907
  • 3
  • 34
  • 51
62
votes
16 answers

How to fix a header on scroll

I am creating a header that once scrolled to a certain amount of pixels it fixes and stays in place. Can I do this using just css and html or do i need jquery too? I have created a demo so you can understand. Any help would be…
Paul Designer
  • 845
  • 1
  • 14
  • 21
61
votes
4 answers

Javascript Include Tag Best Practice in a Rails Application

Say I need to call a javascript file in the of an ERb template. My instinct is to do the usual: <%= javascript_include_tag :defaults %> in my application's layout. The problem of course becoming that these…
btw
  • 7,006
  • 9
  • 40
  • 40
61
votes
9 answers

Change the current working directory in C++

How can I change my current working directory in C++ in a platform-agnostic way? I found the direct.h header file, which is Windows compatible, and the unistd.h, which is UNIX/POSIX compatible.
sparkFinder
  • 3,336
  • 10
  • 42
  • 57
61
votes
4 answers

Adding system header search path to Xcode

(Posting this question for reference purpose, I'll answer immediately) How to add header search paths to Xcode? Especially when including with this syntax: include Adding path globally to all projects like system headers. Adding path…
eonil
  • 83,476
  • 81
  • 317
  • 516
61
votes
7 answers

How do I send spring csrf token from Postman rest client?

I have csrf protection in spring framework. So in each request I send csrf token in header from ajax call, which is perfectly working. var…
Surendra Jnawali
  • 3,190
  • 5
  • 28
  • 44
61
votes
7 answers

Symfony2 - Force file download

I'm trying to download a file when a user clicks on download link. In Controller: $response = new Response(); $response->headers->set('Content-type', 'application/octect-stream'); $response->headers->set('Content-Disposition',…
Xavi
  • 1,555
  • 2
  • 13
  • 15
60
votes
3 answers

Using Rspec, how do I test the JSON format of my controller in Rails 3.0.11?

I've scoured the web, but, alas, I just can't seem to get Rspec to correctly send content-type so I can test my JSON API. I'm using the RABL gem for templates, Rails 3.0.11, and Ruby 1.9.2-p180. My curl output, which works fine (should be a 401, I…
gaahrdner
  • 651
  • 1
  • 5
  • 7
60
votes
7 answers

Headers Including Each Other in C++

I'm a C++ newbie, but I wasn't able to find the answer to this (most likely trivial) question online. I am having some trouble compiling some code where two classes include each other. To begin, should my #include statements go inside or outside…
Scott
  • 2,551
  • 5
  • 25
  • 25
60
votes
13 answers

No 'Access-Control-Allow-Origin' header in Angular 2 app

For this project, I'm just learning and practicing Angular 2. I have no server-side and am making API requests to barchart ondemand api . I'm wondering if it is possible to bypass the cors issue. I'm still fairly new to all this, so baby-step…
philip yoo
  • 2,462
  • 5
  • 22
  • 37
59
votes
3 answers

How to style a WPF Expander Header?

I would like to apply a style on a WPF Expander Header. In the following XAML I have an Expander but the style is for all of it not just for the…
Vasile Tomoiaga
  • 1,727
  • 3
  • 16
  • 19