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

11828 questions
5
votes
2 answers

Dynamically Create and Download Doc File

So I'm trying to both dynamically create a .doc file and have the user download it when he clicks a button. These are the headers i found to download a file header('Content-Description: File Transfer'); header('Content-Type:…
blee908
  • 12,165
  • 10
  • 34
  • 41
5
votes
1 answer

IIS 7 seems to be removing explicitly set Content Type. How can I stop this?

I've got a C# page that's generating a PDF file and returning it to the user. I'm explicitly setting the Content-Type header to "application/pdf" and the MIME Type is registered in IIS, yet IIS seems to be stripping off the Content-Type. The file…
MyItchyChin
  • 13,733
  • 1
  • 24
  • 44
5
votes
2 answers

Force browsers to refresh cached, etaged images

User generated images on my site are served up by giving them a src like this: userImage.ashx?id={UserId}&type=avatar In the response from the ashx file, I set the etag header. When a user uploads a new image, the etag changes. If the browser has a…
Oliver
  • 11,297
  • 18
  • 71
  • 121
5
votes
5 answers

Extracting Information from a Tuple (Python)

I'm currently using the httplib library in Python 2.7 to obtain some headers from a website to establish a) the filesize of a download and b) the last modified date of the file. I've used some online tools and these details do exist. I'm currently…
thefragileomen
  • 1,537
  • 8
  • 24
  • 40
5
votes
2 answers

Could not override http cache headers in IIS using PreSendRequestHeaders()

History: Due to security considerations, our organization wants to disable caching by adding HTTP Headers to IIS. Expires: -1 Pragma: no-cache Cache Control: No-cache, No-store Adding these headers cause MIME "application/vnd.ms-excel" response…
Antony Thomas
  • 3,576
  • 2
  • 34
  • 40
5
votes
6 answers

404 Header redirect query

On a standard LAMP application i am sending people to my 404 page using a .htaccess rule like so: ErrorDocument 404 http://www.mydomain.com/404.php We serve dynamic images using a php file which reads files from the filesystem, i've just noticed…
robjmills
  • 18,438
  • 15
  • 77
  • 121
5
votes
2 answers

How to see request in fiddler to my site and from my site iis 5

Hi i have webserver on windows xp iis 5 sp3. I see logs but thre are only url to my site. But i need see all request informations(headers an body) For example I go to GMAIl and i click search rss feed(i add my own rss) And gmail need send request to…
user88064
  • 77
  • 1
  • 1
  • 6
5
votes
3 answers

Check whether content already sent in PHP

Is there a smart way to check whether output has already been sent to the browser and sending a header would generate a PHP_WARNING? Obviously there's the alternative of using an output buffer, but that's not always an option.
Alan Plum
  • 10,814
  • 4
  • 40
  • 57
5
votes
3 answers

How to pass authorization token to a Server Component in Next.js 13 with app directory?

I am new to Next.js and am storing a JWT authorization token in the client-side React Context and would like to 'pass' that token from the client-side context to a server component so that it can be retrieved from the server component via the…
dayuloli
  • 16,205
  • 16
  • 71
  • 126
5
votes
1 answer

Do we need the "Expect: 100-continue" header in the xfire request header?

I found the apache xfire has add one head parameter in its post header: POST /testservice/services/TestService1.1 HTTP/1.1 SOAPAction: "testAPI" Content-Type: text/xml; charset=UTF-8 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT…
Vance
  • 386
  • 1
  • 6
  • 15
5
votes
2 answers

Serving download after form submit w/ validation

I have created together a pretty simple Download Code redeemer in .php (thanks to help from here) and am having a hard time trying to figure out what the best way to serve a download is if the validation is successful. Basically - User enters…
Bantros
  • 295
  • 8
  • 17
5
votes
2 answers

How can I read the content of the content-disposition header?

TEMPORARY SOLVED: InputStream closed in Apache FileUpload API I want to read the content of the content-disposition header but request.getHeader ("content-disposition") always return null and request.getHeader ("content-type") only returns the…
Gabriel Llamas
  • 18,244
  • 26
  • 87
  • 112
5
votes
3 answers

`setRequestHeader` fails to execute with source code as a header value, axios and react

I've encountered a very strange problem, implementing axios interceptors for handling the expired token and refreshing it. Setting I'm implementing the JWT authentication with access and refresh tokens. When the request is being sent to the API…
Lev Pleshkov
  • 363
  • 1
  • 14
5
votes
1 answer

Using GET and POST with Authorization HTTP header in Python

I am trying to get the list of Maps created by me in Google Maps, and the Maps API says the following: Retrieving a List of Maps The Maps Data API provides a feed that lists the maps created by a particular user; this feed is known as a "metafeed".…
heltonbiker
  • 26,657
  • 28
  • 137
  • 252
5
votes
5 answers

HTTP to HTTPS (stylesheets, js, css-sprites, etc) reloading

This question has nothing to do with the mixed content error. About to launch a site. When i navigate from http://example.com to https://example.com, i notice that the css/js/etc is redownloaded as i am using root relative paths: . Using an http…
Steve
  • 115
  • 7