Questions tagged [http-headers]

In the Hypertext Transfer Protocol (HTTP), HTTP header fields contain the operating parameters of an HTTP request or response. With the request or response line (first line of message), they form the message header.

The header fields define various characteristics of the data transfer that is requested, or the data that is provided in the message body.

Header fields start with the field name, terminated with a colon character, followed by the field value. Field names and values may be any application-specific strings, but a core set of fields is standardized by the Internet Engineering Task Force (IETF) in RFC 2616 and other updates and extension documents (e.g. RFC 4229), and are commonly understood by all compliant protocol implementations.

Many parameters may be followed by a quality or 'q' value, giving a weight to use in content negotiation. The HTTP message header is separated from the message body by a blank line.

List of HTTP Header fields

10940 questions
5
votes
3 answers

If a HTTP/1.0 client requests Connection: keep-alive, will it understand chunked encoding?

If my HTTP server gets an HTTP/1.0 request with the "Connection: keep-alive" header, is it a fair bet that the client will understand "Transfer-Encoding: chunked"? Essentially, I'm trying to decide whether to honour the "Connection: keep-alive"…
5
votes
2 answers

Adding headers to Spring controllers

I know this question is very similar to this one, but I feel its different and specific enough to warrant its own question here. I've just inherited a Java web app project from a sole developer who left no documentation behind. Its a Spring MVC app…
IAmYourFaja
  • 50,141
  • 159
  • 435
  • 728
5
votes
1 answer

Force the browser to send http request for an image

I have an app that loads images dynamically with JavaScript and draws them to a canvas. The images can change, but I also want to leverage caching, so I am using the last modified http header and sending 304 response when the image is not modified.…
lakenen
  • 2,916
  • 5
  • 24
  • 39
5
votes
3 answers

Can't seem to send 404 and Location headers together

I am trying to send both when a database result is empty (it's a product page). My code I am using now, which works: header("Status: 404 Not Found"); include_once("404.html"); exit; The code that I tried initially that did not work: …
Jazzy
  • 5,536
  • 9
  • 45
  • 70
4
votes
1 answer

Changing HTTP request headers (user agent) - Chrome/Firefox

I've googled, but I couldn't find anything. What would be the best way to change/spoof user agent with a Chrome/Firefox extension. Yes, I know the way to do it with config, but this isn't the perfect way. Is there a way to stop request being sent,…
Joe Doe
  • 3,234
  • 3
  • 16
  • 17
4
votes
3 answers

Sending document information by PHP header OR HTML meta http-equiv?

For sending HTML document information such as content-encoding, charset, date, last-modified, etc we can equally use PHP header header() OR HTML meta http-equiv . Which is practically better? Can anyone elaborate the pros and…
Googlebot
  • 13,096
  • 38
  • 113
  • 210
4
votes
1 answer

Custom http headers with JsonRest Store (dojo)

I was wondering if there's any way to set my own custom http headers in the Get ajax request (xhr.get) that automatically does a JsonRest store. There's a related topic but without a great solution: Dojo Data grid with custom HTTP headers I've seen…
Emilio
  • 924
  • 4
  • 14
  • 31
4
votes
3 answers

Google Calendar API - can only update event once

I've encountered the same problem as described in this post: Google Calendar api v3 re-update issue Namely, once I create an event and update it once using the Google Calendar API (v3), I am no longer able to update the event. When I attempt to, I…
G.S.
  • 563
  • 4
  • 19
4
votes
2 answers

Is there a standard .NET enum containing name for Location HTTP header?

System.Net.HttpRequestHeader enum contains a number of HTTP headers, but there's no Location header. Is there any system enum conatining this? I am aware that I can just make a constant inside my application (that's what I did and it works fine) - I…
Sergey Kudriavtsev
  • 9,560
  • 3
  • 40
  • 61
4
votes
1 answer

Header Location + Content Disposition

So I have a downloads page where you click a link, it opens /downloads/download/randomhash randomhash is found in the db, i increment a download counter, and then redirect to the actual file e.g. /uploads/2012/file.png. Everything works except for…
Benno
  • 2,948
  • 3
  • 24
  • 39
4
votes
1 answer

PHP force download of remote file without reading into memory

Is it possible to force a download of remote file in PHP without reading it into memory? I know fpassthru(), readfile(), file_get_contents() all reads the files into memory before outputting it into the browser. Here's my code: if($url =…
user2385136
4
votes
2 answers

storing contents of php://input in a variable

I'm trying to edit and tweak someone else's REST server in PHP. It's based on the REST Server written by Phil Sturgeon. Pretty much got my head around all of it, but my requests aren't working as expected. In the server constructor is the…
Josh
  • 3,280
  • 3
  • 34
  • 52
4
votes
2 answers

WCF Service with wsHttpBinding - Manipulating HTTP request headers

I have been following this tutorial in order to get username authentication with transport security working in my WCF service. The tutorial however refers to using basicHttpBinding which is unacceptable - I require wsHttpBinding. The idea is to have…
Dejan Janjušević
  • 2,875
  • 4
  • 35
  • 60
4
votes
1 answer

How to access all HTTP Response Headers

I have a simple mobile app in Titanium that I'm using to debug the ability to log into our user system. At the moment, I cannot seem to see the Set-Cookie response header as it's always returned as null. I'm currently using Titanium SDK 1.7.5 (1.8…
Cyntech
  • 5,145
  • 5
  • 30
  • 47
4
votes
1 answer

Symfony2 basic http auth, works with curl but not on Android

I'm trying to authenticate a user on my symfony2 server. The authentication works with curl in cli : curl "http://localhost:8080/app_dev.php/app/user/profile.json?id=4" -u foo:bar --basic But with Android i always get a 401 error with this error: …
Gp2mv3
  • 1,365
  • 19
  • 32
1 2 3
99
100